From 4795408ccc61f1feeaf67a524f9891619dcb3508 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 16 Aug 2023 20:05:43 +0300 Subject: [PATCH 01/64] feat: add tray and menu javascript APIs and events closes #6617 --- core/tauri/Cargo.toml | 4 +- core/tauri/scripts/bundle.global.js | 2 +- core/tauri/src/app.rs | 6 +- core/tauri/src/error.rs | 3 + core/tauri/src/lib.rs | 1 + core/tauri/src/manager.rs | 13 + core/tauri/src/menu/mod.rs | 3 +- core/tauri/src/menu/plugin.rs | 14 ++ core/tauri/src/resources.rs | 157 ++++++++++++ core/tauri/src/{tray.rs => tray/mod.rs} | 30 ++- core/tauri/src/tray/plugin.rs | 209 +++++++++++++++ examples/api/dist/assets/index.js | 16 +- examples/api/src-tauri/Cargo.lock | 108 ++++---- examples/api/src-tauri/src/lib.rs | 4 +- tooling/api/src/event.ts | 3 +- tooling/api/src/index.ts | 3 +- tooling/api/src/menu.ts | 18 ++ tooling/api/src/tray.ts | 321 ++++++++++++++++++++++++ 18 files changed, 834 insertions(+), 81 deletions(-) create mode 100644 core/tauri/src/menu/plugin.rs create mode 100644 core/tauri/src/resources.rs rename core/tauri/src/{tray.rs => tray/mod.rs} (94%) create mode 100644 core/tauri/src/tray/plugin.rs create mode 100644 tooling/api/src/menu.ts create mode 100644 tooling/api/src/tray.ts diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 537929c46db..e1710215141 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -69,8 +69,8 @@ png = { version = "0.17", optional = true } ico = { version = "0.3.0", optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies] -muda = { version = "0.8", default-features = false } -tray-icon = { version = "0.8", default-features = false, optional = true } +muda = { version = "0.8", default-features = false, features = [ "serde" ]} +tray-icon = { version = "0.8", default-features = false, features = [ "serde" ], optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] gtk = { version = "0.16", features = [ "v3_24" ] } diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 299376ccf66..a34a8f579db 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var m=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var p=(n,r)=>{for(var i in r)m(n,i,{get:r[i],enumerable:!0})},W=(n,r,i,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let a of E(r))!N.call(n,a)&&a!==i&&m(n,a,{get:()=>r[a],enumerable:!(o=C(r,a))||o.enumerable});return n};var k=n=>W(m({},"__esModule",{value:!0}),n);var D=(n,r,i)=>{if(!r.has(n))throw TypeError("Cannot "+i)};var _=(n,r,i)=>(D(n,r,"read from private field"),i?i.call(n):r.get(n)),w=(n,r,i)=>{if(r.has(n))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(n):r.set(n,i)},A=(n,r,i,o)=>(D(n,r,"write to private field"),o?o.call(n,i):r.set(n,i),i);var vn={};p(vn,{event:()=>f,invoke:()=>hn,path:()=>h,tauri:()=>y});var f={};p(f,{TauriEvent:()=>b,emit:()=>x,listen:()=>R,once:()=>F});var y={};p(y,{Channel:()=>l,PluginListener:()=>g,addPluginListener:()=>L,convertFileSrc:()=>U,invoke:()=>t,transformCallback:()=>u});function T(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function u(n,r=!1){let i=T(),o=`_${i}`;return Object.defineProperty(window,o,{value:a=>(r&&Reflect.deleteProperty(window,o),n?.(a)),writable:!1,configurable:!0}),i}var c,l=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;w(this,c,()=>{});this.id=u(r=>{_(this,c).call(this,r)})}set onmessage(r){A(this,c,r)}get onmessage(){return _(this,c)}toJSON(){return`__CHANNEL__:${this.id}`}};c=new WeakMap;var g=class{constructor(r,i,o){this.plugin=r,this.event=i,this.channelId=o}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function L(n,r,i){let o=new l;return o.onmessage=i,t(`plugin:${n}|register_listener`,{event:r,handler:o}).then(()=>new g(n,r,o.id))}async function t(n,r={},i){return new Promise((o,a)=>{let v=u(d=>{o(d),Reflect.deleteProperty(window,`_${P}`)},!0),P=u(d=>{a(d),Reflect.deleteProperty(window,`_${v}`)},!0);window.__TAURI_IPC__({cmd:n,callback:v,error:P,payload:r,options:i})})}function U(n,r="asset"){return window.__TAURI__.convertFileSrc(n,r)}var b=(s=>(s.WINDOW_RESIZED="tauri://resize",s.WINDOW_MOVED="tauri://move",s.WINDOW_CLOSE_REQUESTED="tauri://close-requested",s.WINDOW_CREATED="tauri://window-created",s.WINDOW_DESTROYED="tauri://destroyed",s.WINDOW_FOCUS="tauri://focus",s.WINDOW_BLUR="tauri://blur",s.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",s.WINDOW_THEME_CHANGED="tauri://theme-changed",s.WINDOW_FILE_DROP="tauri://file-drop",s.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",s.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",s.MENU="tauri://menu",s))(b||{});async function I(n,r){await t("plugin:event|unlisten",{event:n,eventId:r})}async function R(n,r,i){return t("plugin:event|listen",{event:n,windowLabel:i?.target,handler:u(r)}).then(o=>async()=>I(n,o))}async function F(n,r,i){return R(n,o=>{r(o),I(n,o.id).catch(()=>{})},i)}async function x(n,r,i){await t("plugin:event|emit",{event:n,windowLabel:i?.target,payload:r})}var h={};p(h,{BaseDirectory:()=>O,appCacheDir:()=>V,appConfigDir:()=>S,appDataDir:()=>H,appLocalDataDir:()=>$,appLogDir:()=>an,audioDir:()=>M,basename:()=>yn,cacheDir:()=>j,configDir:()=>z,dataDir:()=>G,delimiter:()=>pn,desktopDir:()=>q,dirname:()=>mn,documentDir:()=>J,downloadDir:()=>K,executableDir:()=>Q,extname:()=>_n,fontDir:()=>Y,homeDir:()=>Z,isAbsolute:()=>fn,join:()=>dn,localDataDir:()=>X,normalize:()=>gn,pictureDir:()=>B,publicDir:()=>nn,resolve:()=>ln,resolveResource:()=>en,resourceDir:()=>rn,runtimeDir:()=>tn,sep:()=>un,tempDir:()=>cn,templateDir:()=>on,videoDir:()=>sn});var O=(e=>(e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template",e))(O||{});async function S(){return t("plugin:path|resolve_directory",{directory:13})}async function H(){return t("plugin:path|resolve_directory",{directory:14})}async function $(){return t("plugin:path|resolve_directory",{directory:15})}async function V(){return t("plugin:path|resolve_directory",{directory:16})}async function M(){return t("plugin:path|resolve_directory",{directory:1})}async function j(){return t("plugin:path|resolve_directory",{directory:2})}async function z(){return t("plugin:path|resolve_directory",{directory:3})}async function G(){return t("plugin:path|resolve_directory",{directory:4})}async function q(){return t("plugin:path|resolve_directory",{directory:18})}async function J(){return t("plugin:path|resolve_directory",{directory:6})}async function K(){return t("plugin:path|resolve_directory",{directory:7})}async function Q(){return t("plugin:path|resolve_directory",{directory:19})}async function Y(){return t("plugin:path|resolve_directory",{directory:20})}async function Z(){return t("plugin:path|resolve_directory",{directory:21})}async function X(){return t("plugin:path|resolve_directory",{directory:5})}async function B(){return t("plugin:path|resolve_directory",{directory:8})}async function nn(){return t("plugin:path|resolve_directory",{directory:9})}async function rn(){return t("plugin:path|resolve_directory",{directory:11})}async function en(n){return t("plugin:path|resolve_directory",{directory:11,path:n})}async function tn(){return t("plugin:path|resolve_directory",{directory:22})}async function on(){return t("plugin:path|resolve_directory",{directory:23})}async function sn(){return t("plugin:path|resolve_directory",{directory:10})}async function an(){return t("plugin:path|resolve_directory",{directory:17})}async function cn(n){return t("plugin:path|resolve_directory",{directory:12})}function un(){return window.__TAURI__.path.__sep}function pn(){return window.__TAURI__.path.__delimiter}async function ln(...n){return t("plugin:path|resolve",{paths:n})}async function gn(n){return t("plugin:path|normalize",{path:n})}async function dn(...n){return t("plugin:path|join",{paths:n})}async function mn(n){return t("plugin:path|dirname",{path:n})}async function _n(n){return t("plugin:path|extname",{path:n})}async function yn(n,r){return t("plugin:path|basename",{path:n,ext:r})}async function fn(n){return t("plugin:path|isAbsolute",{path:n})}var hn=t;return k(vn);})(); +"use strict";var __TAURI_IIFE__=(()=>{var y=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var W=Object.prototype.hasOwnProperty;var l=(r,n)=>{for(var i in n)y(r,i,{get:n[i],enumerable:!0})},U=(r,n,i,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of N(n))!W.call(r,a)&&a!==i&&y(r,a,{get:()=>n[a],enumerable:!(o=k(n,a))||o.enumerable});return r};var L=r=>U(y({},"__esModule",{value:!0}),r);var T=(r,n,i)=>{if(!n.has(r))throw TypeError("Cannot "+i)};var f=(r,n,i)=>(T(r,n,"read from private field"),i?i.call(r):n.get(r)),I=(r,n,i)=>{if(n.has(r))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(r):n.set(r,i)},E=(r,n,i,o)=>(T(r,n,"write to private field"),o?o.call(r,i):n.set(r,i),i);var Pn={};l(Pn,{event:()=>b,invoke:()=>bn,path:()=>P,tauri:()=>h,tray:()=>w});var b={};l(b,{TauriEvent:()=>R,emit:()=>S,listen:()=>p,once:()=>v});var h={};l(h,{Channel:()=>g,PluginListener:()=>_,addPluginListener:()=>F,convertFileSrc:()=>M,invoke:()=>e,transformCallback:()=>c});function x(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function c(r,n=!1){let i=x(),o=`_${i}`;return Object.defineProperty(window,o,{value:a=>(n&&Reflect.deleteProperty(window,o),r?.(a)),writable:!1,configurable:!0}),i}var u,g=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;I(this,u,()=>{});this.id=c(n=>{f(this,u).call(this,n)})}set onmessage(n){E(this,u,n)}get onmessage(){return f(this,u)}toJSON(){return`__CHANNEL__:${this.id}`}};u=new WeakMap;var _=class{constructor(n,i,o){this.plugin=n,this.event=i,this.channelId=o}async unregister(){return e(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function F(r,n,i){let o=new g;return o.onmessage=i,e(`plugin:${r}|register_listener`,{event:n,handler:o}).then(()=>new _(r,n,o.id))}async function e(r,n={},i){return new Promise((o,a)=>{let A=c(m=>{o(m),Reflect.deleteProperty(window,`_${D}`)},!0),D=c(m=>{a(m),Reflect.deleteProperty(window,`_${A}`)},!0);window.__TAURI_IPC__({cmd:r,callback:A,error:D,payload:n,options:i})})}function M(r,n="asset"){return window.__TAURI__.convertFileSrc(r,n)}var R=(s=>(s.WINDOW_RESIZED="tauri://resize",s.WINDOW_MOVED="tauri://move",s.WINDOW_CLOSE_REQUESTED="tauri://close-requested",s.WINDOW_CREATED="tauri://window-created",s.WINDOW_DESTROYED="tauri://destroyed",s.WINDOW_FOCUS="tauri://focus",s.WINDOW_BLUR="tauri://blur",s.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",s.WINDOW_THEME_CHANGED="tauri://theme-changed",s.WINDOW_FILE_DROP="tauri://file-drop",s.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",s.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",s.MENU="tauri://menu",s.TRAY="tauri://tray",s))(R||{});async function C(r,n){await e("plugin:event|unlisten",{event:r,eventId:n})}async function p(r,n,i){return e("plugin:event|listen",{event:r,windowLabel:i?.target,handler:c(n)}).then(o=>async()=>C(r,o))}async function v(r,n,i){return p(r,o=>{n(o),C(r,o.id).catch(()=>{})},i)}async function S(r,n,i){await e("plugin:event|emit",{event:r,windowLabel:i?.target,payload:n})}var P={};l(P,{BaseDirectory:()=>O,appCacheDir:()=>j,appConfigDir:()=>H,appDataDir:()=>$,appLocalDataDir:()=>V,appLogDir:()=>cn,audioDir:()=>z,basename:()=>hn,cacheDir:()=>G,configDir:()=>Y,dataDir:()=>q,delimiter:()=>dn,desktopDir:()=>J,dirname:()=>yn,documentDir:()=>K,downloadDir:()=>Q,executableDir:()=>Z,extname:()=>fn,fontDir:()=>X,homeDir:()=>B,isAbsolute:()=>vn,join:()=>mn,localDataDir:()=>nn,normalize:()=>_n,pictureDir:()=>rn,publicDir:()=>en,resolve:()=>gn,resolveResource:()=>on,resourceDir:()=>tn,runtimeDir:()=>sn,sep:()=>pn,tempDir:()=>ln,templateDir:()=>an,videoDir:()=>un});var O=(t=>(t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template",t))(O||{});async function H(){return e("plugin:path|resolve_directory",{directory:13})}async function $(){return e("plugin:path|resolve_directory",{directory:14})}async function V(){return e("plugin:path|resolve_directory",{directory:15})}async function j(){return e("plugin:path|resolve_directory",{directory:16})}async function z(){return e("plugin:path|resolve_directory",{directory:1})}async function G(){return e("plugin:path|resolve_directory",{directory:2})}async function Y(){return e("plugin:path|resolve_directory",{directory:3})}async function q(){return e("plugin:path|resolve_directory",{directory:4})}async function J(){return e("plugin:path|resolve_directory",{directory:18})}async function K(){return e("plugin:path|resolve_directory",{directory:6})}async function Q(){return e("plugin:path|resolve_directory",{directory:7})}async function Z(){return e("plugin:path|resolve_directory",{directory:19})}async function X(){return e("plugin:path|resolve_directory",{directory:20})}async function B(){return e("plugin:path|resolve_directory",{directory:21})}async function nn(){return e("plugin:path|resolve_directory",{directory:5})}async function rn(){return e("plugin:path|resolve_directory",{directory:8})}async function en(){return e("plugin:path|resolve_directory",{directory:9})}async function tn(){return e("plugin:path|resolve_directory",{directory:11})}async function on(r){return e("plugin:path|resolve_directory",{directory:11,path:r})}async function sn(){return e("plugin:path|resolve_directory",{directory:22})}async function an(){return e("plugin:path|resolve_directory",{directory:23})}async function un(){return e("plugin:path|resolve_directory",{directory:10})}async function cn(){return e("plugin:path|resolve_directory",{directory:17})}async function ln(r){return e("plugin:path|resolve_directory",{directory:12})}function pn(){return window.__TAURI__.path.__sep}function dn(){return window.__TAURI__.path.__delimiter}async function gn(...r){return e("plugin:path|resolve",{paths:r})}async function _n(r){return e("plugin:path|normalize",{path:r})}async function mn(...r){return e("plugin:path|join",{paths:r})}async function yn(r){return e("plugin:path|dirname",{path:r})}async function fn(r){return e("plugin:path|extname",{path:r})}async function hn(r,n){return e("plugin:path|basename",{path:r,ext:n})}async function vn(r){return e("plugin:path|isAbsolute",{path:r})}var w={};l(w,{TrayIcon:()=>d});var d=class{constructor(n,i){this._rid=n,this._id=i}static async new(n){return n&&(n.menu=n.menu?.rid),e("plugin:tray|new",{options:n??{}}).then(([i,o])=>new d(i,o))}id(){return this._id}async setIcon(n){return e("plugin:tray|set_icon",{rid:this._rid,icon:n})}async setMenu(n){return e("plugin:tray|set_menu",{rid:this._rid,menu:n?.rid})}async setTooltip(n){return e("plugin:tray|set_tooltip",{rid:this._rid,tooltip:n})}async setTitle(n){return e("plugin:tray|set_title",{rid:this._rid,title:n})}async setVisible(n){return e("plugin:tray|set_visible",{rid:this._rid,visible:n})}async setTempDirPath(n){return e("plugin:tray|set_temp_dir_path",{rid:this._rid,path:n})}async setIconAsTemplate(n){return e("plugin:tray|set_icon_as_template",{rid:this._rid,asTemplate:n})}async setMenuOnLeftClick(n){return e("plugin:tray|set_show_menu_on_left_click",{rid:this._rid,onLeft:n})}async destroy(){return e("plugin:tray|destroy",{rid:this._rid})}async listen(n,i){return p(n,i,{target:window.__TAURI_METADATA__.__currentWindow.label})}async once(n,i){return v(n,i,{target:window.__TAURI_METADATA__.__currentWindow.label})}async onTrayIconEvent(n){return p("tauri://tray",n,{target:window.__TAURI_METADATA__.__currentWindow.label})}};var bn=e;return L(Pn);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index e6dc3299891..bf0d2d8ba1e 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -797,7 +797,8 @@ macro_rules! shared_app_impl { /// **You should always exit the tauri app immediately after this function returns and not use any tauri-related APIs.** pub fn cleanup_before_exit(&self) { #[cfg(all(desktop, feature = "tray-icon"))] - self.manager.inner.tray_icons.lock().unwrap().clear() + self.manager.inner.tray_icons.lock().unwrap().clear(); + self.manager.resources_table().clear(); } } }; @@ -810,6 +811,9 @@ impl App { fn register_core_plugins(&self) -> crate::Result<()> { self.handle.plugin(crate::path::init())?; self.handle.plugin(crate::event::init())?; + self.handle.plugin(crate::menu::plugin::init())?; + #[cfg(all(desktop, feature = "tray-icon"))] + self.handle.plugin(crate::tray::plugin::init())?; Ok(()) } diff --git a/core/tauri/src/error.rs b/core/tauri/src/error.rs index 8de7cec0d01..34232e9e1b0 100644 --- a/core/tauri/src/error.rs +++ b/core/tauri/src/error.rs @@ -110,4 +110,7 @@ pub enum Error { #[cfg(all(desktop, feature = "tray-icon"))] #[cfg_attr(doc_cfg, doc(cfg(all(desktop, feature = "tray-icon"))))] BadTrayIcon(#[from] tray_icon::BadIcon), + /// The resource id is invalid. + #[error("The resource id {0} is invalid.")] + BadResourceId(crate::resources::ResourceId), } diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index a66aca8bd83..12fcf23a5c6 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -86,6 +86,7 @@ pub mod ipc; mod manager; mod pattern; pub mod plugin; +mod resources; mod vibrancy; pub mod window; use tauri_runtime as runtime; diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index b5cccd32455..386fbe3378a 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -33,6 +33,7 @@ use crate::{ ipc::{Invoke, InvokeHandler, InvokeResponder}, pattern::PatternJavascript, plugin::PluginStore, + resources::ResourceTable, runtime::{ http::{ MimeType, Request as HttpRequest, Response as HttpResponse, @@ -274,6 +275,8 @@ pub struct InnerWindowManager { invoke_initialization_script: String, /// Application pattern. pub(crate) pattern: Pattern, + /// Application Resources Table + resources_table: Arc>, } impl fmt::Debug for InnerWindowManager { @@ -368,6 +371,7 @@ impl WindowManager { tray_icon: context.tray_icon, package_info: context.package_info, pattern: context.pattern, + resources_table: Arc::default(), uri_scheme_protocols, #[cfg(desktop)] menus: Default::default(), @@ -394,6 +398,15 @@ impl WindowManager { &self.inner.pattern } + /// Resources table managed by the application. + pub(crate) fn resources_table(&self) -> MutexGuard<'_, ResourceTable> { + self + .inner + .resources_table + .lock() + .expect("poisoned window manager") + } + /// Get a locked handle to the windows. pub(crate) fn windows_lock(&self) -> MutexGuard<'_, HashMap>> { self.inner.windows.lock().expect("poisoned window manager") diff --git a/core/tauri/src/menu/mod.rs b/core/tauri/src/menu/mod.rs index bdfef026836..5a68b5af94f 100644 --- a/core/tauri/src/menu/mod.rs +++ b/core/tauri/src/menu/mod.rs @@ -4,7 +4,7 @@ #![cfg(desktop)] -//! Menu types and utility functions +//! Menu types and utilities. // TODO(muda-migration): figure out js events @@ -14,6 +14,7 @@ mod icon; #[allow(clippy::module_inception)] mod menu; mod normal; +pub(crate) mod plugin; mod predefined; mod submenu; pub use builders::*; diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs new file mode 100644 index 00000000000..a2680482815 --- /dev/null +++ b/core/tauri/src/menu/plugin.rs @@ -0,0 +1,14 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use crate::{ + plugin::{Builder, TauriPlugin}, + Runtime, +}; + +pub(crate) fn init() -> TauriPlugin { + Builder::new("menu") + .invoke_handler(crate::generate_handler![]) + .build() +} diff --git a/core/tauri/src/resources.rs b/core/tauri/src/resources.rs new file mode 100644 index 00000000000..7204e71ec1d --- /dev/null +++ b/core/tauri/src/resources.rs @@ -0,0 +1,157 @@ +// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license. +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +// a modified version of https://github.com/denoland/deno/blob/0ae83847f498a2886ae32172e50fd5bdbab2f524/core/resources.rs#L220 + +use crate::error::Error; +use std::{ + any::{type_name, Any, TypeId}, + borrow::Cow, + collections::BTreeMap, + sync::Arc, +}; + +/// Resources are Rust objects that are stored in [ResourceTable] and managed by tauri. +/// They are identified in JS by a numeric ID (the resource ID, or rid). +/// Resources can be created in endpoints. Resources can also be retrieved in endpoints by +/// their rid. Resources are thread-safe. +/// +/// Resources are reference counted in Rust. This means that they can be +/// cloned and passed around. When the last reference is dropped, the resource +/// is automatically closed. As long as the resource exists in the resource +/// table, the reference count is at least 1. +pub(crate) trait Resource: Any + 'static + Send + Sync { + /// Returns a string representation of the resource. The default implementation + /// returns the Rust type name, but specific resource types may override this + /// trait method. + fn name(&self) -> Cow<'_, str> { + type_name::().into() + } + + /// Resources may implement the `close()` trait method if they need to do + /// resource specific clean-ups, such as cancelling pending futures, after a + /// resource has been removed from the resource table. + fn close(self: Arc) {} +} + +impl dyn Resource { + #[inline(always)] + fn is(&self) -> bool { + self.type_id() == TypeId::of::() + } + + #[inline(always)] + #[allow(clippy::needless_lifetimes)] + pub(crate) fn downcast_arc<'a, T: Resource>(self: &'a Arc) -> Option<&'a Arc> { + if self.is::() { + let ptr = self as *const Arc<_> as *const Arc; + // TODO(piscisaureus): safety comment + #[allow(clippy::undocumented_unsafe_blocks)] + Some(unsafe { &*ptr }) + } else { + None + } + } +} + +/// A `ResourceId` is an integer value referencing a resource. It could be +/// considered to be the tauri equivalent of a `file descriptor` in POSIX like +/// operating systems. Elsewhere in the code base it is commonly abbreviated +/// to `rid`. +pub(crate) type ResourceId = u32; + +/// Map-like data structure storing Tauri's resources (equivalent to file +/// descriptors). +/// +/// Provides basic methods for element access. A resource can be of any type. +/// Different types of resources can be stored in the same map, and provided +/// with a name for description. +/// +/// Each resource is identified through a _resource ID (rid)_, which acts as +/// the key in the map. +#[derive(Default)] +pub(crate) struct ResourceTable { + pub(crate) index: BTreeMap>, + pub(crate) next_rid: ResourceId, +} + +impl ResourceTable { + /// Inserts resource into the resource table, which takes ownership of it. + /// + /// The resource type is erased at runtime and must be statically known + /// when retrieving it through `get()`. + /// + /// Returns a unique resource ID, which acts as a key for this resource. + pub(crate) fn add(&mut self, resource: T) -> ResourceId { + self.add_arc(Arc::new(resource)) + } + + /// Inserts a `Arc`-wrapped resource into the resource table. + /// + /// The resource type is erased at runtime and must be statically known + /// when retrieving it through `get()`. + /// + /// Returns a unique resource ID, which acts as a key for this resource. + pub(crate) fn add_arc(&mut self, resource: Arc) -> ResourceId { + let resource = resource as Arc; + self.add_arc_dyn(resource) + } + + pub(crate) fn add_arc_dyn(&mut self, resource: Arc) -> ResourceId { + let rid = self.next_rid; + let removed_resource = self.index.insert(rid, resource); + // TODO: add replace method if needed + assert!(removed_resource.is_none()); + self.next_rid += 1; + rid + } + + /// Returns a reference counted pointer to the resource of type `T` with the + /// given `rid`. If `rid` is not present or has a type different than `T`, + /// this function returns `None`. + pub(crate) fn get(&self, rid: ResourceId) -> Result, Error> { + self + .index + .get(&rid) + .and_then(|rc| rc.downcast_arc::()) + .map(Clone::clone) + .ok_or_else(|| Error::BadResourceId(rid)) + } + + // /// Removes a resource of type `T` from the resource table and returns it. + // /// If a resource with the given `rid` exists but its type does not match `T`, + // /// it is not removed from the resource table. Note that the resource's + // /// `close()` method is *not* called. + // /// + // /// Also note that there might be a case where + // /// the returned `Arc` is referenced by other variables. That is, we cannot + // /// assume that `Arc::strong_count(&returned_arc)` is always equal to 1 on success. + // /// In particular, be really careful when you want to extract the inner value of + // /// type `T` from `Arc`. + // pub(crate) fn take(&mut self, rid: ResourceId) -> Result, Error> { + // let resource = self.get::(rid)?; + // self.index.remove(&rid); + // Ok(resource) + // } + + /// Removes the resource with the given `rid` from the resource table. If the + /// only reference to this resource existed in the resource table, this will + /// cause the resource to be dropped. However, since resources are reference + /// counted, therefore pending ops are not automatically cancelled. A resource + /// may implement the `close()` method to perform clean-ups such as canceling + /// ops. + pub(crate) fn close(&mut self, rid: ResourceId) -> Result<(), Error> { + self + .index + .remove(&rid) + .ok_or_else(|| Error::BadResourceId(rid)) + .map(|resource| resource.close()) + } + + /// Removes and frees all resources stored. + pub(crate) fn clear(&mut self) { + self.index.clear() + } +} diff --git a/core/tauri/src/tray.rs b/core/tauri/src/tray/mod.rs similarity index 94% rename from core/tauri/src/tray.rs rename to core/tauri/src/tray/mod.rs index be6ea773dc5..4efa19ac6dd 100644 --- a/core/tauri/src/tray.rs +++ b/core/tauri/src/tray/mod.rs @@ -4,19 +4,21 @@ #![cfg(all(desktop, feature = "tray-icon"))] -//! Tray icon types and utility functions +//! Tray icon types and utilities. + +pub(crate) mod plugin; use crate::app::{GlobalMenuEventListener, GlobalTrayIconEventListener}; use crate::menu::ContextMenu; use crate::menu::MenuEvent; +use crate::resources::Resource; use crate::{run_main_thread, AppHandle, Icon, Manager, Runtime}; +use serde::Serialize; use std::path::Path; pub use tray_icon::TrayIconId; -// TODO(muda-migration): figure out js events - /// Describes a rectangle including position (x - y axis) and size. -#[derive(Debug, PartialEq, Clone, Copy, Default)] +#[derive(Debug, PartialEq, Clone, Copy, Default, Serialize)] pub struct Rectangle { /// The x-coordinate of the upper-left corner of the rectangle. pub left: f64, @@ -29,7 +31,7 @@ pub struct Rectangle { } /// Describes the click type that triggered this tray icon event. -#[derive(Clone, Copy, PartialEq, Eq, Debug)] +#[derive(Clone, Copy, PartialEq, Eq, Debug, Serialize)] pub enum ClickType { /// Left mouse click. Left, @@ -51,7 +53,7 @@ impl Default for ClickType { /// /// - **Linux**: Unsupported. The event is not emmited even though the icon is shown, /// the icon will still show a context menu on right click. -#[derive(Debug, Clone, Default)] +#[derive(Debug, Clone, Default, Serialize)] pub struct TrayIconEvent { /// Id of the tray icon which triggered this event. pub id: TrayIconId, @@ -353,13 +355,13 @@ impl TrayIcon { &self.id } - /// Set new tray icon. If `None` is provided, it will remove the icon. + /// Sets a new tray icon. If `None` is provided, it will remove the icon. pub fn set_icon(&self, icon: Option) -> crate::Result<()> { let icon = icon.and_then(|i| i.try_into().ok()); run_main_thread!(self, |self_: Self| self_.inner.set_icon(icon))?.map_err(Into::into) } - /// Set new tray menu. + /// Sets a new tray menu. /// /// ## Platform-specific: /// @@ -380,7 +382,7 @@ impl TrayIcon { run_main_thread!(self, |self_: Self| self_.inner.set_tooltip(s))?.map_err(Into::into) } - /// Sets the tooltip for this tray icon. + /// Sets the title for this tray icon. /// /// ## Platform-specific: /// @@ -395,7 +397,7 @@ impl TrayIcon { run_main_thread!(self, |self_: Self| self_.inner.set_title(s)) } - /// Show or hide this tray icon + /// Show or hide this tray icon. pub fn set_visible(&self, visible: bool) -> crate::Result<()> { run_main_thread!(self, |self_: Self| self_.inner.set_visible(visible))?.map_err(Into::into) } @@ -412,7 +414,7 @@ impl TrayIcon { Ok(()) } - /// Set the current icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**. + /// Sets the current icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**. pub fn set_icon_as_template(&self, #[allow(unused)] is_template: bool) -> crate::Result<()> { #[cfg(target_os = "macos")] run_main_thread!(self, |self_: Self| self_ @@ -439,3 +441,9 @@ impl TryFrom for tray_icon::Icon { tray_icon::Icon::from_rgba(value.rgba, value.width, value.height).map_err(Into::into) } } + +impl Resource for TrayIcon { + fn close(self: std::sync::Arc) { + self.app_handle.remove_tray_by_id(&self.id); + } +} diff --git a/core/tauri/src/tray/plugin.rs b/core/tauri/src/tray/plugin.rs new file mode 100644 index 00000000000..8efc3581096 --- /dev/null +++ b/core/tauri/src/tray/plugin.rs @@ -0,0 +1,209 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +use std::{path::PathBuf, sync::Arc}; + +use serde::Deserialize; + +use crate::{ + command, + plugin::{Builder, TauriPlugin}, + resources::ResourceId, + tray::TrayIconBuilder, + AppHandle, Icon, Manager, Runtime, +}; + +use super::TrayIcon; + +#[derive(Deserialize)] +#[serde(untagged)] +pub enum IconDto { + #[cfg(any(feature = "icon-png", feature = "icon-ico"))] + File(std::path::PathBuf), + #[cfg(any(feature = "icon-png", feature = "icon-ico"))] + Raw(Vec), + Rgba { + rgba: Vec, + width: u32, + height: u32, + }, +} + +impl From for Icon { + fn from(icon: IconDto) -> Self { + match icon { + #[cfg(any(feature = "icon-png", feature = "icon-ico"))] + IconDto::File(path) => Self::File(path), + #[cfg(any(feature = "icon-png", feature = "icon-ico"))] + IconDto::Raw(raw) => Self::Raw(raw), + IconDto::Rgba { + rgba, + width, + height, + } => Self::Rgba { + rgba, + width, + height, + }, + } + } +} + +#[derive(Deserialize)] +struct TrayIconOptions { + id: Option, + menu: Option, + icon: Option, + tooltip: Option, + title: Option, + temp_dir_path: Option, + icon_as_template: Option, + menu_on_left_click: Option, +} + +#[command(root = "crate")] +fn new( + app: AppHandle, + options: TrayIconOptions, +) -> crate::Result<(ResourceId, String)> { + let mut builder = if let Some(id) = options.id { + TrayIconBuilder::::with_id(id) + } else { + TrayIconBuilder::::new() + }; + + builder = builder.on_tray_event(|tray, e| { + let _ = tray.app_handle().emit_all("tauri://tray", e); + }); + + if let Some(_menu) = options.menu { + // builder = builder.menu(menu.into()); TODO + } + if let Some(icon) = options.icon { + builder = builder.icon(icon.into()); + } + if let Some(tooltip) = options.tooltip { + builder = builder.tooltip(tooltip); + } + if let Some(title) = options.title { + builder = builder.title(title); + } + if let Some(temp_dir_path) = options.temp_dir_path { + builder = builder.temp_dir_path(temp_dir_path); + } + if let Some(icon_as_template) = options.icon_as_template { + builder = builder.icon_as_template(icon_as_template); + } + if let Some(menu_on_left_click) = options.menu_on_left_click { + builder = builder.menu_on_left_click(menu_on_left_click); + } + + let tray = builder.build(&app)?; + let id = tray.id().as_ref().to_string(); + let mut resources_table = app.manager.resources_table(); + let rid = resources_table.add(tray); + + Ok((rid, id)) +} + +fn with_tray>) -> crate::Result>( + app: &AppHandle, + rid: ResourceId, + f: F, +) -> crate::Result { + let resources_table = app.manager.resources_table(); + let tray = resources_table.get::>(rid)?; + f(tray) +} + +#[command(root = "crate")] +fn set_icon( + app: AppHandle, + rid: ResourceId, + icon: Option, +) -> crate::Result<()> { + with_tray(&app, rid, |tray| tray.set_icon(icon.map(Into::into))) +} + +#[command(root = "crate")] +fn set_menu( + app: AppHandle, + rid: ResourceId, + menu: Option, +) -> crate::Result<()> { + // TODO + Ok(()) +} + +#[command(root = "crate")] +fn set_tooltip( + app: AppHandle, + rid: ResourceId, + tooltip: Option, +) -> crate::Result<()> { + with_tray(&app, rid, |tray| tray.set_tooltip(tooltip)) +} + +#[command(root = "crate")] +fn set_title( + app: AppHandle, + rid: ResourceId, + title: Option, +) -> crate::Result<()> { + with_tray(&app, rid, |tray| tray.set_title(title)) +} + +#[command(root = "crate")] +fn set_visible(app: AppHandle, rid: ResourceId, visible: bool) -> crate::Result<()> { + with_tray(&app, rid, |tray| tray.set_visible(visible)) +} + +#[command(root = "crate")] +fn set_temp_dir_path( + app: AppHandle, + rid: ResourceId, + path: Option, +) -> crate::Result<()> { + with_tray(&app, rid, |tray| tray.set_temp_dir_path(path)) +} + +#[command(root = "crate")] +fn set_icon_as_template( + app: AppHandle, + rid: ResourceId, + as_template: bool, +) -> crate::Result<()> { + with_tray(&app, rid, |tray| tray.set_icon_as_template(as_template)) +} + +#[command(root = "crate")] +fn set_show_menu_on_left_click( + app: AppHandle, + rid: ResourceId, + on_left: bool, +) -> crate::Result<()> { + with_tray(&app, rid, |tray| tray.set_show_menu_on_left_click(on_left)) +} + +#[command(root = "crate")] +fn destroy(app: AppHandle, rid: ResourceId) -> crate::Result<()> { + app.manager.resources_table().close(rid) +} + +pub(crate) fn init() -> TauriPlugin { + Builder::new("tray") + .invoke_handler(crate::generate_handler![ + new, + set_icon, + set_menu, + set_tooltip, + set_title, + set_visible, + set_temp_dir_path, + set_icon_as_template, + set_show_menu_on_left_click, + destroy + ]) + .build() +} diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 9f653c886b9..2c1a92b2909 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,9 +1,9 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const a of r)if(a.type==="childList")for(const m of a.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerpolicy&&(a.referrerPolicy=r.referrerpolicy),r.crossorigin==="use-credentials"?a.credentials="include":r.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();function E(){}function st(e){return e()}function Xe(){return Object.create(null)}function F(e){e.forEach(st)}function vt(e){return typeof e=="function"}function he(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ke;function bt(e,t){return ke||(ke=document.createElement("a")),ke.href=t,e===ke.href}function yt(e){return Object.keys(e).length===0}function wt(e,...t){if(e==null)return E;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function kt(e,t,n){e.$$.on_destroy.push(wt(t,n))}function s(e,t){e.appendChild(t)}function w(e,t,n){e.insertBefore(t,n||null)}function y(e){e.parentNode.removeChild(e)}function Ye(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function c(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function $t(e){return Array.from(e.childNodes)}function Lt(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}class xt{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,i=null){this.e||(this.is_svg?this.e=Et(n.nodeName):this.e=d(n.nodeName),this.t=n,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n{Le.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Qe(e){e&&e.c()}function Re(e,t,n,i){const{fragment:r,on_mount:a,on_destroy:m,after_update:o}=e.$$;r&&r.m(t,n),i||We(()=>{const f=a.map(st).filter(vt);m?m.push(...f):F(f),e.$$.on_mount=[]}),o.forEach(We)}function Ae(e,t){const n=e.$$;n.fragment!==null&&(F(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Nt(e,t){e.$$.dirty[0]===-1&&(ce.push(e),Ot(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const M=O.length?O[0]:S;return u.ctx&&r(u.ctx[_],u.ctx[_]=M)&&(!u.skip_bound&&u.bound[_]&&u.bound[_](M),T&&Nt(e,_)),S}):[],u.update(),T=!0,F(u.before_update),u.fragment=i?i(u.ctx):!1,t.target){if(t.hydrate){const _=$t(t.target);u.fragment&&u.fragment.l(_),_.forEach(y)}else u.fragment&&u.fragment.c();t.intro&&Me(e.$$.fragment),Re(e,t.target,t.anchor,t.customElement),ut()}ue(f)}class Oe{$destroy(){Ae(this,1),this.$destroy=E}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const r=i.indexOf(n);r!==-1&&i.splice(r,1)}}$set(t){this.$$set&&!yt(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const J=[];function It(e,t=E){let n;const i=new Set;function r(o){if(he(e,o)&&(e=o,n)){const f=!J.length;for(const u of i)u[1](),J.push(u,e);if(f){for(let u=0;u{i.delete(u),i.size===0&&(n(),n=null)}}return{set:r,update:a,subscribe:m}}var Wt=Object.defineProperty,dt=(e,t)=>{for(var n in t)Wt(e,n,{get:t[n],enumerable:!0})},ft=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ze=(e,t,n)=>(ft(e,t,"read from private field"),n?n.call(e):t.get(e)),Mt=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},Rt=(e,t,n,i)=>(ft(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),At={};dt(At,{Channel:()=>ht,PluginListener:()=>mt,addPluginListener:()=>Ht,convertFileSrc:()=>jt,invoke:()=>W,transformCallback:()=>fe});function Pt(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function fe(e,t=!1){let n=Pt(),i=`_${n}`;return Object.defineProperty(window,i,{value:r=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(r)),writable:!1,configurable:!0}),n}var ae,ht=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,Mt(this,ae,()=>{}),this.id=fe(e=>{Ze(this,ae).call(this,e)})}set onmessage(e){Rt(this,ae,e)}get onmessage(){return Ze(this,ae)}toJSON(){return`__CHANNEL__:${this.id}`}};ae=new WeakMap;var mt=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return W(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function Ht(e,t,n){let i=new ht;return i.onmessage=n,W(`plugin:${e}|register_listener`,{event:t,handler:i}).then(()=>new mt(e,t,i.id))}async function W(e,t={},n){return new Promise((i,r)=>{let a=fe(o=>{i(o),Reflect.deleteProperty(window,`_${m}`)},!0),m=fe(o=>{r(o),Reflect.deleteProperty(window,`_${a}`)},!0);window.__TAURI_IPC__({cmd:e,callback:a,error:m,payload:t,options:n})})}function jt(e,t="asset"){return window.__TAURI__.convertFileSrc(e,t)}function qt(e){let t,n,i,r,a,m;return{c(){t=d("div"),n=d("p"),n.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 o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const f of a.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerpolicy&&(a.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?a.credentials="include":o.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();function E(){}function ot(e){return e()}function Ge(){return Object.create(null)}function U(e){e.forEach(ot)}function pt(e){return typeof e=="function"}function de(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ye;function gt(e,t){return ye||(ye=document.createElement("a")),ye.href=t,e===ye.href}function _t(e){return Object.keys(e).length===0}function bt(e,...t){if(e==null)return E;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function vt(e,t,n){e.$$.on_destroy.push(bt(t,n))}function s(e,t){e.appendChild(t)}function w(e,t,n){e.insertBefore(t,n||null)}function y(e){e.parentNode.removeChild(e)}function Xe(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function c(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function wt(e){return Array.from(e.childNodes)}function kt(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}class Et{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,i=null){this.e||(this.is_svg?this.e=yt(n.nodeName):this.e=d(n.nodeName),this.t=n,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n{Ee.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Je(e){e&&e.c()}function Ne(e,t,n,i){const{fragment:o,on_mount:a,on_destroy:f,after_update:r}=e.$$;o&&o.m(t,n),i||Ie(()=>{const m=a.map(ot).filter(pt);f?f.push(...m):U(m),e.$$.on_mount=[]}),r.forEach(Ie)}function We(e,t){const n=e.$$;n.fragment!==null&&(U(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Tt(e,t){e.$$.dirty[0]===-1&&(ce.push(e),Lt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const M=D.length?D[0]:S;return u.ctx&&o(u.ctx[_],u.ctx[_]=M)&&(!u.skip_bound&&u.bound[_]&&u.bound[_](M),T&&Tt(e,_)),S}):[],u.update(),T=!0,U(u.before_update),u.fragment=i?i(u.ctx):!1,t.target){if(t.hydrate){const _=wt(t.target);u.fragment&&u.fragment.l(_),_.forEach(y)}else u.fragment&&u.fragment.c();t.intro&&Me(e.$$.fragment),Ne(e,t.target,t.anchor,t.customElement),ct()}ae(m)}class Se{$destroy(){We(this,1),this.$destroy=E}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!_t(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const K=[];function Ot(e,t=E){let n;const i=new Set;function o(r){if(de(e,r)&&(e=r,n)){const m=!K.length;for(const u of i)u[1](),K.push(u,e);if(m){for(let u=0;u{i.delete(u),i.size===0&&(n(),n=null)}}return{set:o,update:a,subscribe:f}}var Ct=Object.defineProperty,at=(e,t)=>{for(var n in t)Ct(e,n,{get:t[n],enumerable:!0})},At={};at(At,{convertFileSrc:()=>Mt,invoke:()=>J,transformCallback:()=>Le});function It(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function Le(e,t=!1){let n=It(),i=`_${n}`;return Object.defineProperty(window,i,{value:o=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(o)),writable:!1,configurable:!0}),n}async function J(e,t={}){return new Promise((n,i)=>{let o=Le(f=>{n(f),Reflect.deleteProperty(window,`_${a}`)},!0),a=Le(f=>{i(f),Reflect.deleteProperty(window,`_${o}`)},!0);window.__TAURI_IPC__({cmd:e,callback:o,error:a,...t})})}function Mt(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}function Nt(e){let t,n,i,o,a,f;return{c(){t=d("div"),n=d("p"),n.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.`,i=g(),r=d("button"),r.textContent="Context menu",c(r,"class","btn")},m(o,f){w(o,t,f),s(t,n),s(t,i),s(t,r),a||(m=q(r,"click",e[0]),a=!0)},p:E,i:E,o:E,d(o){o&&y(t),a=!1,m()}}}function Ut(e){function t(){W("popup_context_menu")}return[t]}class Ft extends Oe{constructor(t){super(),Se(this,t,Ut,qt,he,{})}}var zt={};dt(zt,{TauriEvent:()=>pt,emit:()=>_t,listen:()=>Pe,once:()=>Vt});var pt=(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))(pt||{});async function gt(e,t){await W("plugin:event|unlisten",{event:e,eventId:t})}async function Pe(e,t,n){return W("plugin:event|listen",{event:e,windowLabel:n==null?void 0:n.target,handler:fe(t)}).then(i=>async()=>gt(e,i))}async function Vt(e,t,n){return Pe(e,i=>{t(i),gt(e,i.id).catch(()=>{})},n)}async function _t(e,t,n){await W("plugin:event|emit",{event:e,windowLabel:n==null?void 0:n.target,payload:t})}function Bt(e){let t,n,i,r,a,m,o,f;return{c(){t=d("div"),n=d("button"),n.textContent="Call Log API",i=g(),r=d("button"),r.textContent="Call Request (async) API",a=g(),m=d("button"),m.textContent="Send event to Rust",c(n,"class","btn"),c(n,"id","log"),c(r,"class","btn"),c(r,"id","request"),c(m,"class","btn"),c(m,"id","event")},m(u,T){w(u,t,T),s(t,n),s(t,i),s(t,r),s(t,a),s(t,m),o||(f=[q(n,"click",e[0]),q(r,"click",e[1]),q(m,"click",e[2])],o=!0)},p:E,i:E,o:E,d(u){u&&y(t),o=!1,F(f)}}}function Gt(e,t,n){let{onMessage:i}=t,r;xe(async()=>{r=await Pe("rust-event",i)}),at(()=>{r&&r()});function a(){W("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function m(){W("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function o(){_t("js-event","this is the payload string")}return e.$$set=f=>{"onMessage"in f&&n(3,i=f.onMessage)},[a,m,o,i]}class Xt extends Oe{constructor(t){super(),Se(this,t,Gt,Bt,he,{onMessage:3})}}function Yt(e){let t;return{c(){t=d("div"),t.innerHTML=`
Not available for Linux
- `,c(t,"class","flex flex-col gap-2")},m(n,i){w(n,t,i)},p:E,i:E,o:E,d(n){n&&y(t)}}}function Kt(e,t,n){let{onMessage:i}=t;const r=window.constraints={audio:!0,video:!0};function a(o){const f=document.querySelector("video"),u=o.getVideoTracks();i("Got stream with constraints:",r),i(`Using video device: ${u[0].label}`),window.stream=o,f.srcObject=o}function m(o){if(o.name==="ConstraintNotSatisfiedError"){const f=r.video;i(`The resolution ${f.width.exact}x${f.height.exact} px is not supported by your device.`)}else o.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: ${o.name}`,o)}return xe(async()=>{try{const o=await navigator.mediaDevices.getUserMedia(r);a(o)}catch(o){m(o)}}),at(()=>{window.stream.getTracks().forEach(function(o){o.stop()})}),e.$$set=o=>{"onMessage"in o&&n(0,i=o.onMessage)},[i]}class Jt extends Oe{constructor(t){super(),Se(this,t,Kt,Yt,he,{onMessage:0})}}function et(e,t,n){const i=e.slice();return i[23]=t[n],i}function tt(e,t,n){const i=e.slice();return i[26]=t[n],i}function Qt(e){let t;return{c(){t=d("span"),c(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&y(t)}}}function Zt(e){let t;return{c(){t=d("span"),c(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&y(t)}}}function en(e){let t,n;return{c(){t=Q(`Switch to Dark mode - `),n=d("div"),c(n,"class","i-ph-moon")},m(i,r){w(i,t,r),w(i,n,r)},d(i){i&&y(t),i&&y(n)}}}function tn(e){let t,n;return{c(){t=Q(`Switch to Light mode - `),n=d("div"),c(n,"class","i-ph-sun")},m(i,r){w(i,t,r),w(i,n,r)},d(i){i&&y(t),i&&y(n)}}}function nn(e){let t,n,i,r,a=e[26].label+"",m,o,f,u;function T(){return e[14](e[26])}return{c(){t=d("a"),n=d("div"),i=g(),r=d("p"),m=Q(a),c(n,"class",e[26].icon+" mr-2"),c(t,"href","##"),c(t,"class",o="nv "+(e[1]===e[26]?"nv_selected":""))},m(_,S){w(_,t,S),s(t,n),s(t,i),s(t,r),s(r,m),f||(u=q(t,"click",T),f=!0)},p(_,S){e=_,S&2&&o!==(o="nv "+(e[1]===e[26]?"nv_selected":""))&&c(t,"class",o)},d(_){_&&y(t),f=!1,u()}}}function nt(e){let t,n=e[26]&&nn(e);return{c(){n&&n.c(),t=lt()},m(i,r){n&&n.m(i,r),w(i,t,r)},p(i,r){i[26]&&n.p(i,r)},d(i){n&&n.d(i),i&&y(t)}}}function it(e){let t,n=e[23].html+"",i;return{c(){t=new xt(!1),i=lt(),t.a=i},m(r,a){t.m(n,r,a),w(r,i,a)},p(r,a){a&16&&n!==(n=r[23].html+"")&&t.p(n)},d(r){r&&y(i),r&&t.d()}}}function rn(e){let t,n,i,r,a,m,o,f,u,T,_,S,O,M,Z,R,k,C,z,D,V,ee,me,te,pe,h,b,x,ne,A,P,B,ge=e[1].label+"",Te,He,_e,ie,v,je,I,ve,qe,G,be,Ue,re,Fe,oe,se,Ce,ze;function Ve(l,N){return l[0]?Zt:Qt}let ye=Ve(e),H=ye(e);function Be(l,N){return l[2]?tn:en}let we=Be(e),j=we(e),X=e[5],$=[];for(let l=0;l`,k=g(),C=d("a"),C.innerHTML=`GitHub - `,z=g(),D=d("a"),D.innerHTML=`Source - `,V=g(),ee=d("br"),me=g(),te=d("div"),pe=g(),h=d("br"),b=g(),x=d("div");for(let l=0;l<$.length;l+=1)$[l].c();ne=g(),A=d("main"),P=d("div"),B=d("h1"),Te=Q(ge),He=g(),_e=d("div"),ie=d("div"),v&&Qe(v.$$.fragment),je=g(),I=d("div"),ve=d("div"),qe=g(),G=d("div"),be=d("p"),be.textContent="Console",Ue=g(),re=d("div"),re.innerHTML='
',Fe=g(),oe=d("div");for(let l=0;l{Ae(p,1)}),Dt()}Y?(v=new Y(Ge(l)),Qe(v.$$.fragment),Me(v.$$.fragment,1),Re(v,ie,null)):v=null}if(N&16){K=l[4];let p;for(p=0;p{h.ctrlKey&&h.key==="b"&&W("toggle_menu")});const r=[{label:"Welcome",component:Ft,icon:"i-ph-hand-waving"},{label:"Communication",component:Xt,icon:"i-codicon-radio-tower"},{label:"WebRTC",component:Jt,icon:"i-ph-broadcast"}];let a=r[0];function m(h){n(1,a=h)}let o;xe(()=>{n(2,o=localStorage&&localStorage.getItem("theme")=="dark"),ot(o)});function f(){n(2,o=!o),ot(o)}let u=It([]);kt(e,u,h=>n(4,i=h));function T(h){u.update(b=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof h=="string"?h:JSON.stringify(h,null,1))+"
"},...b])}function _(h){u.update(b=>[{html:`
[${new Date().toLocaleTimeString()}]: `+h+"
"},...b])}function S(){u.update(()=>[])}let O,M,Z;function R(h){Z=h.clientY;const b=window.getComputedStyle(O);M=parseInt(b.height,10);const x=A=>{const P=A.clientY-Z,B=M-P;n(3,O.style.height=`${B{document.removeEventListener("mouseup",ne),document.removeEventListener("mousemove",x)};document.addEventListener("mouseup",ne),document.addEventListener("mousemove",x)}let k=!1,C,z,D=!1,V=0,ee=0;const me=(h,b,x)=>Math.min(Math.max(b,h),x);xe(()=>{n(13,C=document.querySelector("#sidebar")),z=document.querySelector("#sidebarToggle"),document.addEventListener("click",h=>{z.contains(h.target)?n(0,k=!k):k&&!C.contains(h.target)&&n(0,k=!1)}),document.addEventListener("touchstart",h=>{if(z.contains(h.target))return;const b=h.touches[0].clientX;(0{if(D){const b=h.touches[0].clientX;ee=b;const x=(b-V)/10;C.style.setProperty("--translate-x",`-${me(0,k?0-x:18.75-x,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(D){const h=(ee-V)/10;n(0,k=k?h>-(18.75/2):h>18.75/2)}D=!1})});const te=h=>{m(h),n(0,k=!1)};function pe(h){Ne[h?"unshift":"push"](()=>{O=h,n(3,O)})}return e.$$.update=()=>{if(e.$$.dirty&1){const h=document.querySelector("#sidebar");h&&on(h,k)}},[k,a,o,O,i,r,m,f,u,T,_,S,R,C,te,pe]}class ln extends Oe{constructor(t){super(),Se(this,t,sn,rn,he,{})}}new ln({target:document.querySelector("#app")}); + tests.`,i=g(),o=d("button"),o.textContent="Context menu",c(o,"class","btn")},m(r,m){w(r,t,m),s(t,n),s(t,i),s(t,o),a||(f=q(o,"click",e[0]),a=!0)},p:E,i:E,o:E,d(r){r&&y(t),a=!1,f()}}}function Wt(e){function t(){J("popup_context_menu")}return[t]}class Pt extends Se{constructor(t){super(),xe(this,t,Wt,Nt,de,{})}}async function Pe(e){return J("tauri",e)}var Rt={};at(Rt,{TauriEvent:()=>ft,emit:()=>ht,listen:()=>mt,once:()=>jt});async function ut(e,t){return Pe({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Ht(e,t,n){await Pe({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function dt(e,t,n){return Pe({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:Le(n)}}).then(i=>async()=>ut(e,i))}async function qt(e,t,n){return dt(e,t,i=>{n(i),ut(e,i.id).catch(()=>{})})}var ft=(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))(ft||{});async function mt(e,t){return dt(e,null,t)}async function jt(e,t){return qt(e,null,t)}async function ht(e,t){return Ht(e,void 0,t)}function Ut(e){let t,n,i,o,a,f,r,m;return{c(){t=d("div"),n=d("button"),n.textContent="Call Log API",i=g(),o=d("button"),o.textContent="Call Request (async) API",a=g(),f=d("button"),f.textContent="Send event to Rust",c(n,"class","btn"),c(n,"id","log"),c(o,"class","btn"),c(o,"id","request"),c(f,"class","btn"),c(f,"id","event")},m(u,T){w(u,t,T),s(t,n),s(t,i),s(t,o),s(t,a),s(t,f),r||(m=[q(n,"click",e[0]),q(o,"click",e[1]),q(f,"click",e[2])],r=!0)},p:E,i:E,o:E,d(u){u&&y(t),r=!1,U(m)}}}function zt(e,t,n){let{onMessage:i}=t,o;$e(async()=>{o=await mt("rust-event",i)}),lt(()=>{o&&o()});function a(){J("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function f(){J("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function r(){ht("js-event","this is the payload string")}return e.$$set=m=>{"onMessage"in m&&n(3,i=m.onMessage)},[a,f,r,i]}class Ft extends Se{constructor(t){super(),xe(this,t,zt,Ut,de,{onMessage:3})}}function Vt(e){let t;return{c(){t=d("div"),t.innerHTML=`
Not available for Linux
+ `,c(t,"class","flex flex-col gap-2")},m(n,i){w(n,t,i)},p:E,i:E,o:E,d(n){n&&y(t)}}}function Bt(e,t,n){let{onMessage:i}=t;const o=window.constraints={audio:!0,video:!0};function a(r){const m=document.querySelector("video"),u=r.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${u[0].label}`),window.stream=r,m.srcObject=r}function f(r){if(r.name==="ConstraintNotSatisfiedError"){const m=o.video;i(`The resolution ${m.width.exact}x${m.height.exact} px is not supported by your device.`)}else r.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: ${r.name}`,r)}return $e(async()=>{try{const r=await navigator.mediaDevices.getUserMedia(o);a(r)}catch(r){f(r)}}),lt(()=>{window.stream.getTracks().forEach(function(r){r.stop()})}),e.$$set=r=>{"onMessage"in r&&n(0,i=r.onMessage)},[i]}class Gt extends Se{constructor(t){super(),xe(this,t,Bt,Vt,de,{onMessage:0})}}function Qe(e,t,n){const i=e.slice();return i[23]=t[n],i}function Ze(e,t,n){const i=e.slice();return i[26]=t[n],i}function Xt(e){let t;return{c(){t=d("span"),c(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&y(t)}}}function Yt(e){let t;return{c(){t=d("span"),c(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&y(t)}}}function Kt(e){let t,n;return{c(){t=Q(`Switch to Dark mode + `),n=d("div"),c(n,"class","i-ph-moon")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&y(t),i&&y(n)}}}function Jt(e){let t,n;return{c(){t=Q(`Switch to Light mode + `),n=d("div"),c(n,"class","i-ph-sun")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&y(t),i&&y(n)}}}function Qt(e){let t,n,i,o,a=e[26].label+"",f,r,m,u;function T(){return e[14](e[26])}return{c(){t=d("a"),n=d("div"),i=g(),o=d("p"),f=Q(a),c(n,"class",e[26].icon+" mr-2"),c(t,"href","##"),c(t,"class",r="nv "+(e[1]===e[26]?"nv_selected":""))},m(_,S){w(_,t,S),s(t,n),s(t,i),s(t,o),s(o,f),m||(u=q(t,"click",T),m=!0)},p(_,S){e=_,S&2&&r!==(r="nv "+(e[1]===e[26]?"nv_selected":""))&&c(t,"class",r)},d(_){_&&y(t),m=!1,u()}}}function et(e){let t,n=e[26]&&Qt(e);return{c(){n&&n.c(),t=rt()},m(i,o){n&&n.m(i,o),w(i,t,o)},p(i,o){i[26]&&n.p(i,o)},d(i){n&&n.d(i),i&&y(t)}}}function tt(e){let t,n=e[23].html+"",i;return{c(){t=new Et(!1),i=rt(),t.a=i},m(o,a){t.m(n,o,a),w(o,i,a)},p(o,a){a&16&&n!==(n=o[23].html+"")&&t.p(n)},d(o){o&&y(i),o&&t.d()}}}function Zt(e){let t,n,i,o,a,f,r,m,u,T,_,S,D,M,Z,N,k,O,z,C,F,ee,fe,te,me,h,v,x,ne,W,P,V,he=e[1].label+"",De,Re,pe,ie,b,He,I,ge,qe,B,_e,je,oe,Ue,re,se,Te,ze;function Fe(l,A){return l[0]?Yt:Xt}let be=Fe(e),R=be(e);function Ve(l,A){return l[2]?Jt:Kt}let ve=Ve(e),H=ve(e),G=e[5],$=[];for(let l=0;l`,k=g(),O=d("a"),O.innerHTML=`GitHub + `,z=g(),C=d("a"),C.innerHTML=`Source + `,F=g(),ee=d("br"),fe=g(),te=d("div"),me=g(),h=d("br"),v=g(),x=d("div");for(let l=0;l<$.length;l+=1)$[l].c();ne=g(),W=d("main"),P=d("div"),V=d("h1"),De=Q(he),Re=g(),pe=d("div"),ie=d("div"),b&&Je(b.$$.fragment),He=g(),I=d("div"),ge=d("div"),qe=g(),B=d("div"),_e=d("p"),_e.textContent="Console",je=g(),oe=d("div"),oe.innerHTML='
',Ue=g(),re=d("div");for(let l=0;l{We(p,1)}),Dt()}X?(b=new X(Be(l)),Je(b.$$.fragment),Me(b.$$.fragment,1),Ne(b,ie,null)):b=null}if(A&16){Y=l[4];let p;for(p=0;p{h.ctrlKey&&h.key==="b"&&J("toggle_menu")});const o=[{label:"Welcome",component:Pt,icon:"i-ph-hand-waving"},{label:"Communication",component:Ft,icon:"i-codicon-radio-tower"},{label:"WebRTC",component:Gt,icon:"i-ph-broadcast"}];let a=o[0];function f(h){n(1,a=h)}let r;$e(()=>{n(2,r=localStorage&&localStorage.getItem("theme")=="dark"),it(r)});function m(){n(2,r=!r),it(r)}let u=Ot([]);vt(e,u,h=>n(4,i=h));function T(h){u.update(v=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof h=="string"?h:JSON.stringify(h,null,1))+"
"},...v])}function _(h){u.update(v=>[{html:`
[${new Date().toLocaleTimeString()}]: `+h+"
"},...v])}function S(){u.update(()=>[])}let D,M,Z;function N(h){Z=h.clientY;const v=window.getComputedStyle(D);M=parseInt(v.height,10);const x=W=>{const P=W.clientY-Z,V=M-P;n(3,D.style.height=`${V{document.removeEventListener("mouseup",ne),document.removeEventListener("mousemove",x)};document.addEventListener("mouseup",ne),document.addEventListener("mousemove",x)}let k=!1,O,z,C=!1,F=0,ee=0;const fe=(h,v,x)=>Math.min(Math.max(v,h),x);$e(()=>{n(13,O=document.querySelector("#sidebar")),z=document.querySelector("#sidebarToggle"),document.addEventListener("click",h=>{z.contains(h.target)?n(0,k=!k):k&&!O.contains(h.target)&&n(0,k=!1)}),document.addEventListener("touchstart",h=>{if(z.contains(h.target))return;const v=h.touches[0].clientX;(0{if(C){const v=h.touches[0].clientX;ee=v;const x=(v-F)/10;O.style.setProperty("--translate-x",`-${fe(0,k?0-x:18.75-x,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(C){const h=(ee-F)/10;n(0,k=k?h>-(18.75/2):h>18.75/2)}C=!1})});const te=h=>{f(h),n(0,k=!1)};function me(h){Ce[h?"unshift":"push"](()=>{D=h,n(3,D)})}return e.$$.update=()=>{if(e.$$.dirty&1){const h=document.querySelector("#sidebar");h&&en(h,k)}},[k,a,r,D,i,o,f,m,u,T,_,S,N,O,te,me]}class nn extends Se{constructor(t){super(),xe(this,t,tn,Zt,de,{})}}new nn({target:document.querySelector("#app")}); diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 01f36e50fd9..0628ea51bc0 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -54,9 +54,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8f9420f797f2d9e935edf629310eb938a0d839f984e25327f3c7eed22300c" +checksum = "6748e8def348ed4d14996fa801f4122cd763fff530258cdc03f64b25f89d3a5a" dependencies = [ "memchr", ] @@ -160,9 +160,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.72" +version = "1.0.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b13c32d80ecc7ab747b80c3784bce54ee8a7a0cc4fbda9bf4cda2cf6fe90854" +checksum = "8c6f84b74db2535ebae81eede2f39b947dcbf01d093ae5f791e5dd414a1bf289" [[package]] name = "api" @@ -1092,9 +1092,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b9429470923de8e8cbd4d2dc513535400b4b3fef0319fb5c4e1f520a7bef743" +checksum = "c6c98ee8095e9d1dcbf2fcc6d95acccb90d1c81db1e44725c6a984b1dbdfb010" dependencies = [ "crc32fast", "miniz_oxide", @@ -2137,9 +2137,9 @@ dependencies = [ [[package]] name = "muda" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e33f46fb20f85553edb85e30a6a5231567f4103276ccdb5a2050613d253b1d" +checksum = "a7de0cd2fdb9ef32781658513eab9080a22b3a9775955019daaf1f54bd37753a" dependencies = [ "cocoa 0.25.0", "crossbeam-channel", @@ -2150,6 +2150,7 @@ dependencies = [ "objc", "once_cell", "png", + "serde", "thiserror", "windows-sys 0.48.0", ] @@ -2405,7 +2406,7 @@ dependencies = [ "libc", "redox_syscall 0.3.5", "smallvec", - "windows-targets 0.48.1", + "windows-targets 0.48.2", ] [[package]] @@ -2999,9 +3000,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.104" +version = "1.0.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c" +checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" dependencies = [ "itoa 1.0.9", "ryu", @@ -3333,9 +3334,9 @@ dependencies = [ [[package]] name = "tao" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60279ecb16c33a6cef45cd37a9602455c190942d20e360bd8499bff49f2a48f3" +checksum = "c561b4a9a3787c78ec0fbbd5c719aa84a6572bb6ff3ddfce4db4c46d3a8070a5" dependencies = [ "bitflags 1.3.2", "cairo-rs", @@ -3399,7 +3400,7 @@ checksum = "9d0e916b1148c8e263850e1ebcbd046f333e0683c724876bb0da63ea4373dc8a" [[package]] name = "tauri" -version = "2.0.0-alpha.10" +version = "2.0.0-alpha.11" dependencies = [ "anyhow", "bytes", @@ -3449,7 +3450,7 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.8" dependencies = [ "anyhow", "cargo_toml", @@ -3469,7 +3470,7 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "base64", "brotli", @@ -3493,7 +3494,7 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "heck", "proc-macro2", @@ -3549,7 +3550,7 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.13.0-alpha.6" +version = "1.0.0-alpha.0" dependencies = [ "gtk", "http", @@ -3568,7 +3569,7 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.13.0-alpha.6" +version = "1.0.0-alpha.0" dependencies = [ "cocoa 0.24.1", "gtk", @@ -3587,7 +3588,7 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-alpha.6" +version = "2.0.0-alpha.7" dependencies = [ "aes-gcm", "brotli", @@ -3657,18 +3658,18 @@ checksum = "8eaa81235c7058867fa8c0e7314f33dcce9c215f535d1913822a2b3f5e289f3c" [[package]] name = "thiserror" -version = "1.0.44" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611040a08a0439f8248d1990b111c95baa9c704c805fa1f62104b39655fd7f90" +checksum = "d9207952ae1a003f42d3d5e892dac3c6ba42aa6ac0c79a6a91a2b5cb4253e75c" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.44" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "090198534930841fab3a5d1bb637cde49e339654e606195f8d9c76eeb081dc96" +checksum = "f1728216d3244de4f14f14f8c15c79be1a7c67867d28d69b719690e2a19fb445" dependencies = [ "proc-macro2", "quote", @@ -3877,9 +3878,9 @@ dependencies = [ [[package]] name = "tray-icon" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3b0e5bec13da15e62330e9bcf8b9fd42489b5acfe29ac8fec7ed659dbee21d9" +checksum = "6b164327e17101c78ba3dfdf879b977027ef1bd7855668ac30063de21fc02447" dependencies = [ "cocoa 0.25.0", "core-graphics 0.23.1", @@ -3890,6 +3891,7 @@ dependencies = [ "objc", "once_cell", "png", + "serde", "thiserror", "windows-sys 0.48.0", ] @@ -4305,7 +4307,7 @@ checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ "windows-implement", "windows-interface", - "windows-targets 0.48.1", + "windows-targets 0.48.2", ] [[package]] @@ -4376,7 +4378,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.1", + "windows-targets 0.48.2", ] [[package]] @@ -4396,17 +4398,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.1" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" +checksum = "d1eeca1c172a285ee6c2c84c341ccea837e7c01b12fbb2d0fe3c9e550ce49ec8" dependencies = [ - "windows_aarch64_gnullvm 0.48.0", - "windows_aarch64_msvc 0.48.0", - "windows_i686_gnu 0.48.0", - "windows_i686_msvc 0.48.0", - "windows_x86_64_gnu 0.48.0", - "windows_x86_64_gnullvm 0.48.0", - "windows_x86_64_msvc 0.48.0", + "windows_aarch64_gnullvm 0.48.2", + "windows_aarch64_msvc 0.48.2", + "windows_i686_gnu 0.48.2", + "windows_i686_msvc 0.48.2", + "windows_x86_64_gnu 0.48.2", + "windows_x86_64_gnullvm 0.48.2", + "windows_x86_64_msvc 0.48.2", ] [[package]] @@ -4423,9 +4425,9 @@ checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +checksum = "b10d0c968ba7f6166195e13d593af609ec2e3d24f916f081690695cf5eaffb2f" [[package]] name = "windows_aarch64_msvc" @@ -4435,9 +4437,9 @@ checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +checksum = "571d8d4e62f26d4932099a9efe89660e8bd5087775a2ab5cdd8b747b811f1058" [[package]] name = "windows_i686_gnu" @@ -4447,9 +4449,9 @@ checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +checksum = "2229ad223e178db5fbbc8bd8d3835e51e566b8474bfca58d2e6150c48bb723cd" [[package]] name = "windows_i686_msvc" @@ -4459,9 +4461,9 @@ checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +checksum = "600956e2d840c194eedfc5d18f8242bc2e17c7775b6684488af3a9fff6fe3287" [[package]] name = "windows_x86_64_gnu" @@ -4471,9 +4473,9 @@ checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +checksum = "ea99ff3f8b49fb7a8e0d305e5aec485bd068c2ba691b6e277d29eaeac945868a" [[package]] name = "windows_x86_64_gnullvm" @@ -4483,9 +4485,9 @@ checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +checksum = "8f1a05a1ece9a7a0d5a7ccf30ba2c33e3a61a30e042ffd247567d1de1d94120d" [[package]] name = "windows_x86_64_msvc" @@ -4495,15 +4497,15 @@ checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" -version = "0.48.0" +version = "0.48.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +checksum = "d419259aba16b663966e29e6d7c6ecfa0bb8425818bb96f6f1f3c3eb71a6e7b9" [[package]] name = "winnow" -version = "0.5.10" +version = "0.5.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5504cc7644f4b593cbc05c4a55bf9bd4e94b867c3c0bd440934174d50482427d" +checksum = "83817bbecf72c73bad717ee86820ebf286203d2e04c3951f3cd538869c897364" dependencies = [ "memchr", ] diff --git a/examples/api/src-tauri/src/lib.rs b/examples/api/src-tauri/src/lib.rs index 8af633098e9..d18bdbe75d0 100644 --- a/examples/api/src-tauri/src/lib.rs +++ b/examples/api/src-tauri/src/lib.rs @@ -63,8 +63,8 @@ pub fn run_app) + Send + 'static>( #[cfg(desktop)] app.manage(PopupMenu( tauri::menu::MenuBuilder::new(app) - .check("Tauri is awesome!") - .text("Do something") + .check("awesome", "Tauri is awesome!") + .text("something", "Do something") .copy() .build()?, )); diff --git a/tooling/api/src/event.ts b/tooling/api/src/event.ts index c7db5f032fc..55d567b31d2 100644 --- a/tooling/api/src/event.ts +++ b/tooling/api/src/event.ts @@ -56,7 +56,8 @@ enum TauriEvent { WINDOW_FILE_DROP = 'tauri://file-drop', WINDOW_FILE_DROP_HOVER = 'tauri://file-drop-hover', WINDOW_FILE_DROP_CANCELLED = 'tauri://file-drop-cancelled', - MENU = 'tauri://menu' + MENU = 'tauri://menu', + TRAY = 'tauri://tray' } /** diff --git a/tooling/api/src/index.ts b/tooling/api/src/index.ts index 658c39ed82e..d03e2e5a652 100644 --- a/tooling/api/src/index.ts +++ b/tooling/api/src/index.ts @@ -16,8 +16,9 @@ import * as event from './event' import * as tauri from './tauri' import * as path from './path' +import * as tray from './tray' /** @ignore */ const invoke = tauri.invoke -export { invoke, event, path, tauri } +export { invoke, event, path, tauri, tray } diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts new file mode 100644 index 00000000000..34053b150c2 --- /dev/null +++ b/tooling/api/src/menu.ts @@ -0,0 +1,18 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +/** + * Menu types and utilities. + * + * This package is also accessible with `window.__TAURI__.menu` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`. + * @module + */ + +export interface MenuEvent { + id: string +} + +export interface ContextMenu { + rid: number +} diff --git a/tooling/api/src/tray.ts b/tooling/api/src/tray.ts new file mode 100644 index 00000000000..fea4c23bcbe --- /dev/null +++ b/tooling/api/src/tray.ts @@ -0,0 +1,321 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + +import { EventCallback, EventName, UnlistenFn, listen, once } from './event' +import { ContextMenu } from './menu' +import { invoke } from './tauri' + +/** + * Describes a tray event emitted when a tray icon is clicked + * + * #### Platform-specific: + * + * - **Linux**: Unsupported. The event is not emmited even though the icon is shown, + * the icon will still show a context menu on right click. + */ +export interface TrayIconEvent { + /** Id of the tray icon which triggered this event. */ + id: string + /** Physical X Position of the click the triggered this event. */ + x: number + /** Physical Y Position of the click the triggered this event. */ + y: number + /** Position and size of the tray icon. */ + iconRect: { + /** The x-coordinate of the upper-left corner of the rectangle. */ + left: number + /** The y-coordinate of the upper-left corner of the rectangle. */ + top: number + /** The x-coordinate of the lower-right corner of the rectangle. */ + right: number + /** The y-coordinate of the lower-right corner of the rectangle. */ + bottom: number + } + /** The click type that triggered this event. */ + clickType: 'Left' | 'Right' | 'Double' +} + +/** + * Tray icon types and utilities. + * + * This package is also accessible with `window.__TAURI__.tray` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`. + * @module + */ + +/** {@link TrayIcon.new|`TrayIcon`} creation options */ +export interface TrayIconOptions { + /** The tray icon id. If undefined, a random one will be assigend */ + id?: string + /** The tray icon menu */ + menu?: ContextMenu + /** + * The tray icon which could be icon bytes or path to the icon file. + * + * Note that you need the `icon-ico` or `icon-png` Cargo features to use this API. + * To enable it, change your Cargo.toml file: + * ```toml + * [dependencies] + * tauri = { version = "...", features = ["...", "icon-png"] } + * ``` + */ + icon?: string | Uint8Array + /** The tray icon tooltip */ + tooltip?: string + /** + * The tooltip text + * + * #### Platform-specific + * + * - **Linux:** The title will not be shown unless there is an icon + * as well. The title is useful for numerical and other frequently + * updated information. In general, it shouldn't be shown unless a + * user requests it as it can take up a significant amount of space + * on the user's panel. This may not be shown in all visualizations. + * - **Windows:** Unsupported. + */ + title?: string + /** + * The tray icon temp dir path. **Linux only**. + * + * On Linux, we need to write the icon to the disk and usually it will + * be `$XDG_RUNTIME_DIR/tray-icon` or `$TEMP/tray-icon`. + */ + tempDirPath?: string + /** + * Use the icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**. + */ + iconAsTemplate?: boolean + /** Whether to show the tray menu on left click or not, default is `true`. **macOS only**. */ + menuOnLeftClieck?: boolean +} + +/** + * Tray icon class and associated methods. This type constructor is private, + * instead, you should use the static method {@linkcode TrayIcon.new}. + * + * #### Warning + * + * Unlike Rust, javascript does not have any way to run cleanup code + * when an object is being removed by garbage collection, but this tray icon + * will be cleaned up when the tauri app exists, however if you want to cleanup + * this object early, you need to call {@linkcode TrayIcon.destroy}. + * + * @example + * ```ts + * import { TrayIcon } from '@tauri-apps/api/tray'; + * const tray = await TrayIcon.new({ tooltip: 'awesome tray tooltip' }); + * tray.set_tooltip('new tooltip'); + * ``` + */ +export class TrayIcon { + _rid: number + _id: string + + private constructor(rid: number, id: string) { + this._rid = rid + this._id = id + } + + /** + * Creates a new {@linkcode TrayIcon} + * + * #### Platform-specific: + * + * - **Linux:** Sometimes the icon won't be visible unless a menu is set. + * Setting an empty {@linkcode Menu} is enough. + */ + static async new(options?: TrayIconOptions): Promise { + if (options) { + // @ts-expect-error we only need the rid + options.menu = options.menu?.rid + } + return invoke<[number, string]>('plugin:tray|new', { + options: options ?? {} + }).then(([rid, id]) => new TrayIcon(rid, id)) + } + + /** Returns the id associated with this tray icon. */ + id(): string { + return this._id + } + + /** Sets a new tray icon. If `null` is provided, it will remove the icon. */ + async setIcon(icon: string | Uint8Array | null) { + return invoke('plugin:tray|set_icon', { rid: this._rid, icon }) + } + + /** + * Sets a new tray menu. + * + * #### Platform-specific: + * + * - **Linux**: once a menu is set it cannot be removed so `null` has no effect + */ + async setMenu(menu: ContextMenu | null) { + return invoke('plugin:tray|set_menu', { rid: this._rid, menu: menu?.rid }) + } + + /** + * Sets the tooltip for this tray icon. + * + * ## Platform-specific: + * + * - **Linux:** Unsupported + */ + async setTooltip(tooltip: string | null) { + return invoke('plugin:tray|set_tooltip', { rid: this._rid, tooltip }) + } + + /** + * Sets the tooltip for this tray icon. + * + * ## Platform-specific: + * + * - **Linux:** The title will not be shown unless there is an icon + * as well. The title is useful for numerical and other frequently + * updated information. In general, it shouldn't be shown unless a + * user requests it as it can take up a significant amount of space + * on the user's panel. This may not be shown in all visualizations. + * - **Windows:** Unsupported + */ + async setTitle(title: string | null) { + return invoke('plugin:tray|set_title', { rid: this._rid, title }) + } + + /** Show or hide this tray icon. */ + async setVisible(visible: boolean) { + return invoke('plugin:tray|set_visible', { rid: this._rid, visible }) + } + + /** + * Sets the tray icon temp dir path. **Linux only**. + * + * On Linux, we need to write the icon to the disk and usually it will + * be `$XDG_RUNTIME_DIR/tray-icon` or `$TEMP/tray-icon`. + */ + async setTempDirPath(path: string | null) { + return invoke('plugin:tray|set_temp_dir_path', { rid: this._rid, path }) + } + + /** Sets the current icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only** */ + async setIconAsTemplate(asTemplate: boolean) { + return invoke('plugin:tray|set_icon_as_template', { + rid: this._rid, + asTemplate + }) + } + + /** Disable or enable showing the tray menu on left click. **macOS only**. */ + async setMenuOnLeftClick(onLeft: boolean) { + return invoke('plugin:tray|set_show_menu_on_left_click', { + rid: this._rid, + onLeft + }) + } + + /** + * Destroys and removes this tray icon from the system tray. See {@linkcode TrayIcon} docs for more info. + * + * #### Warning + * + * You should not call any method on this object anymore and should drop any reference to it, + * otherwise the methods will throw errors when used. + */ + async destroy() { + return invoke('plugin:tray|destroy', { + rid: this._rid + }) + } + + /** + * Listen to an event emitted by the backend that is tied to the current webview window. + * + * @example + * ```typescript + * import { TrayIcon } from '@tauri-apps/api/tray'; + * let tray = await TrayIcon.new(); + * const unlisten = await tray.listen('state-changed', (event) => { + * console.log(`Got error: ${payload}`); + * }); + * + * // you need to call unlisten if your handler goes out of scope e.g. the component is unmounted + * unlisten(); + * ``` + * + * @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. + * @param handler Event handler. + * @returns A promise resolving to a function to unlisten to the event. + * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. + * + * @since 2.0.0 + */ + async listen( + event: EventName, + handler: EventCallback + ): Promise { + return listen(event, handler, { + target: window.__TAURI_METADATA__.__currentWindow.label + }) + } + + /** + * Listen to an one-off event emitted by the backend that is tied to the current webview window. + * + * @example + * ```typescript + * import { TrayIcon } from '@tauri-apps/api/tray'; + * let tray = await TrayIcon.new(); + * const unlisten = await tray.once('state-initalized', (event) => { + * console.log(`State initalized`); + * }); + * + * // you need to call unlisten if your handler goes out of scope e.g. the component is unmounted + * unlisten(); + * ``` + * + * @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. + * @param handler Event handler. + * @returns A promise resolving to a function to unlisten to the event. + * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. + * + * @since 2.0.0 + */ + async once( + event: EventName, + handler: EventCallback + ): Promise { + return once(event, handler, { + target: window.__TAURI_METADATA__.__currentWindow.label + }) + } + + /** + * Listen to this tray icon events. + * + * @example + * ```typescript + * import { TrayIcon } from '@tauri-apps/api/tray'; + * let tray = await TrayIcon.new(); + * const unlisten = await tray.onTrayIconEvent((event) => { + * console.log(event) + * }); + * + * // you need to call unlisten if your handler goes out of scope e.g. the component is unmounted + * unlisten(); + * ``` + * + * @param handler Event handler. + * @returns A promise resolving to a function to unlisten to the event. + * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. + * + * @since 2.0.0 + */ + async onTrayIconEvent( + handler: EventCallback + ): Promise { + return listen('tauri://tray', handler, { + target: window.__TAURI_METADATA__.__currentWindow.label + }) + } +} From 004a2e5f79b233ce2a7d9c9da6472a117ab0079c Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Fri, 18 Aug 2023 06:06:27 +0300 Subject: [PATCH 02/64] some progress on menu and submenu --- core/tauri/scripts/bundle.global.js | 2 +- core/tauri/src/app.rs | 1 + core/tauri/src/lib.rs | 36 +- core/tauri/src/menu/check.rs | 6 +- core/tauri/src/menu/icon.rs | 8 +- core/tauri/src/menu/menu.rs | 76 +-- core/tauri/src/menu/mod.rs | 45 +- core/tauri/src/menu/normal.rs | 6 +- core/tauri/src/menu/plugin.rs | 476 ++++++++++++++- core/tauri/src/menu/predefined.rs | 6 +- core/tauri/src/menu/submenu.rs | 91 ++- .../src/{resources.rs => resources/mod.rs} | 2 + core/tauri/src/resources/plugin.rs | 18 + core/tauri/src/tray/mod.rs | 4 +- core/tauri/src/tray/plugin.rs | 123 ++-- tooling/api/src/index.ts | 3 +- tooling/api/src/internal/index.ts | 47 ++ tooling/api/src/menu.ts | 544 +++++++++++++++++- tooling/api/src/tray.ts | 71 +-- tooling/api/typedoc.json | 4 +- 20 files changed, 1345 insertions(+), 224 deletions(-) rename core/tauri/src/{resources.rs => resources/mod.rs} (99%) create mode 100644 core/tauri/src/resources/plugin.rs create mode 100644 tooling/api/src/internal/index.ts diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index a34a8f579db..93c77bd3279 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var y=Object.defineProperty;var k=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var W=Object.prototype.hasOwnProperty;var l=(r,n)=>{for(var i in n)y(r,i,{get:n[i],enumerable:!0})},U=(r,n,i,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of N(n))!W.call(r,a)&&a!==i&&y(r,a,{get:()=>n[a],enumerable:!(o=k(n,a))||o.enumerable});return r};var L=r=>U(y({},"__esModule",{value:!0}),r);var T=(r,n,i)=>{if(!n.has(r))throw TypeError("Cannot "+i)};var f=(r,n,i)=>(T(r,n,"read from private field"),i?i.call(r):n.get(r)),I=(r,n,i)=>{if(n.has(r))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(r):n.set(r,i)},E=(r,n,i,o)=>(T(r,n,"write to private field"),o?o.call(r,i):n.set(r,i),i);var Pn={};l(Pn,{event:()=>b,invoke:()=>bn,path:()=>P,tauri:()=>h,tray:()=>w});var b={};l(b,{TauriEvent:()=>R,emit:()=>S,listen:()=>p,once:()=>v});var h={};l(h,{Channel:()=>g,PluginListener:()=>_,addPluginListener:()=>F,convertFileSrc:()=>M,invoke:()=>e,transformCallback:()=>c});function x(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function c(r,n=!1){let i=x(),o=`_${i}`;return Object.defineProperty(window,o,{value:a=>(n&&Reflect.deleteProperty(window,o),r?.(a)),writable:!1,configurable:!0}),i}var u,g=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;I(this,u,()=>{});this.id=c(n=>{f(this,u).call(this,n)})}set onmessage(n){E(this,u,n)}get onmessage(){return f(this,u)}toJSON(){return`__CHANNEL__:${this.id}`}};u=new WeakMap;var _=class{constructor(n,i,o){this.plugin=n,this.event=i,this.channelId=o}async unregister(){return e(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function F(r,n,i){let o=new g;return o.onmessage=i,e(`plugin:${r}|register_listener`,{event:n,handler:o}).then(()=>new _(r,n,o.id))}async function e(r,n={},i){return new Promise((o,a)=>{let A=c(m=>{o(m),Reflect.deleteProperty(window,`_${D}`)},!0),D=c(m=>{a(m),Reflect.deleteProperty(window,`_${A}`)},!0);window.__TAURI_IPC__({cmd:r,callback:A,error:D,payload:n,options:i})})}function M(r,n="asset"){return window.__TAURI__.convertFileSrc(r,n)}var R=(s=>(s.WINDOW_RESIZED="tauri://resize",s.WINDOW_MOVED="tauri://move",s.WINDOW_CLOSE_REQUESTED="tauri://close-requested",s.WINDOW_CREATED="tauri://window-created",s.WINDOW_DESTROYED="tauri://destroyed",s.WINDOW_FOCUS="tauri://focus",s.WINDOW_BLUR="tauri://blur",s.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",s.WINDOW_THEME_CHANGED="tauri://theme-changed",s.WINDOW_FILE_DROP="tauri://file-drop",s.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",s.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",s.MENU="tauri://menu",s.TRAY="tauri://tray",s))(R||{});async function C(r,n){await e("plugin:event|unlisten",{event:r,eventId:n})}async function p(r,n,i){return e("plugin:event|listen",{event:r,windowLabel:i?.target,handler:c(n)}).then(o=>async()=>C(r,o))}async function v(r,n,i){return p(r,o=>{n(o),C(r,o.id).catch(()=>{})},i)}async function S(r,n,i){await e("plugin:event|emit",{event:r,windowLabel:i?.target,payload:n})}var P={};l(P,{BaseDirectory:()=>O,appCacheDir:()=>j,appConfigDir:()=>H,appDataDir:()=>$,appLocalDataDir:()=>V,appLogDir:()=>cn,audioDir:()=>z,basename:()=>hn,cacheDir:()=>G,configDir:()=>Y,dataDir:()=>q,delimiter:()=>dn,desktopDir:()=>J,dirname:()=>yn,documentDir:()=>K,downloadDir:()=>Q,executableDir:()=>Z,extname:()=>fn,fontDir:()=>X,homeDir:()=>B,isAbsolute:()=>vn,join:()=>mn,localDataDir:()=>nn,normalize:()=>_n,pictureDir:()=>rn,publicDir:()=>en,resolve:()=>gn,resolveResource:()=>on,resourceDir:()=>tn,runtimeDir:()=>sn,sep:()=>pn,tempDir:()=>ln,templateDir:()=>an,videoDir:()=>un});var O=(t=>(t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template",t))(O||{});async function H(){return e("plugin:path|resolve_directory",{directory:13})}async function $(){return e("plugin:path|resolve_directory",{directory:14})}async function V(){return e("plugin:path|resolve_directory",{directory:15})}async function j(){return e("plugin:path|resolve_directory",{directory:16})}async function z(){return e("plugin:path|resolve_directory",{directory:1})}async function G(){return e("plugin:path|resolve_directory",{directory:2})}async function Y(){return e("plugin:path|resolve_directory",{directory:3})}async function q(){return e("plugin:path|resolve_directory",{directory:4})}async function J(){return e("plugin:path|resolve_directory",{directory:18})}async function K(){return e("plugin:path|resolve_directory",{directory:6})}async function Q(){return e("plugin:path|resolve_directory",{directory:7})}async function Z(){return e("plugin:path|resolve_directory",{directory:19})}async function X(){return e("plugin:path|resolve_directory",{directory:20})}async function B(){return e("plugin:path|resolve_directory",{directory:21})}async function nn(){return e("plugin:path|resolve_directory",{directory:5})}async function rn(){return e("plugin:path|resolve_directory",{directory:8})}async function en(){return e("plugin:path|resolve_directory",{directory:9})}async function tn(){return e("plugin:path|resolve_directory",{directory:11})}async function on(r){return e("plugin:path|resolve_directory",{directory:11,path:r})}async function sn(){return e("plugin:path|resolve_directory",{directory:22})}async function an(){return e("plugin:path|resolve_directory",{directory:23})}async function un(){return e("plugin:path|resolve_directory",{directory:10})}async function cn(){return e("plugin:path|resolve_directory",{directory:17})}async function ln(r){return e("plugin:path|resolve_directory",{directory:12})}function pn(){return window.__TAURI__.path.__sep}function dn(){return window.__TAURI__.path.__delimiter}async function gn(...r){return e("plugin:path|resolve",{paths:r})}async function _n(r){return e("plugin:path|normalize",{path:r})}async function mn(...r){return e("plugin:path|join",{paths:r})}async function yn(r){return e("plugin:path|dirname",{path:r})}async function fn(r){return e("plugin:path|extname",{path:r})}async function hn(r,n){return e("plugin:path|basename",{path:r,ext:n})}async function vn(r){return e("plugin:path|isAbsolute",{path:r})}var w={};l(w,{TrayIcon:()=>d});var d=class{constructor(n,i){this._rid=n,this._id=i}static async new(n){return n&&(n.menu=n.menu?.rid),e("plugin:tray|new",{options:n??{}}).then(([i,o])=>new d(i,o))}id(){return this._id}async setIcon(n){return e("plugin:tray|set_icon",{rid:this._rid,icon:n})}async setMenu(n){return e("plugin:tray|set_menu",{rid:this._rid,menu:n?.rid})}async setTooltip(n){return e("plugin:tray|set_tooltip",{rid:this._rid,tooltip:n})}async setTitle(n){return e("plugin:tray|set_title",{rid:this._rid,title:n})}async setVisible(n){return e("plugin:tray|set_visible",{rid:this._rid,visible:n})}async setTempDirPath(n){return e("plugin:tray|set_temp_dir_path",{rid:this._rid,path:n})}async setIconAsTemplate(n){return e("plugin:tray|set_icon_as_template",{rid:this._rid,asTemplate:n})}async setMenuOnLeftClick(n){return e("plugin:tray|set_show_menu_on_left_click",{rid:this._rid,onLeft:n})}async destroy(){return e("plugin:tray|destroy",{rid:this._rid})}async listen(n,i){return p(n,i,{target:window.__TAURI_METADATA__.__currentWindow.label})}async once(n,i){return v(n,i,{target:window.__TAURI_METADATA__.__currentWindow.label})}async onTrayIconEvent(n){return p("tauri://tray",n,{target:window.__TAURI_METADATA__.__currentWindow.label})}};var bn=e;return L(Pn);})(); +"use strict";var __TAURI_IIFE__=(()=>{var R=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var n in e)R(t,n,{get:e[n],enumerable:!0})},ee=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of B(e))!N.call(t,a)&&a!==n&&R(t,a,{get:()=>e[a],enumerable:!(s=X(e,a))||s.enumerable});return t};var ne=t=>ee(R({},"__esModule",{value:!0}),t);var z=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var l=(t,e,n)=>(z(t,e,"read from private field"),n?n.call(t):e.get(t)),c=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},d=(t,e,n,s)=>(z(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);var Ve={};g(Ve,{event:()=>L,invoke:()=>He,menu:()=>K,path:()=>W,tauri:()=>x,tray:()=>H});var L={};g(L,{TauriEvent:()=>Q,emit:()=>se,listen:()=>w,once:()=>U});var x={};g(x,{Channel:()=>T,PluginListener:()=>S,addPluginListener:()=>te,convertFileSrc:()=>ie,invoke:()=>r,transformCallback:()=>y});function re(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function y(t,e=!1){let n=re(),s=`_${n}`;return Object.defineProperty(window,s,{value:a=>(e&&Reflect.deleteProperty(window,s),t?.(a)),writable:!1,configurable:!0}),n}var h,T=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;c(this,h,()=>{});this.id=y(e=>{l(this,h).call(this,e)})}set onmessage(e){d(this,h,e)}get onmessage(){return l(this,h)}toJSON(){return`__CHANNEL__:${this.id}`}};h=new WeakMap;var S=class{constructor(e,n,s){this.plugin=e,this.event=n,this.channelId=s}async unregister(){return r(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function te(t,e,n){let s=new T;return s.onmessage=n,r(`plugin:${t}|register_listener`,{event:e,handler:s}).then(()=>new S(t,e,s.id))}async function r(t,e={},n){return new Promise((s,a)=>{let j=y(D=>{s(D),Reflect.deleteProperty(window,`_${$}`)},!0),$=y(D=>{a(D),Reflect.deleteProperty(window,`_${j}`)},!0);window.__TAURI_IPC__({cmd:t,callback:j,error:$,payload:e,options:n})})}function ie(t,e="asset"){return window.__TAURI__.convertFileSrc(t,e)}var Q=(u=>(u.WINDOW_RESIZED="tauri://resize",u.WINDOW_MOVED="tauri://move",u.WINDOW_CLOSE_REQUESTED="tauri://close-requested",u.WINDOW_CREATED="tauri://window-created",u.WINDOW_DESTROYED="tauri://destroyed",u.WINDOW_FOCUS="tauri://focus",u.WINDOW_BLUR="tauri://blur",u.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",u.WINDOW_THEME_CHANGED="tauri://theme-changed",u.WINDOW_FILE_DROP="tauri://file-drop",u.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",u.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",u.MENU="tauri://menu",u.TRAY="tauri://tray",u))(Q||{});async function Y(t,e){await r("plugin:event|unlisten",{event:t,eventId:e})}async function w(t,e,n){return r("plugin:event|listen",{event:t,windowLabel:n?.target,handler:y(e)}).then(s=>async()=>Y(t,s))}async function U(t,e,n){return w(t,s=>{e(s),Y(t,s.id).catch(()=>{})},n)}async function se(t,e,n){await r("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var W={};g(W,{BaseDirectory:()=>q,appCacheDir:()=>le,appConfigDir:()=>oe,appDataDir:()=>ue,appLocalDataDir:()=>ae,appLogDir:()=>Se,audioDir:()=>ce,basename:()=>Le,cacheDir:()=>de,configDir:()=>pe,dataDir:()=>me,delimiter:()=>Ee,desktopDir:()=>ge,dirname:()=>xe,documentDir:()=>he,downloadDir:()=>ye,executableDir:()=>_e,extname:()=>Ue,fontDir:()=>fe,homeDir:()=>be,isAbsolute:()=>We,join:()=>Re,localDataDir:()=>ke,normalize:()=>De,pictureDir:()=>we,publicDir:()=>Pe,resolve:()=>Fe,resolveResource:()=>Me,resourceDir:()=>Ae,runtimeDir:()=>Ie,sep:()=>ve,tempDir:()=>Ce,templateDir:()=>Oe,videoDir:()=>Te});var q=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(q||{});async function oe(){return r("plugin:path|resolve_directory",{directory:13})}async function ue(){return r("plugin:path|resolve_directory",{directory:14})}async function ae(){return r("plugin:path|resolve_directory",{directory:15})}async function le(){return r("plugin:path|resolve_directory",{directory:16})}async function ce(){return r("plugin:path|resolve_directory",{directory:1})}async function de(){return r("plugin:path|resolve_directory",{directory:2})}async function pe(){return r("plugin:path|resolve_directory",{directory:3})}async function me(){return r("plugin:path|resolve_directory",{directory:4})}async function ge(){return r("plugin:path|resolve_directory",{directory:18})}async function he(){return r("plugin:path|resolve_directory",{directory:6})}async function ye(){return r("plugin:path|resolve_directory",{directory:7})}async function _e(){return r("plugin:path|resolve_directory",{directory:19})}async function fe(){return r("plugin:path|resolve_directory",{directory:20})}async function be(){return r("plugin:path|resolve_directory",{directory:21})}async function ke(){return r("plugin:path|resolve_directory",{directory:5})}async function we(){return r("plugin:path|resolve_directory",{directory:8})}async function Pe(){return r("plugin:path|resolve_directory",{directory:9})}async function Ae(){return r("plugin:path|resolve_directory",{directory:11})}async function Me(t){return r("plugin:path|resolve_directory",{directory:11,path:t})}async function Ie(){return r("plugin:path|resolve_directory",{directory:22})}async function Oe(){return r("plugin:path|resolve_directory",{directory:23})}async function Te(){return r("plugin:path|resolve_directory",{directory:10})}async function Se(){return r("plugin:path|resolve_directory",{directory:17})}async function Ce(t){return r("plugin:path|resolve_directory",{directory:12})}function ve(){return window.__TAURI__.path.__sep}function Ee(){return window.__TAURI__.path.__delimiter}async function Fe(...t){return r("plugin:path|resolve",{paths:t})}async function De(t){return r("plugin:path|normalize",{path:t})}async function Re(...t){return r("plugin:path|join",{paths:t})}async function xe(t){return r("plugin:path|dirname",{path:t})}async function Ue(t){return r("plugin:path|extname",{path:t})}async function Le(t,e){return r("plugin:path|basename",{path:t,ext:e})}async function We(t){return r("plugin:path|isAbsolute",{path:t})}var H={};g(H,{TrayIcon:()=>A});var P,_=class{constructor(e){c(this,P,void 0);d(this,P,e)}get rid(){return l(this,P)}async close(){return r("plugin:resources|close",{rid:this.rid})}};P=new WeakMap;function J(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(s=>{Object.defineProperty(t.prototype,s,Object.getOwnPropertyDescriptor(n.prototype,s)||Object.create(null))})})}var A=class extends _{constructor(n,s){super(n);this.id=s}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),r("plugin:tray|new",{options:n??{}}).then(([s,a])=>new A(s,a))}async setIcon(n){return r("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),r("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return r("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return r("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return r("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return r("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return r("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return r("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async listen(n,s){return w(n,s,{target:window.__TAURI_METADATA__.__currentWindow.label})}async once(n,s){return U(n,s,{target:window.__TAURI_METADATA__.__currentWindow.label})}async onTrayIconEvent(n){return w("tauri://tray",n,{target:window.__TAURI_METADATA__.__currentWindow.label})}};var K={};g(K,{CheckMenuItem:()=>b,IconMenuItem:()=>k,Menu:()=>f,MenuItem:()=>p,NativeIcon:()=>Z,Submenu:()=>m});var Z=(i=>(i.Add="Add",i.Advanced="Advanced",i.Bluetooth="Bluetooth",i.Bookmarks="Bookmarks",i.Caution="Caution",i.ColorPanel="ColorPanel",i.ColumnView="ColumnView",i.Computer="Computer",i.EnterFullScreen="EnterFullScreen",i.Everyone="Everyone",i.ExitFullScreen="ExitFullScreen",i.FlowView="FlowView",i.Folder="Folder",i.FolderBurnable="FolderBurnable",i.FolderSmart="FolderSmart",i.FollowLinkFreestanding="FollowLinkFreestanding",i.FontPanel="FontPanel",i.GoLeft="GoLeft",i.GoRight="GoRight",i.Home="Home",i.IChatTheater="IChatTheater",i.IconView="IconView",i.Info="Info",i.InvalidDataFreestanding="InvalidDataFreestanding",i.LeftFacingTriangle="LeftFacingTriangle",i.ListView="ListView",i.LockLocked="LockLocked",i.LockUnlocked="LockUnlocked",i.MenuMixedState="MenuMixedState",i.MenuOnState="MenuOnState",i.MobileMe="MobileMe",i.MultipleDocuments="MultipleDocuments",i.Network="Network",i.Path="Path",i.PreferencesGeneral="PreferencesGeneral",i.QuickLook="QuickLook",i.RefreshFreestanding="RefreshFreestanding",i.Refresh="Refresh",i.Remove="Remove",i.RevealFreestanding="RevealFreestanding",i.RightFacingTriangle="RightFacingTriangle",i.Share="Share",i.Slideshow="Slideshow",i.SmartBadge="SmartBadge",i.StatusAvailable="StatusAvailable",i.StatusNone="StatusNone",i.StatusPartiallyAvailable="StatusPartiallyAvailable",i.StatusUnavailable="StatusUnavailable",i.StopProgressFreestanding="StopProgressFreestanding",i.StopProgress="StopProgress",i.TrashEmpty="TrashEmpty",i.TrashFull="TrashFull",i.User="User",i.UserAccounts="UserAccounts",i.UserGroup="UserGroup",i.UserGuest="UserGuest",i))(Z||{});function V([t,e,n]){switch(n){case"Submenu":return new m(t,e);case"Predefined":return new G(t,e);case"Check":return new b(t,e);case"Icon":return new k(t,e);case"MenuItem":default:return new p(t,e)}}var I,O,C=class extends _{constructor(n,s,a){super(n);c(this,I,void 0);c(this,O,void 0);d(this,I,s),d(this,O,a)}get id(){return l(this,I)}get kind(){return l(this,O)}static async _new(n,s){return r("plugin:menu|new",{kind:n,opts:s})}};I=new WeakMap,O=new WeakMap;var v=class extends C{constructor(e,n,s){super(e,n,s)}async append(e){return r("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.kind,n.rid])})}async prepend(e){return r("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.kind,n.rid])})}async insert(e,n){return r("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(s=>[s.kind,s.rid]),position:n})}async remove(e){return r("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.kind,e.rid]})}async removeAt(e){return r("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(V)}async items(){return r("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(V))}async get(e){return r("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(V)}async popup(e,n){return r("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},f=class extends v{constructor(e,n){super(e,n,"Menu")}static async new(e){return super._new("Menu",e).then(([n,s])=>new f(n,s))}static async default(){return r("plugin:menu|default").then(([e,n])=>new f(e,n))}async setAsAppMenu(){return r("plugin:menu|set_as_app_menu",{rid:this.rid,kind:this.kind})}async setAsWindowMenu(e){return r("plugin:menu|set_as_window_menu",{rid:this.rid,kind:this.kind,window:e})}},E=class extends C{async setText(e){return r("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async text(){return r("plugin:menu|text",{rid:this.rid,kind:this.kind})}},F=class extends E{async setEnabled(e){return r("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async isEnabled(){return r("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}},M=class extends F{async setAccelerator(e){return r("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},p=class extends M{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return super._new("MenuItem",e).then(([n,s])=>new p(n,s))}},m=class extends v{constructor(e,n){super(e,n,"Submenu")}static async new(e){return super._new("Submenu",e).then(([n,s])=>new m(n,s))}async setAsWindowsMenuForNSApp(){return r("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid,kind:this.kind})}async setAsHelpMenuForNSApp(){return r("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid,kind:this.kind})}};J(m,F);var G=class extends E{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return super._new("MenuItem",e).then(([n,s])=>new p(n,s))}},b=class extends M{constructor(e,n){super(e,n,"Check")}static async new(e){return super._new("Check",e).then(([n,s])=>new b(n,s))}async setChecked(e){return r("plugin:menu|set_checked",{rid:this.rid,kind:this.kind,checked:e})}async isChecked(){return r("plugin:menu|is_checked",{rid:this.rid,kind:this.kind})}},k=class extends M{constructor(e,n){super(e,n,"Icon")}static async new(e){return super._new("Icon",e).then(([n,s])=>new k(n,s))}async setIcon(e){return r("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return r("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};var He=r;return ne(Ve);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index bf0d2d8ba1e..054b90eaeff 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -811,6 +811,7 @@ impl App { fn register_core_plugins(&self) -> crate::Result<()> { self.handle.plugin(crate::path::init())?; self.handle.plugin(crate::event::init())?; + self.handle.plugin(crate::resources::plugin::init())?; self.handle.plugin(crate::menu::plugin::init())?; #[cfg(all(desktop, feature = "tray-icon"))] self.handle.plugin(crate::tray::plugin::init())?; diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 12fcf23a5c6..513b3d34c98 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -168,7 +168,7 @@ pub type Result = std::result::Result; /// A task to run on the main thread. pub type SyncTask = Box; -use serde::Serialize; +use serde::{Deserialize, Serialize}; use std::{ collections::HashMap, fmt::{self, Debug}, @@ -913,6 +913,40 @@ mod tests { } } +#[derive(Deserialize)] +#[serde(untagged)] +pub(crate) enum IconDto { + #[cfg(any(feature = "icon-png", feature = "icon-ico"))] + File(std::path::PathBuf), + #[cfg(any(feature = "icon-png", feature = "icon-ico"))] + Raw(Vec), + Rgba { + rgba: Vec, + width: u32, + height: u32, + }, +} + +impl From for Icon { + fn from(icon: IconDto) -> Self { + match icon { + #[cfg(any(feature = "icon-png", feature = "icon-ico"))] + IconDto::File(path) => Self::File(path), + #[cfg(any(feature = "icon-png", feature = "icon-ico"))] + IconDto::Raw(raw) => Self::Raw(raw), + IconDto::Rgba { + rgba, + width, + height, + } => Self::Rgba { + rgba, + width, + height, + }, + } + } +} + #[allow(unused)] macro_rules! run_main_thread { ($self:ident, $ex:expr) => {{ diff --git a/core/tauri/src/menu/check.rs b/core/tauri/src/menu/check.rs index 28d90990f2e..7898214f72c 100644 --- a/core/tauri/src/menu/check.rs +++ b/core/tauri/src/menu/check.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use crate::{menu::MenuId, run_main_thread, AppHandle, Manager, Runtime}; +use crate::{menu::MenuId, resources::Resource, run_main_thread, AppHandle, Manager, Runtime}; /// A menu item inside a [`Menu`] or [`Submenu`] and contains only text. /// @@ -31,7 +31,7 @@ unsafe impl Sync for CheckMenuItem {} unsafe impl Send for CheckMenuItem {} impl super::sealed::IsMenuItemBase for CheckMenuItem { - fn inner(&self) -> &dyn muda::IsMenuItem { + fn inner_muda(&self) -> &dyn muda::IsMenuItem { &self.inner } } @@ -146,3 +146,5 @@ impl CheckMenuItem { run_main_thread!(self, |self_: Self| self_.inner.set_checked(checked)) } } + +impl Resource for CheckMenuItem {} diff --git a/core/tauri/src/menu/icon.rs b/core/tauri/src/menu/icon.rs index 699a0ea9f49..b6242e96cf0 100644 --- a/core/tauri/src/menu/icon.rs +++ b/core/tauri/src/menu/icon.rs @@ -3,7 +3,9 @@ // SPDX-License-Identifier: MIT use super::NativeIcon; -use crate::{menu::MenuId, run_main_thread, AppHandle, Icon, Manager, Runtime}; +use crate::{ + menu::MenuId, resources::Resource, run_main_thread, AppHandle, Icon, Manager, Runtime, +}; /// A menu item inside a [`Menu`] or [`Submenu`] and contains only text. /// @@ -32,7 +34,7 @@ unsafe impl Sync for IconMenuItem {} unsafe impl Send for IconMenuItem {} impl super::sealed::IsMenuItemBase for IconMenuItem { - fn inner(&self) -> &dyn muda::IsMenuItem { + fn inner_muda(&self) -> &dyn muda::IsMenuItem { &self.inner } } @@ -214,3 +216,5 @@ impl IconMenuItem { Ok(()) } } + +impl Resource for IconMenuItem {} diff --git a/core/tauri/src/menu/menu.rs b/core/tauri/src/menu/menu.rs index a29ecb3300d..094baf30356 100644 --- a/core/tauri/src/menu/menu.rs +++ b/core/tauri/src/menu/menu.rs @@ -4,6 +4,7 @@ use super::sealed::ContextMenuBase; use super::{AboutMetadata, IsMenuItem, MenuItemKind, PredefinedMenuItem, Submenu}; +use crate::resources::Resource; use crate::Window; use crate::{run_main_thread, AppHandle, Manager, Position, Runtime}; use muda::ContextMenu; @@ -84,11 +85,11 @@ impl ContextMenuBase for Menu { } }) } - fn inner(&self) -> &dyn muda::ContextMenu { + fn inner_context(&self) -> &dyn muda::ContextMenu { &self.inner } - fn inner_owned(&self) -> Box { + fn inner_context_owned(&self) -> Box { Box::new(self.clone().inner) } } @@ -261,8 +262,10 @@ impl Menu { /// [`Submenu`]: super::Submenu pub fn append(&self, item: &dyn IsMenuItem) -> crate::Result<()> { let kind = item.kind(); - run_main_thread!(self, |self_: Self| self_.inner.append(kind.inner().inner()))? - .map_err(Into::into) + run_main_thread!(self, |self_: Self| self_ + .inner + .append(kind.inner().inner_muda()))? + .map_err(Into::into) } /// Add menu items to the end of this menu. It calls [`Menu::append`] in a loop internally. @@ -291,7 +294,7 @@ impl Menu { let kind = item.kind(); run_main_thread!(self, |self_: Self| self_ .inner - .prepend(kind.inner().inner()))? + .prepend(kind.inner().inner_muda()))? .map_err(Into::into) } @@ -317,7 +320,7 @@ impl Menu { let kind = item.kind(); run_main_thread!(self, |self_: Self| self_ .inner - .insert(kind.inner().inner(), position))? + .insert(kind.inner().inner_muda(), position))? .map_err(Into::into) } @@ -339,8 +342,18 @@ impl Menu { /// Remove a menu item from this menu. pub fn remove(&self, item: &dyn IsMenuItem) -> crate::Result<()> { let kind = item.kind(); - run_main_thread!(self, |self_: Self| self_.inner.remove(kind.inner().inner()))? - .map_err(Into::into) + run_main_thread!(self, |self_: Self| self_ + .inner + .remove(kind.inner().inner_muda()))? + .map_err(Into::into) + } + + /// Remove the menu item at the specified position from this menu and returns it. + pub fn remove_at(&self, position: usize) -> crate::Result>> { + run_main_thread!(self, |self_: Self| self_ + .inner + .remove_at(position) + .map(|i| MenuItemKind::from_muda(self_.app_handle.clone(), i))) } /// Retrieves the menu item matching the given identifier. @@ -358,40 +371,27 @@ impl Menu { /// Returns a list of menu items that has been added to this menu. pub fn items(&self) -> crate::Result>> { - let handle = self.app_handle.clone(); run_main_thread!(self, |self_: Self| self_ .inner .items() .into_iter() - .map(|i| match i { - muda::MenuItemKind::MenuItem(i) => super::MenuItemKind::MenuItem(super::MenuItem { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }), - muda::MenuItemKind::Submenu(i) => super::MenuItemKind::Submenu(super::Submenu { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }), - muda::MenuItemKind::Predefined(i) => { - super::MenuItemKind::Predefined(super::PredefinedMenuItem { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }) - } - muda::MenuItemKind::Check(i) => super::MenuItemKind::Check(super::CheckMenuItem { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }), - muda::MenuItemKind::Icon(i) => super::MenuItemKind::Icon(super::IconMenuItem { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }), - }) + .map(|i| MenuItemKind::from_muda(self_.app_handle.clone(), i)) .collect::>()) } + + /// Set this menu as the application menu. + /// + /// This is an alias for [`AppHandle::set_menu`]. + pub fn set_as_app_menu(&self) -> crate::Result>> { + self.app_handle.set_menu(self.clone()) + } + + /// Set this menu as the window menu. + /// + /// This is an alias for [`Window::set_menu`]. + pub fn set_as_window_menu(&self, window: &Window) -> crate::Result>> { + window.set_menu(self.clone()) + } } + +impl Resource for Menu {} diff --git a/core/tauri/src/menu/mod.rs b/core/tauri/src/menu/mod.rs index 5a68b5af94f..af59df3d3d8 100644 --- a/core/tauri/src/menu/mod.rs +++ b/core/tauri/src/menu/mod.rs @@ -23,9 +23,10 @@ pub use icon::IconMenuItem; pub use menu::{Menu, HELP_SUBMENU_ID, WINDOW_SUBMENU_ID}; pub use normal::MenuItem; pub use predefined::PredefinedMenuItem; +use serde::Deserialize; pub use submenu::Submenu; -use crate::{Icon, Runtime}; +use crate::{AppHandle, Icon, Runtime}; pub use muda::MenuId; /// Describes a menu event emitted when a menu item is activated @@ -234,7 +235,7 @@ impl From for muda::AboutMetadata { /// ## Platform-specific: /// /// - **Windows / Linux**: Unsupported. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Deserialize)] pub enum NativeIcon { /// An add item template image. Add, @@ -450,6 +451,36 @@ impl MenuItemKind { } } + pub(crate) fn from_muda(app_handle: AppHandle, i: muda::MenuItemKind) -> Self { + match i { + muda::MenuItemKind::MenuItem(i) => Self::MenuItem(MenuItem { + id: i.id().clone(), + inner: i, + app_handle, + }), + muda::MenuItemKind::Submenu(i) => Self::Submenu(Submenu { + id: i.id().clone(), + inner: i, + app_handle, + }), + muda::MenuItemKind::Predefined(i) => Self::Predefined(PredefinedMenuItem { + id: i.id().clone(), + inner: i, + app_handle, + }), + muda::MenuItemKind::Check(i) => Self::Check(CheckMenuItem { + id: i.id().clone(), + inner: i, + app_handle, + }), + muda::MenuItemKind::Icon(i) => Self::Icon(IconMenuItem { + id: i.id().clone(), + inner: i, + app_handle, + }), + } + } + /// Casts this item to a [`MenuItem`], and returns `None` if it wasn't. pub fn as_menuitem(&self) -> Option<&MenuItem> { match self { @@ -544,8 +575,8 @@ impl Clone for MenuItemKind { } impl sealed::IsMenuItemBase for MenuItemKind { - fn inner(&self) -> &dyn muda::IsMenuItem { - self.inner().inner() + fn inner_muda(&self) -> &dyn muda::IsMenuItem { + self.inner().inner_muda() } } @@ -594,12 +625,12 @@ pub trait ContextMenu: sealed::ContextMenuBase + Send + Sync { pub(crate) mod sealed { pub trait IsMenuItemBase { - fn inner(&self) -> &dyn muda::IsMenuItem; + fn inner_muda(&self) -> &dyn muda::IsMenuItem; } pub trait ContextMenuBase { - fn inner(&self) -> &dyn muda::ContextMenu; - fn inner_owned(&self) -> Box; + fn inner_context(&self) -> &dyn muda::ContextMenu; + fn inner_context_owned(&self) -> Box; fn popup_inner>( &self, window: crate::Window, diff --git a/core/tauri/src/menu/normal.rs b/core/tauri/src/menu/normal.rs index a7eeb3e6b71..cd1f64bca0a 100644 --- a/core/tauri/src/menu/normal.rs +++ b/core/tauri/src/menu/normal.rs @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use crate::{menu::MenuId, run_main_thread, AppHandle, Manager, Runtime}; +use crate::{menu::MenuId, resources::Resource, run_main_thread, AppHandle, Manager, Runtime}; /// A menu item inside a [`Menu`] or [`Submenu`] and contains only text. /// @@ -31,7 +31,7 @@ unsafe impl Sync for MenuItem {} unsafe impl Send for MenuItem {} impl super::sealed::IsMenuItemBase for MenuItem { - fn inner(&self) -> &dyn muda::IsMenuItem { + fn inner_muda(&self) -> &dyn muda::IsMenuItem { &self.inner } } @@ -132,3 +132,5 @@ impl MenuItem { run_main_thread!(self, |self_: Self| self_.inner.set_accelerator(accel))?.map_err(Into::into) } } + +impl Resource for MenuItem {} diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index a2680482815..b8ecc754798 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -2,13 +2,485 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +use serde::{Deserialize, Serialize}; + +use super::*; use crate::{ + command, plugin::{Builder, TauriPlugin}, - Runtime, + resources::ResourceId, + AppHandle, IconDto, Manager, Runtime, }; +#[derive(Deserialize, Serialize)] +pub(crate) enum ItemKind { + Menu, + MenuItem, + Predefined, + Submenu, + Check, + Icon, +} + +#[derive(Deserialize)] +pub(crate) struct AboutMetadata { + pub name: Option, + pub version: Option, + pub short_version: Option, + pub authors: Option>, + pub comments: Option, + pub copyright: Option, + pub license: Option, + pub website: Option, + pub website_label: Option, + pub credits: Option, + pub icon: Option, +} + +impl From for super::AboutMetadata { + fn from(value: AboutMetadata) -> Self { + Self { + name: value.name, + version: value.version, + short_version: value.short_version, + authors: value.authors, + comments: value.comments, + copyright: value.copyright, + license: value.license, + website: value.website, + website_label: value.website_label, + credits: value.credits, + icon: value.icon.map(Into::into), + } + } +} + +#[derive(Deserialize)] +enum Predefined { + Separator, + Copy, + Cut, + Paste, + SelectAll, + Undo, + Redo, + Minimize, + Maximize, + Fullscreen, + Hide, + HideOthers, + ShowAll, + CloseWindow, + Quit, + About(Option), + Services, +} + +#[derive(Deserialize, Default)] +#[serde(rename_all = "camelCase")] +struct NewOptions { + id: Option, + text: Option, + enabled: Option, + checked: Option, + accelerator: Option, + #[serde(rename = "item")] + predefined_item: Option, + icon: Option, + native_icon: Option, + items: Option>, +} + +macro_rules! do_item { + ($resources_table:ident, $rid:ident, $kind:ident, $ex:expr) => { + match $kind { + ItemKind::Submenu => { + let item = $resources_table.get::>($rid)?; + $ex(&*item) + } + ItemKind::MenuItem => { + let item = $resources_table.get::>($rid)?; + $ex(&*item) + } + ItemKind::Predefined => { + let item = $resources_table.get::>($rid)?; + $ex(&*item) + } + ItemKind::Check => { + let item = $resources_table.get::>($rid)?; + $ex(&*item) + } + ItemKind::Icon => { + let item = $resources_table.get::>($rid)?; + $ex(&*item) + } + _ => unreachable!(), + } + }; +} + +#[command(root = "crate")] +fn new( + app: AppHandle, + kind: ItemKind, + options: Option, +) -> crate::Result<(ResourceId, MenuId)> { + let options = options.unwrap_or_default(); + let mut resources_table = app.manager.resources_table(); + + match kind { + ItemKind::Menu => { + let mut builder = MenuBuilder::new(&app); + if let Some(id) = options.id { + builder = builder.id(id); + } + if let Some(items) = options.items { + for (rid, kind) in items { + builder = do_item!(resources_table, rid, kind, |i| builder.item(i)); + } + } + let menu = builder.build()?; + let id = menu.id().clone(); + let rid = resources_table.add(menu); + Some((rid, id)) + } + + ItemKind::Submenu => { + let mut builder = SubmenuBuilder::new(&app, options.text.unwrap_or_default()); + if let Some(id) = options.id { + builder = builder.id(id); + } + if let Some(items) = options.items { + for (rid, kind) in items { + builder = do_item!(resources_table, rid, kind, |i| builder.item(i)); + } + } + + let submenu = builder.build()?; + let id = submenu.id().clone(); + let rid = resources_table.add(submenu); + Some((rid, id)) + } + + ItemKind::MenuItem => { + let mut builder = MenuItemBuilder::new(options.text.unwrap_or_default()); + if let Some(accelerator) = options.accelerator { + builder = builder.accelerator(accelerator); + } + if let Some(enabled) = options.enabled { + builder = builder.enabled(enabled); + } + let item = builder.build(&app); + let id = item.id().clone(); + let rid = resources_table.add(item); + Some((rid, id)) + } + + ItemKind::Predefined => { + let item = match options.predefined_item.unwrap() { + Predefined::Separator => PredefinedMenuItem::separator(&app), + Predefined::Copy => PredefinedMenuItem::copy(&app, options.text.as_deref()), + Predefined::Cut => PredefinedMenuItem::cut(&app, options.text.as_deref()), + Predefined::Paste => PredefinedMenuItem::paste(&app, options.text.as_deref()), + Predefined::SelectAll => PredefinedMenuItem::select_all(&app, options.text.as_deref()), + Predefined::Undo => PredefinedMenuItem::undo(&app, options.text.as_deref()), + Predefined::Redo => PredefinedMenuItem::redo(&app, options.text.as_deref()), + Predefined::Minimize => PredefinedMenuItem::minimize(&app, options.text.as_deref()), + Predefined::Maximize => PredefinedMenuItem::maximize(&app, options.text.as_deref()), + Predefined::Fullscreen => PredefinedMenuItem::fullscreen(&app, options.text.as_deref()), + Predefined::Hide => PredefinedMenuItem::hide(&app, options.text.as_deref()), + Predefined::HideOthers => PredefinedMenuItem::hide_others(&app, options.text.as_deref()), + Predefined::ShowAll => PredefinedMenuItem::show_all(&app, options.text.as_deref()), + Predefined::CloseWindow => PredefinedMenuItem::close_window(&app, options.text.as_deref()), + Predefined::Quit => PredefinedMenuItem::quit(&app, options.text.as_deref()), + Predefined::About(metadata) => { + PredefinedMenuItem::about(&app, options.text.as_deref(), metadata.map(Into::into)) + } + Predefined::Services => PredefinedMenuItem::services(&app, options.text.as_deref()), + }; + let id = item.id().clone(); + let rid = resources_table.add(item); + Some((rid, id)) + } + + ItemKind::Check => { + let mut builder = CheckMenuItemBuilder::new(options.text.unwrap_or_default()); + if let Some(accelerator) = options.accelerator { + builder = builder.accelerator(accelerator); + } + if let Some(enabled) = options.enabled { + builder = builder.enabled(enabled); + } + if let Some(checked) = options.checked { + builder = builder.checked(checked); + } + let item = builder.build(&app); + let id = item.id().clone(); + let rid = resources_table.add(item); + Some((rid, id)) + } + + ItemKind::Icon => { + let mut builder = IconMenuItemBuilder::new(options.text.unwrap_or_default()); + if let Some(accelerator) = options.accelerator { + builder = builder.accelerator(accelerator); + } + if let Some(enabled) = options.enabled { + builder = builder.enabled(enabled); + } + if let Some(native_icon) = options.native_icon { + builder = builder.native_icon(native_icon.into()); + } + if let Some(icon) = options.icon { + builder = builder.icon(icon.into()); + } + let item = builder.build(&app); + let id = item.id().clone(); + let rid = resources_table.add(item); + Some((rid, id)) + } + }; + + Ok((0, "".into())) +} + +#[command(root = "crate")] +fn append( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + items: Vec<(ResourceId, ItemKind)>, +) -> crate::Result<()> { + let resources_table = app.manager.resources_table(); + match kind { + ItemKind::Menu => { + let menu = resources_table.get::>(rid)?; + for (rid, kind) in items { + do_item!(resources_table, rid, kind, |i| menu.append(i))?; + } + } + ItemKind::Submenu => { + let submenu = resources_table.get::>(rid)?; + for (rid, kind) in items { + do_item!(resources_table, rid, kind, |i| submenu.append(i))?; + } + } + _ => unreachable!(), + }; + + Ok(()) +} + +#[command(root = "crate")] +fn prepend( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + items: Vec<(ResourceId, ItemKind)>, +) -> crate::Result<()> { + let resources_table = app.manager.resources_table(); + match kind { + ItemKind::Menu => { + let menu = resources_table.get::>(rid)?; + for (rid, kind) in items { + do_item!(resources_table, rid, kind, |i| menu.prepend(i))?; + } + } + ItemKind::Submenu => { + let submenu = resources_table.get::>(rid)?; + for (rid, kind) in items { + do_item!(resources_table, rid, kind, |i| submenu.prepend(i))?; + } + } + _ => unreachable!(), + }; + + Ok(()) +} + +#[command(root = "crate")] +fn insert( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + items: Vec<(ResourceId, ItemKind)>, + mut position: usize, +) -> crate::Result<()> { + let resources_table = app.manager.resources_table(); + match kind { + ItemKind::Menu => { + let menu = resources_table.get::>(rid)?; + for (rid, kind) in items { + do_item!(resources_table, rid, kind, |i| menu.insert(i, position))?; + position += 1 + } + } + ItemKind::Submenu => { + let submenu = resources_table.get::>(rid)?; + for (rid, kind) in items { + do_item!(resources_table, rid, kind, |i| submenu.insert(i, position))?; + position += 1 + } + } + _ => unreachable!(), + }; + + Ok(()) +} + +#[command(root = "crate")] +fn remove( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + item: (ResourceId, ItemKind), +) -> crate::Result<()> { + let (item_rid, item_kind) = item; + let resources_table = app.manager.resources_table(); + match kind { + ItemKind::Menu => { + let menu = resources_table.get::>(rid)?; + do_item!(resources_table, item_rid, item_kind, |i| menu.remove(i))?; + } + ItemKind::Submenu => { + let submenu = resources_table.get::>(rid)?; + do_item!(resources_table, item_rid, item_kind, |i| submenu.remove(i))?; + } + _ => unreachable!(), + }; + + Ok(()) +} + +macro_rules! make_item_resource { + ($resources_table:ident, $item:ident) => {{ + let id = $item.id().clone(); + let (rid, kind) = match $item { + MenuItemKind::MenuItem(i) => ($resources_table.add(i), ItemKind::MenuItem), + MenuItemKind::Submenu(i) => ($resources_table.add(i), ItemKind::Submenu), + MenuItemKind::Predefined(i) => ($resources_table.add(i), ItemKind::Predefined), + MenuItemKind::Check(i) => ($resources_table.add(i), ItemKind::Check), + MenuItemKind::Icon(i) => ($resources_table.add(i), ItemKind::Icon), + }; + (rid, id, kind) + }}; +} + +#[command(root = "crate")] +fn remove_at( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + position: usize, +) -> crate::Result> { + let mut resources_table = app.manager.resources_table(); + match kind { + ItemKind::Menu => { + let menu = resources_table.get::>(rid)?; + if let Some(item) = menu.remove_at(position)? { + return Ok(Some(make_item_resource!(resources_table, item))); + } + } + ItemKind::Submenu => { + let submenu = resources_table.get::>(rid)?; + if let Some(item) = submenu.remove_at(position)? { + return Ok(Some(make_item_resource!(resources_table, item))); + } + } + _ => unreachable!(), + }; + + Ok(None) +} + +#[command(root = "crate")] +fn items( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, +) -> crate::Result> { + let mut resources_table = app.manager.resources_table(); + let items = match kind { + ItemKind::Menu => resources_table.get::>(rid)?.items()?, + ItemKind::Submenu => resources_table.get::>(rid)?.items()?, + _ => unreachable!(), + }; + + Ok( + items + .into_iter() + .map(|i| make_item_resource!(resources_table, i)) + .collect::>(), + ) +} + +#[command(root = "crate")] +fn get( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + id: MenuId, +) -> crate::Result> { + let mut resources_table = app.manager.resources_table(); + match kind { + ItemKind::Menu => { + let menu = resources_table.get::>(rid)?; + if let Some(item) = menu.get(&id) { + return Ok(Some(make_item_resource!(resources_table, item))); + } + } + ItemKind::Submenu => { + let submenu = resources_table.get::>(rid)?; + if let Some(item) = submenu.get(&id) { + return Ok(Some(make_item_resource!(resources_table, item))); + } + } + _ => unreachable!(), + }; + + Ok(None) +} + +#[command(root = "crate")] +fn popup( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + window: String, + position: (u32, u32), +) -> crate::Result<()> { + if let Some(window) = app.get_window(&window) { + let position = crate::Position::Logical(position.into()); + let resources_table = app.manager.resources_table(); + match kind { + ItemKind::Menu => { + let menu = resources_table.get::>(rid)?; + menu.popup_at(window, position)?; + } + ItemKind::Submenu => { + let submenu = resources_table.get::>(rid)?; + submenu.popup_at(window, position)?; + } + _ => unreachable!(), + }; + } + + Ok(()) +} + +#[command(root = "crate")] +fn default(app: AppHandle) -> crate::Result<(ResourceId, MenuId)> { + let mut resources_table = app.manager.resources_table(); + let menu = Menu::default(&app)?; + let id = menu.id().clone(); + let rid = resources_table.add(menu); + Ok((rid, id)) +} + pub(crate) fn init() -> TauriPlugin { Builder::new("menu") - .invoke_handler(crate::generate_handler![]) + .invoke_handler(crate::generate_handler![ + new, append, prepend, insert, remove, remove_at, items, get, popup, default + ]) .build() } diff --git a/core/tauri/src/menu/predefined.rs b/core/tauri/src/menu/predefined.rs index 44c6aff01d6..19dc0bce723 100644 --- a/core/tauri/src/menu/predefined.rs +++ b/core/tauri/src/menu/predefined.rs @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MIT use super::AboutMetadata; -use crate::{menu::MenuId, run_main_thread, AppHandle, Manager, Runtime}; +use crate::{menu::MenuId, resources::Resource, run_main_thread, AppHandle, Manager, Runtime}; /// A predefined (native) menu item which has a predfined behavior by the OS or by this crate. pub struct PredefinedMenuItem { @@ -29,7 +29,7 @@ unsafe impl Sync for PredefinedMenuItem {} unsafe impl Send for PredefinedMenuItem {} impl super::sealed::IsMenuItemBase for PredefinedMenuItem { - fn inner(&self) -> &dyn muda::IsMenuItem { + fn inner_muda(&self) -> &dyn muda::IsMenuItem { &self.inner } } @@ -285,3 +285,5 @@ impl PredefinedMenuItem { &self.app_handle } } + +impl Resource for PredefinedMenuItem {} diff --git a/core/tauri/src/menu/submenu.rs b/core/tauri/src/menu/submenu.rs index 905f04830c9..49974c27641 100644 --- a/core/tauri/src/menu/submenu.rs +++ b/core/tauri/src/menu/submenu.rs @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MIT use super::{sealed::ContextMenuBase, IsMenuItem, MenuItemKind}; -use crate::{run_main_thread, AppHandle, Manager, Position, Runtime, Window}; +use crate::{resources::Resource, run_main_thread, AppHandle, Manager, Position, Runtime, Window}; use muda::{ContextMenu, MenuId}; /// A type that is a submenu inside a [`Menu`] or [`Submenu`] @@ -33,7 +33,7 @@ impl Clone for Submenu { } impl super::sealed::IsMenuItemBase for Submenu { - fn inner(&self) -> &dyn muda::IsMenuItem { + fn inner_muda(&self) -> &dyn muda::IsMenuItem { &self.inner } } @@ -95,11 +95,11 @@ impl ContextMenuBase for Submenu { }) } - fn inner(&self) -> &dyn muda::ContextMenu { + fn inner_context(&self) -> &dyn muda::ContextMenu { &self.inner } - fn inner_owned(&self) -> Box { + fn inner_context_owned(&self) -> Box { Box::new(self.clone().inner) } } @@ -173,8 +173,10 @@ impl Submenu { /// Add a menu item to the end of this submenu. pub fn append(&self, item: &dyn IsMenuItem) -> crate::Result<()> { let kind = item.kind(); - run_main_thread!(self, |self_: Self| self_.inner.append(kind.inner().inner()))? - .map_err(Into::into) + run_main_thread!(self, |self_: Self| self_ + .inner + .append(kind.inner().inner_muda()))? + .map_err(Into::into) } /// Add menu items to the end of this submenu. It calls [`Submenu::append`] in a loop internally. @@ -190,7 +192,7 @@ impl Submenu { pub fn prepend(&self, item: &dyn IsMenuItem) -> crate::Result<()> { let kind = item.kind(); run_main_thread!(self, |self_: Self| { - self_.inner.prepend(kind.inner().inner()) + self_.inner.prepend(kind.inner().inner_muda()) })? .map_err(Into::into) } @@ -204,7 +206,7 @@ impl Submenu { pub fn insert(&self, item: &dyn IsMenuItem, position: usize) -> crate::Result<()> { let kind = item.kind(); run_main_thread!(self, |self_: Self| { - self_.inner.insert(kind.inner().inner(), position) + self_.inner.insert(kind.inner().inner_muda(), position) })? .map_err(Into::into) } @@ -221,47 +223,41 @@ impl Submenu { /// Remove a menu item from this submenu. pub fn remove(&self, item: &dyn IsMenuItem) -> crate::Result<()> { let kind = item.kind(); - run_main_thread!(self, |self_: Self| self_.inner.remove(kind.inner().inner()))? - .map_err(Into::into) + run_main_thread!(self, |self_: Self| self_ + .inner + .remove(kind.inner().inner_muda()))? + .map_err(Into::into) + } + + /// Remove the menu item at the specified position from this submenu and returns it. + pub fn remove_at(&self, position: usize) -> crate::Result>> { + run_main_thread!(self, |self_: Self| self_ + .inner + .remove_at(position) + .map(|i| MenuItemKind::from_muda(self_.app_handle.clone(), i))) + } + + /// Retrieves the menu item matching the given identifier. + pub fn get<'a, I>(&self, id: &'a I) -> Option> + where + I: ?Sized, + MenuId: PartialEq<&'a I>, + { + self + .items() + .unwrap_or_default() + .into_iter() + .find(|i| i.id() == &id) } /// Returns a list of menu items that has been added to this submenu. pub fn items(&self) -> crate::Result>> { - let handle = self.app_handle.clone(); run_main_thread!(self, |self_: Self| { self_ .inner .items() .into_iter() - .map(|i| match i { - muda::MenuItemKind::MenuItem(i) => super::MenuItemKind::MenuItem(super::MenuItem { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }), - muda::MenuItemKind::Submenu(i) => super::MenuItemKind::Submenu(super::Submenu { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }), - muda::MenuItemKind::Predefined(i) => { - super::MenuItemKind::Predefined(super::PredefinedMenuItem { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }) - } - muda::MenuItemKind::Check(i) => super::MenuItemKind::Check(super::CheckMenuItem { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }), - muda::MenuItemKind::Icon(i) => super::MenuItemKind::Icon(super::IconMenuItem { - id: i.id().clone(), - inner: i, - app_handle: handle.clone(), - }), - }) + .map(|i| MenuItemKind::from_muda(self_.app_handle.clone(), i)) .collect::>() }) } @@ -312,17 +308,6 @@ impl Submenu { run_main_thread!(self, |self_: Self| self_.inner.set_as_help_menu_for_nsapp())?; Ok(()) } - - /// Retrieves the menu item matching the given identifier. - pub fn get<'a, I>(&self, id: &'a I) -> Option> - where - I: ?Sized, - MenuId: PartialEq<&'a I>, - { - self - .items() - .unwrap_or_default() - .into_iter() - .find(|i| i.id() == &id) - } } + +impl Resource for Submenu {} diff --git a/core/tauri/src/resources.rs b/core/tauri/src/resources/mod.rs similarity index 99% rename from core/tauri/src/resources.rs rename to core/tauri/src/resources/mod.rs index 7204e71ec1d..95dd3a6bf14 100644 --- a/core/tauri/src/resources.rs +++ b/core/tauri/src/resources/mod.rs @@ -5,6 +5,8 @@ // a modified version of https://github.com/denoland/deno/blob/0ae83847f498a2886ae32172e50fd5bdbab2f524/core/resources.rs#L220 +pub(crate) mod plugin; + use crate::error::Error; use std::{ any::{type_name, Any, TypeId}, diff --git a/core/tauri/src/resources/plugin.rs b/core/tauri/src/resources/plugin.rs new file mode 100644 index 00000000000..3103034b0d5 --- /dev/null +++ b/core/tauri/src/resources/plugin.rs @@ -0,0 +1,18 @@ +use crate::{ + command, + plugin::{Builder, TauriPlugin}, + AppHandle, Runtime, +}; + +use super::ResourceId; + +#[command(root = "crate")] +fn close(app: AppHandle, rid: ResourceId) -> crate::Result<()> { + app.manager.resources_table().close(rid) +} + +pub(crate) fn init() -> TauriPlugin { + Builder::new("resources") + .invoke_handler(crate::generate_handler![close]) + .build() +} diff --git a/core/tauri/src/tray/mod.rs b/core/tauri/src/tray/mod.rs index 4efa19ac6dd..8df5d5317d5 100644 --- a/core/tauri/src/tray/mod.rs +++ b/core/tauri/src/tray/mod.rs @@ -148,7 +148,7 @@ impl TrayIconBuilder { /// /// - **Linux**: once a menu is set, it cannot be removed or replaced but you can change its content. pub fn menu(mut self, menu: &M) -> Self { - self.inner = self.inner.with_menu(menu.inner_owned()); + self.inner = self.inner.with_menu(menu.inner_context_owned()); self } @@ -369,7 +369,7 @@ impl TrayIcon { pub fn set_menu(&self, menu: Option) -> crate::Result<()> { run_main_thread!(self, |self_: Self| self_ .inner - .set_menu(menu.map(|m| m.inner_owned()))) + .set_menu(menu.map(|m| m.inner_context_owned()))) } /// Sets the tooltip for this tray icon. diff --git a/core/tauri/src/tray/plugin.rs b/core/tauri/src/tray/plugin.rs index 8efc3581096..8dad79c9f0c 100644 --- a/core/tauri/src/tray/plugin.rs +++ b/core/tauri/src/tray/plugin.rs @@ -2,58 +2,26 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::{path::PathBuf, sync::Arc}; +use std::path::PathBuf; use serde::Deserialize; use crate::{ command, + menu::{plugin::ItemKind, Menu, Submenu}, plugin::{Builder, TauriPlugin}, resources::ResourceId, tray::TrayIconBuilder, - AppHandle, Icon, Manager, Runtime, + AppHandle, IconDto, Manager, Runtime, }; use super::TrayIcon; #[derive(Deserialize)] -#[serde(untagged)] -pub enum IconDto { - #[cfg(any(feature = "icon-png", feature = "icon-ico"))] - File(std::path::PathBuf), - #[cfg(any(feature = "icon-png", feature = "icon-ico"))] - Raw(Vec), - Rgba { - rgba: Vec, - width: u32, - height: u32, - }, -} - -impl From for Icon { - fn from(icon: IconDto) -> Self { - match icon { - #[cfg(any(feature = "icon-png", feature = "icon-ico"))] - IconDto::File(path) => Self::File(path), - #[cfg(any(feature = "icon-png", feature = "icon-ico"))] - IconDto::Raw(raw) => Self::Raw(raw), - IconDto::Rgba { - rgba, - width, - height, - } => Self::Rgba { - rgba, - width, - height, - }, - } - } -} - -#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] struct TrayIconOptions { id: Option, - menu: Option, + menu: Option<(ResourceId, ItemKind)>, icon: Option, tooltip: Option, title: Option, @@ -77,8 +45,20 @@ fn new( let _ = tray.app_handle().emit_all("tauri://tray", e); }); - if let Some(_menu) = options.menu { - // builder = builder.menu(menu.into()); TODO + let mut resources_table = app.manager.resources_table(); + + if let Some((rid, kind)) = options.menu { + match kind { + ItemKind::Menu => { + let menu = resources_table.get::>(rid)?; + builder = builder.menu(&*menu); + } + ItemKind::Submenu => { + let submenu = resources_table.get::>(rid)?; + builder = builder.menu(&*submenu); + } + _ => unreachable!(), + }; } if let Some(icon) = options.icon { builder = builder.icon(icon.into()); @@ -101,38 +81,45 @@ fn new( let tray = builder.build(&app)?; let id = tray.id().as_ref().to_string(); - let mut resources_table = app.manager.resources_table(); let rid = resources_table.add(tray); Ok((rid, id)) } -fn with_tray>) -> crate::Result>( - app: &AppHandle, - rid: ResourceId, - f: F, -) -> crate::Result { - let resources_table = app.manager.resources_table(); - let tray = resources_table.get::>(rid)?; - f(tray) -} - #[command(root = "crate")] fn set_icon( app: AppHandle, rid: ResourceId, icon: Option, ) -> crate::Result<()> { - with_tray(&app, rid, |tray| tray.set_icon(icon.map(Into::into))) + let resources_table = app.manager.resources_table(); + let tray = resources_table.get::>(rid)?; + tray.set_icon(icon.map(Into::into)) } #[command(root = "crate")] fn set_menu( app: AppHandle, rid: ResourceId, - menu: Option, + menu: Option<(ResourceId, ItemKind)>, ) -> crate::Result<()> { - // TODO + let resources_table = app.manager.resources_table(); + let tray = resources_table.get::>(rid)?; + if let Some((rid, kind)) = menu { + match kind { + ItemKind::Menu => { + let menu = resources_table.get::>(rid)?; + tray.set_menu(Some((*menu).clone()))?; + } + ItemKind::Submenu => { + let submenu = resources_table.get::>(rid)?; + tray.set_menu(Some((*submenu).clone()))?; + } + _ => unreachable!(), + }; + } else { + tray.set_menu(None::>)?; + } Ok(()) } @@ -142,7 +129,9 @@ fn set_tooltip( rid: ResourceId, tooltip: Option, ) -> crate::Result<()> { - with_tray(&app, rid, |tray| tray.set_tooltip(tooltip)) + let resources_table = app.manager.resources_table(); + let tray = resources_table.get::>(rid)?; + tray.set_tooltip(tooltip) } #[command(root = "crate")] @@ -151,12 +140,16 @@ fn set_title( rid: ResourceId, title: Option, ) -> crate::Result<()> { - with_tray(&app, rid, |tray| tray.set_title(title)) + let resources_table = app.manager.resources_table(); + let tray = resources_table.get::>(rid)?; + tray.set_title(title) } #[command(root = "crate")] fn set_visible(app: AppHandle, rid: ResourceId, visible: bool) -> crate::Result<()> { - with_tray(&app, rid, |tray| tray.set_visible(visible)) + let resources_table = app.manager.resources_table(); + let tray = resources_table.get::>(rid)?; + tray.set_visible(visible) } #[command(root = "crate")] @@ -165,7 +158,9 @@ fn set_temp_dir_path( rid: ResourceId, path: Option, ) -> crate::Result<()> { - with_tray(&app, rid, |tray| tray.set_temp_dir_path(path)) + let resources_table = app.manager.resources_table(); + let tray = resources_table.get::>(rid)?; + tray.set_temp_dir_path(path) } #[command(root = "crate")] @@ -174,7 +169,9 @@ fn set_icon_as_template( rid: ResourceId, as_template: bool, ) -> crate::Result<()> { - with_tray(&app, rid, |tray| tray.set_icon_as_template(as_template)) + let resources_table = app.manager.resources_table(); + let tray = resources_table.get::>(rid)?; + tray.set_icon_as_template(as_template) } #[command(root = "crate")] @@ -183,12 +180,9 @@ fn set_show_menu_on_left_click( rid: ResourceId, on_left: bool, ) -> crate::Result<()> { - with_tray(&app, rid, |tray| tray.set_show_menu_on_left_click(on_left)) -} - -#[command(root = "crate")] -fn destroy(app: AppHandle, rid: ResourceId) -> crate::Result<()> { - app.manager.resources_table().close(rid) + let resources_table = app.manager.resources_table(); + let tray = resources_table.get::>(rid)?; + tray.set_show_menu_on_left_click(on_left) } pub(crate) fn init() -> TauriPlugin { @@ -203,7 +197,6 @@ pub(crate) fn init() -> TauriPlugin { set_temp_dir_path, set_icon_as_template, set_show_menu_on_left_click, - destroy ]) .build() } diff --git a/tooling/api/src/index.ts b/tooling/api/src/index.ts index d03e2e5a652..260979e8377 100644 --- a/tooling/api/src/index.ts +++ b/tooling/api/src/index.ts @@ -17,8 +17,9 @@ import * as event from './event' import * as tauri from './tauri' import * as path from './path' import * as tray from './tray' +import * as menu from './menu' /** @ignore */ const invoke = tauri.invoke -export { invoke, event, path, tauri, tray } +export { invoke, event, path, tauri, tray, menu } diff --git a/tooling/api/src/internal/index.ts b/tooling/api/src/internal/index.ts new file mode 100644 index 00000000000..cdb967d6645 --- /dev/null +++ b/tooling/api/src/internal/index.ts @@ -0,0 +1,47 @@ +import { invoke } from '../tauri' + +/** + * A rust-backed resource. + * + * The resource lives in the main process and does not exist + * in the Javascript world, and thus will not be cleaned up automatiacally + * except on application exit. If you want to clean it up early, call {@linkcode Resource.close} + */ +export class Resource { + #rid: number + + get rid(): number { + return this.#rid + } + + constructor(rid: number) { + this.#rid = rid + } + + /** + * Destroys and cleans up this resource from memory. + * **You should not call any method on this object anymore and should drop any reference to it.** + */ + async close() { + return invoke('plugin:resources|close', { + rid: this.rid + }) + } +} + +/** Extends a base class by other specifed classes */ +export function applyMixins(baseClass: any, extendedClasses: any | any[]) { + ;(Array.isArray(extendedClasses) + ? extendedClasses + : [extendedClasses] + ).forEach((extendedClass) => { + Object.getOwnPropertyNames(extendedClass.prototype).forEach((name) => { + Object.defineProperty( + baseClass.prototype, + name, + Object.getOwnPropertyDescriptor(extendedClass.prototype, name) || + Object.create(null) + ) + }) + }) +} diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 34053b150c2..4d8f764191a 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -2,6 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +import { Resource, applyMixins } from './internal' +import { invoke } from './tauri' + +// TODO: menu builders +// TODO: events or callbacks + /** * Menu types and utilities. * @@ -9,10 +15,542 @@ * @module */ -export interface MenuEvent { +interface MenuEvent { id: string } -export interface ContextMenu { - rid: number +enum NativeIcon { + /** An add item template image. */ + Add = 'Add', + /** Advanced preferences toolbar icon for the preferences window. */ + Advanced = 'Advanced', + /** A Bluetooth template image. */ + Bluetooth = 'Bluetooth', + /** Bookmarks image suitable for a template. */ + Bookmarks = 'Bookmarks', + /** A caution image. */ + Caution = 'Caution', + /** A color panel toolbar icon. */ + ColorPanel = 'ColorPanel', + /** A column view mode template image. */ + ColumnView = 'ColumnView', + /** A computer icon. */ + Computer = 'Computer', + /** An enter full-screen mode template image. */ + EnterFullScreen = 'EnterFullScreen', + /** Permissions for all users. */ + Everyone = 'Everyone', + /** An exit full-screen mode template image. */ + ExitFullScreen = 'ExitFullScreen', + /** A cover flow view mode template image. */ + FlowView = 'FlowView', + /** A folder image. */ + Folder = 'Folder', + /** A burnable folder icon. */ + FolderBurnable = 'FolderBurnable', + /** A smart folder icon. */ + FolderSmart = 'FolderSmart', + /** A link template image. */ + FollowLinkFreestanding = 'FollowLinkFreestanding', + /** A font panel toolbar icon. */ + FontPanel = 'FontPanel', + /** A `go back` template image. */ + GoLeft = 'GoLeft', + /** A `go forward` template image. */ + GoRight = 'GoRight', + /** Home image suitable for a template. */ + Home = 'Home', + /** An iChat Theater template image. */ + IChatTheater = 'IChatTheater', + /** An icon view mode template image. */ + IconView = 'IconView', + /** An information toolbar icon. */ + Info = 'Info', + /** A template image used to denote invalid data. */ + InvalidDataFreestanding = 'InvalidDataFreestanding', + /** A generic left-facing triangle template image. */ + LeftFacingTriangle = 'LeftFacingTriangle', + /** A list view mode template image. */ + ListView = 'ListView', + /** A locked padlock template image. */ + LockLocked = 'LockLocked', + /** An unlocked padlock template image. */ + LockUnlocked = 'LockUnlocked', + /** A horizontal dash, for use in menus. */ + MenuMixedState = 'MenuMixedState', + /** A check mark template image, for use in menus. */ + MenuOnState = 'MenuOnState', + /** A MobileMe icon. */ + MobileMe = 'MobileMe', + /** A drag image for multiple items. */ + MultipleDocuments = 'MultipleDocuments', + /** A network icon. */ + Network = 'Network', + /** A path button template image. */ + Path = 'Path', + /** General preferences toolbar icon for the preferences window. */ + PreferencesGeneral = 'PreferencesGeneral', + /** A Quick Look template image. */ + QuickLook = 'QuickLook', + /** A refresh template image. */ + RefreshFreestanding = 'RefreshFreestanding', + /** A refresh template image. */ + Refresh = 'Refresh', + /** A remove item template image. */ + Remove = 'Remove', + /** A reveal contents template image. */ + RevealFreestanding = 'RevealFreestanding', + /** A generic right-facing triangle template image. */ + RightFacingTriangle = 'RightFacingTriangle', + /** A share view template image. */ + Share = 'Share', + /** A slideshow template image. */ + Slideshow = 'Slideshow', + /** A badge for a `smart` item. */ + SmartBadge = 'SmartBadge', + /** Small green indicator, similar to iChat’s available image. */ + StatusAvailable = 'StatusAvailable', + /** Small clear indicator. */ + StatusNone = 'StatusNone', + /** Small yellow indicator, similar to iChat’s idle image. */ + StatusPartiallyAvailable = 'StatusPartiallyAvailable', + /** Small red indicator, similar to iChat’s unavailable image. */ + StatusUnavailable = 'StatusUnavailable', + /** A stop progress template image. */ + StopProgressFreestanding = 'StopProgressFreestanding', + /** A stop progress button template image. */ + StopProgress = 'StopProgress', + /** An image of the empty trash can. */ + TrashEmpty = 'TrashEmpty', + /** An image of the full trash can. */ + TrashFull = 'TrashFull', + /** Permissions for a single user. */ + User = 'User', + /** User account toolbar icon for the preferences window. */ + UserAccounts = 'UserAccounts', + /** Permissions for a group of users. */ + UserGroup = 'UserGroup', + /** Permissions for guests. */ + UserGuest = 'UserGuest' +} + +type ItemKind = + | 'MenuItem' + | 'Predefined' + | 'Check' + | 'Icon' + | 'Submenu' + | 'Menu' + +function itemFromKind([rid, id, kind]: [number, string, ItemKind]): + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem { + switch (kind) { + case 'Submenu': + return new Submenu(rid, id) + case 'Predefined': + return new PredefinedMenuItem(rid, id) + case 'Check': + return new CheckMenuItem(rid, id) + case 'Icon': + return new IconMenuItem(rid, id) + case 'MenuItem': + default: + return new MenuItem(rid, id) + } +} + +class MenuItemBase extends Resource { + #id: string + #kind: ItemKind + + get id(): string { + return this.#id + } + + get kind(): string { + return this.#kind + } + + constructor(rid: number, id: string, kind: ItemKind) { + super(rid) + this.#id = id + this.#kind = kind + } + + protected static async _new( + kind: ItemKind, + opts?: unknown + ): Promise<[number, string]> { + return invoke('plugin:menu|new', { kind, opts }) + } +} + +class MenuBase extends MenuItemBase { + constructor(rid: number, id: string, kind: ItemKind) { + super(rid, id, kind) + } + + async append< + T extends + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem + >(items: T | T[]) { + return invoke('plugin:menu|append', { + rid: this.rid, + kind: this.kind, + items: (Array.isArray(items) ? items : [items]).map((i) => [ + i.kind, + i.rid + ]) + }) + } + + async prepend< + T extends + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem + >(items: T | T[]) { + return invoke('plugin:menu|prepend', { + rid: this.rid, + kind: this.kind, + items: (Array.isArray(items) ? items : [items]).map((i) => [ + i.kind, + i.rid + ]) + }) + } + + async insert< + T extends + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem + >(items: T | T[], position: number) { + return invoke('plugin:menu|insert', { + rid: this.rid, + kind: this.kind, + items: (Array.isArray(items) ? items : [items]).map((i) => [ + i.kind, + i.rid + ]), + position + }) + } + + async remove( + item: Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem + ) { + return invoke('plugin:menu|remove', { + rid: this.rid, + kind: this.kind, + item: [item.kind, item.rid] + }) + } + + async removeAt( + position: number + ): Promise< + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem + | null + > { + return invoke<[number, string, ItemKind]>('plugin:menu|remove_at', { + rid: this.rid, + kind: this.kind, + position + }).then(itemFromKind) + } + + async items(): Promise< + (Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem)[] + > { + return invoke<[number, string, ItemKind][]>('plugin:menu|append', { + rid: this.rid, + kind: this.kind + }).then((i) => i.map(itemFromKind)) + } + + async get( + id: string + ): Promise< + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem + | null + > { + return invoke<[number, string, ItemKind]>('plugin:menu|append', { + rid: this.rid, + kind: this.kind, + id + }).then(itemFromKind) + } + + // TODO: change to logical position + // TODO use window type after migrating window back to core + async popup(window: string, position?: [number, number]) { + return invoke('plugin:menu|popup', { + rid: this.rid, + kind: this.kind, + window, + position + }) + } +} + +interface MenuOptions { + id?: string + items: ( + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem + )[] +} + +class Menu extends MenuBase { + constructor(rid: number, id: string) { + super(rid, id, 'Menu') + } + + static async new(opts: MenuOptions) { + return super._new('Menu', opts).then(([rid, id]) => new Menu(rid, id)) + } + + static async default() { + return invoke<[number, string]>('plugin:menu|default').then( + ([rid, id]) => new Menu(rid, id) + ) + } + + async setAsAppMenu() { + return invoke('plugin:menu|set_as_app_menu', { + rid: this.rid, + kind: this.kind + }) + } + + // TODO use window type after migrating window back to core + async setAsWindowMenu(window: string) { + return invoke('plugin:menu|set_as_window_menu', { + rid: this.rid, + kind: this.kind, + window + }) + } +} + +class MenuItemBase2 extends MenuItemBase { + async setText(text: string) { + return invoke('plugin:menu|set_text', { + rid: this.rid, + kind: this.kind, + text + }) + } + + async text(): Promise { + return invoke('plugin:menu|text', { rid: this.rid, kind: this.kind }) + } +} + +class MenuItemBase3 extends MenuItemBase2 { + async setEnabled(enabled: boolean) { + return invoke('plugin:menu|set_enabled', { + rid: this.rid, + kind: this.kind, + enabled + }) + } + + async isEnabled(): Promise { + return invoke('plugin:menu|is_enabled', { rid: this.rid, kind: this.kind }) + } +} + +class MenuItemBase4 extends MenuItemBase3 { + async setAccelerator(accelerator: string) { + return invoke('plugin:menu|set_accelerator', { + rid: this.rid, + kind: this.kind, + accelerator + }) + } +} + +interface MenuItemOptions { + id?: string + text?: string + enabled?: boolean + accelerator?: string +} + +class MenuItem extends MenuItemBase4 { + constructor(rid: number, id: string) { + super(rid, id, 'MenuItem') + } + + static async new(opts?: MenuItemOptions) { + return super + ._new('MenuItem', opts) + .then(([rid, id]) => new MenuItem(rid, id)) + } +} + +type SubmenuOptions = Omit & MenuOptions + +interface Submenu extends MenuItemBase3 {} +class Submenu extends MenuBase { + constructor(rid: number, id: string) { + super(rid, id, 'Submenu') + } + + static async new(opts?: SubmenuOptions) { + return super._new('Submenu', opts).then(([rid, id]) => new Submenu(rid, id)) + } + + async setAsWindowsMenuForNSApp() { + return invoke('plugin:menu|set_as_windows_menu_for_nsapp', { + rid: this.rid, + kind: this.kind + }) + } + + async setAsHelpMenuForNSApp() { + return invoke('plugin:menu|set_as_help_menu_for_nsapp', { + rid: this.rid, + kind: this.kind + }) + } +} + +applyMixins(Submenu, MenuItemBase3) + +type PredefinedMenuItemOptions = Omit< + MenuItemOptions, + 'enabled' | 'accelerator' | 'id' +> & { + item: + | 'Separator' + | 'Copy' + | 'Cut' + | 'Paste' + | 'SelectAll' + | 'Undo' + | 'Redo' + | 'Minimize' + | 'Maximize' + | 'Fullscreen' + | 'Hide' + | 'HideOthers' + | 'ShowAll' + | 'CloseWindow' + | 'Quit' + | 'Services' + | { + About: { + name?: string + version?: string + short_version?: string + authors?: string[] + comments?: string + copyright?: string + license?: string + website?: string + website_label?: string + credits?: string + icon?: string | Uint8Array + } + } +} + +class PredefinedMenuItem extends MenuItemBase2 { + constructor(rid: number, id: string) { + super(rid, id, 'MenuItem') + } + + static async new(opts?: PredefinedMenuItemOptions) { + return super + ._new('MenuItem', opts) + .then(([rid, id]) => new MenuItem(rid, id)) + } +} + +interface CheckMenuItemOptions extends MenuItemOptions { + checked?: boolean +} + +class CheckMenuItem extends MenuItemBase4 { + constructor(rid: number, id: string) { + super(rid, id, 'Check') + } + + static async new(opts?: MenuItemOptions) { + return super + ._new('Check', opts) + .then(([rid, id]) => new CheckMenuItem(rid, id)) + } + + async setChecked(checked: boolean) { + return invoke('plugin:menu|set_checked', { + rid: this.rid, + kind: this.kind, + checked + }) + } + async isChecked(): Promise { + return invoke('plugin:menu|is_checked', { rid: this.rid, kind: this.kind }) + } +} + +interface IconMenuItemOptions extends MenuItemOptions { + icon?: string | Uint8Array + nativeIcon?: NativeIcon +} +class IconMenuItem extends MenuItemBase4 { + constructor(rid: number, id: string) { + super(rid, id, 'Icon') + } + + static async new(opts?: IconMenuItemOptions) { + return super + ._new('Icon', opts) + .then(([rid, id]) => new IconMenuItem(rid, id)) + } + + async setIcon(icon: string | Uint8Array | null) { + return invoke('plugin:menu|set_icon', { rid: this.rid, icon }) + } + + async setNativeIcon(icon: NativeIcon | null) { + return invoke('plugin:menu|set_native_icon', { rid: this.rid, icon }) + } +} + +export type { + MenuEvent, + MenuOptions, + MenuItemOptions, + SubmenuOptions, + PredefinedMenuItemOptions, + CheckMenuItemOptions, + IconMenuItemOptions } +export { NativeIcon, MenuItem, CheckMenuItem, IconMenuItem, Submenu, Menu } diff --git a/tooling/api/src/tray.ts b/tooling/api/src/tray.ts index fea4c23bcbe..7aec096cfea 100644 --- a/tooling/api/src/tray.ts +++ b/tooling/api/src/tray.ts @@ -2,8 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +import { Menu } from './menu' import { EventCallback, EventName, UnlistenFn, listen, once } from './event' -import { ContextMenu } from './menu' +import { Resource } from './internal' +import { Submenu } from './menu' import { invoke } from './tauri' /** @@ -48,7 +50,7 @@ export interface TrayIconOptions { /** The tray icon id. If undefined, a random one will be assigend */ id?: string /** The tray icon menu */ - menu?: ContextMenu + menu?: Menu | Submenu /** * The tray icon which could be icon bytes or path to the icon file. * @@ -99,7 +101,7 @@ export interface TrayIconOptions { * Unlike Rust, javascript does not have any way to run cleanup code * when an object is being removed by garbage collection, but this tray icon * will be cleaned up when the tauri app exists, however if you want to cleanup - * this object early, you need to call {@linkcode TrayIcon.destroy}. + * this object early, you need to call {@linkcode TrayIcon.close}. * * @example * ```ts @@ -108,13 +110,13 @@ export interface TrayIconOptions { * tray.set_tooltip('new tooltip'); * ``` */ -export class TrayIcon { - _rid: number - _id: string +export class TrayIcon extends Resource { + /** The id associated with this tray icon. */ + public id: string private constructor(rid: number, id: string) { - this._rid = rid - this._id = id + super(rid) + this.id = id } /** @@ -126,23 +128,18 @@ export class TrayIcon { * Setting an empty {@linkcode Menu} is enough. */ static async new(options?: TrayIconOptions): Promise { - if (options) { - // @ts-expect-error we only need the rid - options.menu = options.menu?.rid + if (options?.menu) { + // @ts-expect-error we only need the rid and kind + options.menu = [options.menu.rid, options.menu.kind] } return invoke<[number, string]>('plugin:tray|new', { options: options ?? {} }).then(([rid, id]) => new TrayIcon(rid, id)) } - /** Returns the id associated with this tray icon. */ - id(): string { - return this._id - } - /** Sets a new tray icon. If `null` is provided, it will remove the icon. */ async setIcon(icon: string | Uint8Array | null) { - return invoke('plugin:tray|set_icon', { rid: this._rid, icon }) + return invoke('plugin:tray|set_icon', { rid: this.rid, icon }) } /** @@ -152,8 +149,12 @@ export class TrayIcon { * * - **Linux**: once a menu is set it cannot be removed so `null` has no effect */ - async setMenu(menu: ContextMenu | null) { - return invoke('plugin:tray|set_menu', { rid: this._rid, menu: menu?.rid }) + async setMenu(menu: Menu | Submenu | null) { + if (menu) { + // @ts-expect-error we only need the rid and kind + menu = [menu.rid, menu.kind] + } + return invoke('plugin:tray|set_menu', { rid: this.rid, menu }) } /** @@ -164,7 +165,7 @@ export class TrayIcon { * - **Linux:** Unsupported */ async setTooltip(tooltip: string | null) { - return invoke('plugin:tray|set_tooltip', { rid: this._rid, tooltip }) + return invoke('plugin:tray|set_tooltip', { rid: this.rid, tooltip }) } /** @@ -180,12 +181,12 @@ export class TrayIcon { * - **Windows:** Unsupported */ async setTitle(title: string | null) { - return invoke('plugin:tray|set_title', { rid: this._rid, title }) + return invoke('plugin:tray|set_title', { rid: this.rid, title }) } /** Show or hide this tray icon. */ async setVisible(visible: boolean) { - return invoke('plugin:tray|set_visible', { rid: this._rid, visible }) + return invoke('plugin:tray|set_visible', { rid: this.rid, visible }) } /** @@ -195,13 +196,13 @@ export class TrayIcon { * be `$XDG_RUNTIME_DIR/tray-icon` or `$TEMP/tray-icon`. */ async setTempDirPath(path: string | null) { - return invoke('plugin:tray|set_temp_dir_path', { rid: this._rid, path }) + return invoke('plugin:tray|set_temp_dir_path', { rid: this.rid, path }) } /** Sets the current icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only** */ async setIconAsTemplate(asTemplate: boolean) { return invoke('plugin:tray|set_icon_as_template', { - rid: this._rid, + rid: this.rid, asTemplate }) } @@ -209,32 +210,18 @@ export class TrayIcon { /** Disable or enable showing the tray menu on left click. **macOS only**. */ async setMenuOnLeftClick(onLeft: boolean) { return invoke('plugin:tray|set_show_menu_on_left_click', { - rid: this._rid, + rid: this.rid, onLeft }) } - /** - * Destroys and removes this tray icon from the system tray. See {@linkcode TrayIcon} docs for more info. - * - * #### Warning - * - * You should not call any method on this object anymore and should drop any reference to it, - * otherwise the methods will throw errors when used. - */ - async destroy() { - return invoke('plugin:tray|destroy', { - rid: this._rid - }) - } - /** * Listen to an event emitted by the backend that is tied to the current webview window. * * @example * ```typescript * import { TrayIcon } from '@tauri-apps/api/tray'; - * let tray = await TrayIcon.new(); + * const tray = await TrayIcon.new(); * const unlisten = await tray.listen('state-changed', (event) => { * console.log(`Got error: ${payload}`); * }); @@ -265,7 +252,7 @@ export class TrayIcon { * @example * ```typescript * import { TrayIcon } from '@tauri-apps/api/tray'; - * let tray = await TrayIcon.new(); + * const tray = await TrayIcon.new(); * const unlisten = await tray.once('state-initalized', (event) => { * console.log(`State initalized`); * }); @@ -296,7 +283,7 @@ export class TrayIcon { * @example * ```typescript * import { TrayIcon } from '@tauri-apps/api/tray'; - * let tray = await TrayIcon.new(); + * const tray = await TrayIcon.new(); * const unlisten = await tray.onTrayIconEvent((event) => { * console.log(event) * }); diff --git a/tooling/api/typedoc.json b/tooling/api/typedoc.json index 844f6065f09..6cf4d67ada9 100644 --- a/tooling/api/typedoc.json +++ b/tooling/api/typedoc.json @@ -2,8 +2,10 @@ "entryPoints": [ "src/event.ts", "src/mocks.ts", + "src/menu.ts", "src/path.ts", - "src/tauri.ts" + "src/tauri.ts", + "src/tray.ts" ], "githubPages": false, "readme": "none", From ae721ce3cf98b9eef6c610247da2173305b1d594 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Sat, 19 Aug 2023 17:36:04 +0300 Subject: [PATCH 03/64] implement the rest, needs testing --- core/tauri-macros/src/lib.rs | 62 +++++++++ core/tauri-macros/src/menu.rs | 100 ++++++++++++++ core/tauri/src/menu/icon.rs | 4 +- core/tauri/src/menu/plugin.rs | 235 ++++++++++++++++++++++++++------- core/tauri/src/menu/submenu.rs | 2 +- tooling/api/src/menu.ts | 52 ++++---- 6 files changed, 379 insertions(+), 76 deletions(-) create mode 100644 core/tauri-macros/src/menu.rs diff --git a/core/tauri-macros/src/lib.rs b/core/tauri-macros/src/lib.rs index 3962b1012d1..9a55c23b7c1 100644 --- a/core/tauri-macros/src/lib.rs +++ b/core/tauri-macros/src/lib.rs @@ -16,6 +16,7 @@ use proc_macro::TokenStream; use syn::{parse_macro_input, DeriveInput}; mod command; +mod menu; mod mobile; mod runtime; @@ -89,3 +90,64 @@ pub fn default_runtime(attributes: TokenStream, input: TokenStream) -> TokenStre let input = parse_macro_input!(input as DeriveInput); runtime::default_runtime(attributes, input).into() } + +/// Accepets a closure-like syntax to call arbitray code on a menu item +/// after mathcing against `kind` and retreiveing it from `resources_table` using `rid`. +/// +/// You can optionally pass a third paraemeter to select which item kinds +/// to match agains, by providing a `|` separated list of item kinds +/// ```ignore +/// do_menu_item!(|i| i.set_text(text), Check | Submenu); +/// ``` +/// You could also provide a negated list +/// ```ignore +/// do_menu_item!(|i| i.set_text(text), !Check); +/// do_menu_item!(|i| i.set_text(text), !Check | !Submenu); +/// ``` +/// but you can't have mixed negations and positive kinds. +/// ```ignore +/// do_menu_item!(|i| i.set_text(text), !Check | Submeun); +/// ``` +/// +/// #### Example +/// +/// ```ignore +/// let rid = 23; +/// let kind = ItemKind::Check; +/// let resources_table = app.manager.resources_table(); +/// do_menu_item!(|i| i.set_text(text)) +/// ``` +/// which will expand into: +/// ```ignore +/// let rid = 23; +/// let kind = ItemKind::Check; +/// let resources_table = app.manager.resources_table(); +/// match kind { +/// ItemKind::Submenu => { +/// let i = resources_table.get::>(rid)?; +/// i.set_text(text) +/// } +/// ItemKind::MenuItem => { +/// let i = resources_table.get::>(rid)?; +/// i.set_text(text) +/// } +/// ItemKind::Predefined => { +/// let i = resources_table.get::>(rid)?; +/// i.set_text(text) +/// } +/// ItemKind::Check => { +/// let i = resources_table.get::>(rid)?; +/// i.set_text(text) +/// } +/// ItemKind::Icon => { +/// let i = resources_table.get::>(rid)?; +/// i.set_text(text) +/// } +/// _ => unreachable!(), +/// } +/// ``` +#[proc_macro] +pub fn do_menu_item(input: TokenStream) -> TokenStream { + let tokens = parse_macro_input!(input as menu::DoMenuItemInput); + menu::do_menu_item(tokens).into() +} diff --git a/core/tauri-macros/src/menu.rs b/core/tauri-macros/src/menu.rs new file mode 100644 index 00000000000..7e93da475bb --- /dev/null +++ b/core/tauri-macros/src/menu.rs @@ -0,0 +1,100 @@ +use proc_macro2::{Ident, Span, TokenStream}; +use quote::quote; +use syn::{ + parse::{Parse, ParseStream}, + punctuated::Punctuated, + Expr, Token, +}; + +pub struct DoMenuItemInput { + var: Ident, + expr: Expr, + kinds: Vec, +} + +#[derive(Clone)] +struct NegatedIdent(bool, Ident); + +impl Parse for NegatedIdent { + fn parse(input: ParseStream) -> syn::Result { + let t = input.parse::(); + let i: Ident = input.parse()?; + Ok(NegatedIdent(t.is_ok(), i)) + } +} + +impl Parse for DoMenuItemInput { + fn parse(input: ParseStream) -> syn::Result { + let _: Token![|] = input.parse()?; + let var: Ident = input.parse()?; + let _: Token![|] = input.parse()?; + let expr: Expr = input.parse()?; + let _: syn::Result = input.parse(); + let kinds = Punctuated::::parse_terminated(input)?; + + Ok(Self { + var, + expr, + kinds: kinds.into_iter().collect(), + }) + } +} + +pub fn do_menu_item(input: DoMenuItemInput) -> TokenStream { + let DoMenuItemInput { + expr, + var, + mut kinds, + } = input; + + let defaults = vec![ + NegatedIdent(false, Ident::new("Submenu", Span::call_site())), + NegatedIdent(false, Ident::new("MenuItem", Span::call_site())), + NegatedIdent(false, Ident::new("Predefined", Span::call_site())), + NegatedIdent(false, Ident::new("Check", Span::call_site())), + NegatedIdent(false, Ident::new("Icon", Span::call_site())), + ]; + + if kinds.is_empty() { + kinds.extend(defaults.clone()); + } + + let mut has_negated: bool = false; + for NegatedIdent(negated, _) in &kinds { + if *negated && !has_negated { + has_negated = true; + } + } + + if has_negated { + kinds.extend(defaults); + kinds.sort_by(|a, b| a.1.cmp(&b.1)); + kinds.dedup_by(|a, b| a.1 == b.1); + } + + let (kinds, types): (Vec, Vec) = kinds + .into_iter() + .filter_map(|nident| match nident.1 { + i if i == "MenuItem" && !nident.0 => Some((i, Ident::new("MenuItem", Span::call_site()))), + i if i == "Submenu" && !nident.0 => Some((i, Ident::new("Submenu", Span::call_site()))), + i if i == "Predefined" && !nident.0 => { + Some((i, Ident::new("PredefinedMenuItem", Span::call_site()))) + } + i if i == "Check" && !nident.0 => Some((i, Ident::new("CheckMenuItem", Span::call_site()))), + i if i == "Icon" && !nident.0 => Some((i, Ident::new("IconMenuItem", Span::call_site()))), + _ => None, + }) + .unzip(); + + quote! { + match kind { + #( + ItemKind::#kinds => { + let #var = resources_table.get::<#types>(rid)?; + #expr + } + )* + _ => unreachable!(), + } + } +} diff --git a/core/tauri/src/menu/icon.rs b/core/tauri/src/menu/icon.rs index b6242e96cf0..82ceec09e88 100644 --- a/core/tauri/src/menu/icon.rs +++ b/core/tauri/src/menu/icon.rs @@ -207,9 +207,9 @@ impl IconMenuItem { /// ## Platform-specific: /// /// - **Windows / Linux**: Unsupported. - pub fn set_native_icon(&mut self, _icon: Option) -> crate::Result<()> { + pub fn set_native_icon(&self, _icon: Option) -> crate::Result<()> { #[cfg(target_os = "macos")] - return run_main_thread!(self, |mut self_: Self| self_ + return run_main_thread!(self, |self_: Self| self_ .inner .set_native_icon(_icon.map(Into::into))); #[allow(unreachable_code)] diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index b8ecc754798..67eb8dbfb79 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -11,6 +11,7 @@ use crate::{ resources::ResourceId, AppHandle, IconDto, Manager, Runtime, }; +use tauri_macros::do_menu_item; #[derive(Deserialize, Serialize)] pub(crate) enum ItemKind { @@ -91,34 +92,6 @@ struct NewOptions { items: Option>, } -macro_rules! do_item { - ($resources_table:ident, $rid:ident, $kind:ident, $ex:expr) => { - match $kind { - ItemKind::Submenu => { - let item = $resources_table.get::>($rid)?; - $ex(&*item) - } - ItemKind::MenuItem => { - let item = $resources_table.get::>($rid)?; - $ex(&*item) - } - ItemKind::Predefined => { - let item = $resources_table.get::>($rid)?; - $ex(&*item) - } - ItemKind::Check => { - let item = $resources_table.get::>($rid)?; - $ex(&*item) - } - ItemKind::Icon => { - let item = $resources_table.get::>($rid)?; - $ex(&*item) - } - _ => unreachable!(), - } - }; -} - #[command(root = "crate")] fn new( app: AppHandle, @@ -136,7 +109,7 @@ fn new( } if let Some(items) = options.items { for (rid, kind) in items { - builder = do_item!(resources_table, rid, kind, |i| builder.item(i)); + builder = do_menu_item!(|i| builder.item(&*i)); } } let menu = builder.build()?; @@ -152,7 +125,7 @@ fn new( } if let Some(items) = options.items { for (rid, kind) in items { - builder = do_item!(resources_table, rid, kind, |i| builder.item(i)); + builder = do_menu_item!(|i| builder.item(&*i)); } } @@ -256,13 +229,13 @@ fn append( ItemKind::Menu => { let menu = resources_table.get::>(rid)?; for (rid, kind) in items { - do_item!(resources_table, rid, kind, |i| menu.append(i))?; + do_menu_item!(|i| menu.append(&*i))?; } } ItemKind::Submenu => { let submenu = resources_table.get::>(rid)?; for (rid, kind) in items { - do_item!(resources_table, rid, kind, |i| submenu.append(i))?; + do_menu_item!(|i| submenu.append(&*i))?; } } _ => unreachable!(), @@ -283,13 +256,13 @@ fn prepend( ItemKind::Menu => { let menu = resources_table.get::>(rid)?; for (rid, kind) in items { - do_item!(resources_table, rid, kind, |i| menu.prepend(i))?; + do_menu_item!(|i| menu.prepend(&*i))?; } } ItemKind::Submenu => { let submenu = resources_table.get::>(rid)?; for (rid, kind) in items { - do_item!(resources_table, rid, kind, |i| submenu.prepend(i))?; + do_menu_item!(|i| submenu.prepend(&*i))?; } } _ => unreachable!(), @@ -311,14 +284,14 @@ fn insert( ItemKind::Menu => { let menu = resources_table.get::>(rid)?; for (rid, kind) in items { - do_item!(resources_table, rid, kind, |i| menu.insert(i, position))?; + do_menu_item!(|i| menu.insert(&*i, position))?; position += 1 } } ItemKind::Submenu => { let submenu = resources_table.get::>(rid)?; for (rid, kind) in items { - do_item!(resources_table, rid, kind, |i| submenu.insert(i, position))?; + do_menu_item!(|i| submenu.insert(&*i, position))?; position += 1 } } @@ -331,20 +304,20 @@ fn insert( #[command(root = "crate")] fn remove( app: AppHandle, - rid: ResourceId, - kind: ItemKind, + menu_rid: ResourceId, + menu_kind: ItemKind, item: (ResourceId, ItemKind), ) -> crate::Result<()> { - let (item_rid, item_kind) = item; let resources_table = app.manager.resources_table(); - match kind { + let (rid, kind) = item; + match menu_kind { ItemKind::Menu => { - let menu = resources_table.get::>(rid)?; - do_item!(resources_table, item_rid, item_kind, |i| menu.remove(i))?; + let menu = resources_table.get::>(menu_rid)?; + do_menu_item!(|i| menu.remove(&*i))?; } ItemKind::Submenu => { - let submenu = resources_table.get::>(rid)?; - do_item!(resources_table, item_rid, item_kind, |i| submenu.remove(i))?; + let submenu = resources_table.get::>(menu_rid)?; + do_menu_item!(|i| submenu.remove(&*i))?; } _ => unreachable!(), }; @@ -477,10 +450,182 @@ fn default(app: AppHandle) -> crate::Result<(ResourceId, MenuId)> Ok((rid, id)) } +#[command(root = "crate")] +fn set_as_app_menu( + app: AppHandle, + rid: ResourceId, +) -> crate::Result> { + let mut resources_table = app.manager.resources_table(); + let menu = resources_table.get::>(rid)?; + if let Some(menu) = menu.set_as_app_menu()? { + let id = menu.id().clone(); + let rid = resources_table.add(menu); + return Ok(Some((rid, id))); + } + Ok(None) +} + +#[command(root = "crate")] +fn set_as_window_menu( + app: AppHandle, + rid: ResourceId, + window: String, +) -> crate::Result> { + if let Some(window) = app.get_window(&window) { + let mut resources_table = app.manager.resources_table(); + let menu = resources_table.get::>(rid)?; + if let Some(menu) = menu.set_as_window_menu(&window)? { + let id = menu.id().clone(); + let rid = resources_table.add(menu); + return Ok(Some((rid, id))); + } + } + Ok(None) +} + +#[command(root = "crate")] +fn text(app: AppHandle, rid: ResourceId, kind: ItemKind) -> crate::Result { + let resources_table = app.manager.resources_table(); + do_menu_item!(|i| i.text()) +} + +#[command(root = "crate")] +fn set_text( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + text: String, +) -> crate::Result<()> { + let resources_table = app.manager.resources_table(); + do_menu_item!(|i| i.set_text(text)) +} + +#[command(root = "crate")] +fn is_enabled( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, +) -> crate::Result { + let resources_table = app.manager.resources_table(); + do_menu_item!(|i| i.is_enabled(), !Predefined) +} + +#[command(root = "crate")] +fn set_enabled( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + enabled: bool, +) -> crate::Result<()> { + let resources_table = app.manager.resources_table(); + do_menu_item!(|i| i.set_enabled(enabled), !Predefined) +} + +#[command(root = "crate")] +fn set_accelerator( + app: AppHandle, + rid: ResourceId, + kind: ItemKind, + accelerator: Option, +) -> crate::Result<()> { + let resources_table = app.manager.resources_table(); + do_menu_item!(|i| i.set_accelerator(accelerator), !Predefined | !Submenu) +} + +#[command(root = "crate")] +fn set_as_windows_menu_for_nsapp( + app: AppHandle, + rid: ResourceId, +) -> crate::Result<()> { + #[cfg(target_os = "macos")] + { + let resources_table = app.manager.resources_table(); + let submenu = resources_table.get::>(rid)?; + submenu.set_as_help_menu_for_nsapp()?; + } + + let _ = rid; + let _ = app; + Ok(()) +} + +#[command(root = "crate")] +fn set_as_help_menu_for_nsapp(app: AppHandle, rid: ResourceId) -> crate::Result<()> { + #[cfg(target_os = "macos")] + { + let resources_table = app.manager.resources_table(); + let submenu = resources_table.get::>(rid)?; + submenu.set_as_help_menu_for_nsapp()?; + } + + let _ = rid; + let _ = app; + + Ok(()) +} + +#[command(root = "crate")] +fn is_checked(app: AppHandle, rid: ResourceId) -> crate::Result { + let resources_table = app.manager.resources_table(); + let check_item = resources_table.get::>(rid)?; + check_item.is_checked() +} + +#[command(root = "crate")] +fn set_checked(app: AppHandle, rid: ResourceId, checked: bool) -> crate::Result<()> { + let resources_table = app.manager.resources_table(); + let check_item = resources_table.get::>(rid)?; + check_item.set_checked(checked) +} + +#[command(root = "crate")] +fn set_icon( + app: AppHandle, + rid: ResourceId, + icon: Option, +) -> crate::Result<()> { + let resources_table = app.manager.resources_table(); + let icon_item = resources_table.get::>(rid)?; + icon_item.set_icon(icon.map(Into::into)) +} + +#[command(root = "crate")] +fn set_native_icon( + app: AppHandle, + rid: ResourceId, + icon: Option, +) -> crate::Result<()> { + let resources_table = app.manager.resources_table(); + let icon_item = resources_table.get::>(rid)?; + icon_item.set_native_icon(icon) +} + pub(crate) fn init() -> TauriPlugin { Builder::new("menu") .invoke_handler(crate::generate_handler![ - new, append, prepend, insert, remove, remove_at, items, get, popup, default + new, + append, + prepend, + insert, + remove, + remove_at, + items, + get, + popup, + default, + set_as_app_menu, + set_as_window_menu, + text, + set_text, + is_enabled, + set_enabled, + set_accelerator, + set_as_windows_menu_for_nsapp, + set_as_help_menu_for_nsapp, + is_checked, + set_checked, + set_icon, + set_native_icon, ]) .build() } diff --git a/core/tauri/src/menu/submenu.rs b/core/tauri/src/menu/submenu.rs index 49974c27641..7d51be34692 100644 --- a/core/tauri/src/menu/submenu.rs +++ b/core/tauri/src/menu/submenu.rs @@ -303,8 +303,8 @@ impl Submenu { /// /// If no menu is set as the Help menu, macOS will automatically use any menu /// which has a title matching the localized word "Help". + #[cfg(target_os = "macos")] pub fn set_as_help_menu_for_nsapp(&self) -> crate::Result<()> { - #[cfg(target_os = "macos")] run_main_thread!(self, |self_: Self| self_.inner.set_as_help_menu_for_nsapp())?; Ok(()) } diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 4d8f764191a..0a2d466fc27 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -295,11 +295,11 @@ class MenuBase extends MenuItemBase { | IconMenuItem | null > { - return invoke<[number, string, ItemKind]>('plugin:menu|append', { + return invoke<[number, string, ItemKind] | null>('plugin:menu|append', { rid: this.rid, kind: this.kind, id - }).then(itemFromKind) + }).then((r) => (r ? itemFromKind(r) : null)) } // TODO: change to logical position @@ -340,24 +340,26 @@ class Menu extends MenuBase { ) } - async setAsAppMenu() { - return invoke('plugin:menu|set_as_app_menu', { - rid: this.rid, - kind: this.kind - }) + async setAsAppMenu(): Promise { + return invoke<[number, string] | null>('plugin:menu|set_as_app_menu', { + rid: this.rid + }).then((r) => (r ? new Menu(r[0], r[1]) : null)) } // TODO use window type after migrating window back to core - async setAsWindowMenu(window: string) { - return invoke('plugin:menu|set_as_window_menu', { + async setAsWindowMenu(window: string): Promise { + return invoke<[number, string] | null>('plugin:menu|set_as_window_menu', { rid: this.rid, - kind: this.kind, window - }) + }).then((r) => (r ? new Menu(r[0], r[1]) : null)) } } class MenuItemBase2 extends MenuItemBase { + async text(): Promise { + return invoke('plugin:menu|text', { rid: this.rid, kind: this.kind }) + } + async setText(text: string) { return invoke('plugin:menu|set_text', { rid: this.rid, @@ -365,13 +367,13 @@ class MenuItemBase2 extends MenuItemBase { text }) } - - async text(): Promise { - return invoke('plugin:menu|text', { rid: this.rid, kind: this.kind }) - } } class MenuItemBase3 extends MenuItemBase2 { + async isEnabled(): Promise { + return invoke('plugin:menu|is_enabled', { rid: this.rid, kind: this.kind }) + } + async setEnabled(enabled: boolean) { return invoke('plugin:menu|set_enabled', { rid: this.rid, @@ -379,14 +381,10 @@ class MenuItemBase3 extends MenuItemBase2 { enabled }) } - - async isEnabled(): Promise { - return invoke('plugin:menu|is_enabled', { rid: this.rid, kind: this.kind }) - } } class MenuItemBase4 extends MenuItemBase3 { - async setAccelerator(accelerator: string) { + async setAccelerator(accelerator: string | null) { return invoke('plugin:menu|set_accelerator', { rid: this.rid, kind: this.kind, @@ -428,15 +426,13 @@ class Submenu extends MenuBase { async setAsWindowsMenuForNSApp() { return invoke('plugin:menu|set_as_windows_menu_for_nsapp', { - rid: this.rid, - kind: this.kind + rid: this.rid }) } async setAsHelpMenuForNSApp() { return invoke('plugin:menu|set_as_help_menu_for_nsapp', { - rid: this.rid, - kind: this.kind + rid: this.rid }) } } @@ -508,16 +504,16 @@ class CheckMenuItem extends MenuItemBase4 { .then(([rid, id]) => new CheckMenuItem(rid, id)) } + async isChecked(): Promise { + return invoke('plugin:menu|is_checked', { rid: this.rid }) + } + async setChecked(checked: boolean) { return invoke('plugin:menu|set_checked', { rid: this.rid, - kind: this.kind, checked }) } - async isChecked(): Promise { - return invoke('plugin:menu|is_checked', { rid: this.rid, kind: this.kind }) - } } interface IconMenuItemOptions extends MenuItemOptions { From a8f64d6e5f01f1e9dc0700f0e4afc807ab4d52fe Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Sat, 26 Aug 2023 15:45:35 +0300 Subject: [PATCH 04/64] implement js menu events --- core/tauri/scripts/bundle.global.js | 2 +- tooling/api/docs/js-api.json | 2 +- tooling/api/src/menu.ts | 59 ++++++++++++++++++-- tooling/api/src/tray.ts | 84 +++++------------------------ 4 files changed, 72 insertions(+), 75 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 93c77bd3279..fe22996ec5c 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var R=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var B=Object.getOwnPropertyNames;var N=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var n in e)R(t,n,{get:e[n],enumerable:!0})},ee=(t,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of B(e))!N.call(t,a)&&a!==n&&R(t,a,{get:()=>e[a],enumerable:!(s=X(e,a))||s.enumerable});return t};var ne=t=>ee(R({},"__esModule",{value:!0}),t);var z=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var l=(t,e,n)=>(z(t,e,"read from private field"),n?n.call(t):e.get(t)),c=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},d=(t,e,n,s)=>(z(t,e,"write to private field"),s?s.call(t,n):e.set(t,n),n);var Ve={};g(Ve,{event:()=>L,invoke:()=>He,menu:()=>K,path:()=>W,tauri:()=>x,tray:()=>H});var L={};g(L,{TauriEvent:()=>Q,emit:()=>se,listen:()=>w,once:()=>U});var x={};g(x,{Channel:()=>T,PluginListener:()=>S,addPluginListener:()=>te,convertFileSrc:()=>ie,invoke:()=>r,transformCallback:()=>y});function re(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function y(t,e=!1){let n=re(),s=`_${n}`;return Object.defineProperty(window,s,{value:a=>(e&&Reflect.deleteProperty(window,s),t?.(a)),writable:!1,configurable:!0}),n}var h,T=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;c(this,h,()=>{});this.id=y(e=>{l(this,h).call(this,e)})}set onmessage(e){d(this,h,e)}get onmessage(){return l(this,h)}toJSON(){return`__CHANNEL__:${this.id}`}};h=new WeakMap;var S=class{constructor(e,n,s){this.plugin=e,this.event=n,this.channelId=s}async unregister(){return r(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function te(t,e,n){let s=new T;return s.onmessage=n,r(`plugin:${t}|register_listener`,{event:e,handler:s}).then(()=>new S(t,e,s.id))}async function r(t,e={},n){return new Promise((s,a)=>{let j=y(D=>{s(D),Reflect.deleteProperty(window,`_${$}`)},!0),$=y(D=>{a(D),Reflect.deleteProperty(window,`_${j}`)},!0);window.__TAURI_IPC__({cmd:t,callback:j,error:$,payload:e,options:n})})}function ie(t,e="asset"){return window.__TAURI__.convertFileSrc(t,e)}var Q=(u=>(u.WINDOW_RESIZED="tauri://resize",u.WINDOW_MOVED="tauri://move",u.WINDOW_CLOSE_REQUESTED="tauri://close-requested",u.WINDOW_CREATED="tauri://window-created",u.WINDOW_DESTROYED="tauri://destroyed",u.WINDOW_FOCUS="tauri://focus",u.WINDOW_BLUR="tauri://blur",u.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",u.WINDOW_THEME_CHANGED="tauri://theme-changed",u.WINDOW_FILE_DROP="tauri://file-drop",u.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",u.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",u.MENU="tauri://menu",u.TRAY="tauri://tray",u))(Q||{});async function Y(t,e){await r("plugin:event|unlisten",{event:t,eventId:e})}async function w(t,e,n){return r("plugin:event|listen",{event:t,windowLabel:n?.target,handler:y(e)}).then(s=>async()=>Y(t,s))}async function U(t,e,n){return w(t,s=>{e(s),Y(t,s.id).catch(()=>{})},n)}async function se(t,e,n){await r("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var W={};g(W,{BaseDirectory:()=>q,appCacheDir:()=>le,appConfigDir:()=>oe,appDataDir:()=>ue,appLocalDataDir:()=>ae,appLogDir:()=>Se,audioDir:()=>ce,basename:()=>Le,cacheDir:()=>de,configDir:()=>pe,dataDir:()=>me,delimiter:()=>Ee,desktopDir:()=>ge,dirname:()=>xe,documentDir:()=>he,downloadDir:()=>ye,executableDir:()=>_e,extname:()=>Ue,fontDir:()=>fe,homeDir:()=>be,isAbsolute:()=>We,join:()=>Re,localDataDir:()=>ke,normalize:()=>De,pictureDir:()=>we,publicDir:()=>Pe,resolve:()=>Fe,resolveResource:()=>Me,resourceDir:()=>Ae,runtimeDir:()=>Ie,sep:()=>ve,tempDir:()=>Ce,templateDir:()=>Oe,videoDir:()=>Te});var q=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(q||{});async function oe(){return r("plugin:path|resolve_directory",{directory:13})}async function ue(){return r("plugin:path|resolve_directory",{directory:14})}async function ae(){return r("plugin:path|resolve_directory",{directory:15})}async function le(){return r("plugin:path|resolve_directory",{directory:16})}async function ce(){return r("plugin:path|resolve_directory",{directory:1})}async function de(){return r("plugin:path|resolve_directory",{directory:2})}async function pe(){return r("plugin:path|resolve_directory",{directory:3})}async function me(){return r("plugin:path|resolve_directory",{directory:4})}async function ge(){return r("plugin:path|resolve_directory",{directory:18})}async function he(){return r("plugin:path|resolve_directory",{directory:6})}async function ye(){return r("plugin:path|resolve_directory",{directory:7})}async function _e(){return r("plugin:path|resolve_directory",{directory:19})}async function fe(){return r("plugin:path|resolve_directory",{directory:20})}async function be(){return r("plugin:path|resolve_directory",{directory:21})}async function ke(){return r("plugin:path|resolve_directory",{directory:5})}async function we(){return r("plugin:path|resolve_directory",{directory:8})}async function Pe(){return r("plugin:path|resolve_directory",{directory:9})}async function Ae(){return r("plugin:path|resolve_directory",{directory:11})}async function Me(t){return r("plugin:path|resolve_directory",{directory:11,path:t})}async function Ie(){return r("plugin:path|resolve_directory",{directory:22})}async function Oe(){return r("plugin:path|resolve_directory",{directory:23})}async function Te(){return r("plugin:path|resolve_directory",{directory:10})}async function Se(){return r("plugin:path|resolve_directory",{directory:17})}async function Ce(t){return r("plugin:path|resolve_directory",{directory:12})}function ve(){return window.__TAURI__.path.__sep}function Ee(){return window.__TAURI__.path.__delimiter}async function Fe(...t){return r("plugin:path|resolve",{paths:t})}async function De(t){return r("plugin:path|normalize",{path:t})}async function Re(...t){return r("plugin:path|join",{paths:t})}async function xe(t){return r("plugin:path|dirname",{path:t})}async function Ue(t){return r("plugin:path|extname",{path:t})}async function Le(t,e){return r("plugin:path|basename",{path:t,ext:e})}async function We(t){return r("plugin:path|isAbsolute",{path:t})}var H={};g(H,{TrayIcon:()=>A});var P,_=class{constructor(e){c(this,P,void 0);d(this,P,e)}get rid(){return l(this,P)}async close(){return r("plugin:resources|close",{rid:this.rid})}};P=new WeakMap;function J(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(s=>{Object.defineProperty(t.prototype,s,Object.getOwnPropertyDescriptor(n.prototype,s)||Object.create(null))})})}var A=class extends _{constructor(n,s){super(n);this.id=s}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),r("plugin:tray|new",{options:n??{}}).then(([s,a])=>new A(s,a))}async setIcon(n){return r("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),r("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return r("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return r("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return r("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return r("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return r("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return r("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async listen(n,s){return w(n,s,{target:window.__TAURI_METADATA__.__currentWindow.label})}async once(n,s){return U(n,s,{target:window.__TAURI_METADATA__.__currentWindow.label})}async onTrayIconEvent(n){return w("tauri://tray",n,{target:window.__TAURI_METADATA__.__currentWindow.label})}};var K={};g(K,{CheckMenuItem:()=>b,IconMenuItem:()=>k,Menu:()=>f,MenuItem:()=>p,NativeIcon:()=>Z,Submenu:()=>m});var Z=(i=>(i.Add="Add",i.Advanced="Advanced",i.Bluetooth="Bluetooth",i.Bookmarks="Bookmarks",i.Caution="Caution",i.ColorPanel="ColorPanel",i.ColumnView="ColumnView",i.Computer="Computer",i.EnterFullScreen="EnterFullScreen",i.Everyone="Everyone",i.ExitFullScreen="ExitFullScreen",i.FlowView="FlowView",i.Folder="Folder",i.FolderBurnable="FolderBurnable",i.FolderSmart="FolderSmart",i.FollowLinkFreestanding="FollowLinkFreestanding",i.FontPanel="FontPanel",i.GoLeft="GoLeft",i.GoRight="GoRight",i.Home="Home",i.IChatTheater="IChatTheater",i.IconView="IconView",i.Info="Info",i.InvalidDataFreestanding="InvalidDataFreestanding",i.LeftFacingTriangle="LeftFacingTriangle",i.ListView="ListView",i.LockLocked="LockLocked",i.LockUnlocked="LockUnlocked",i.MenuMixedState="MenuMixedState",i.MenuOnState="MenuOnState",i.MobileMe="MobileMe",i.MultipleDocuments="MultipleDocuments",i.Network="Network",i.Path="Path",i.PreferencesGeneral="PreferencesGeneral",i.QuickLook="QuickLook",i.RefreshFreestanding="RefreshFreestanding",i.Refresh="Refresh",i.Remove="Remove",i.RevealFreestanding="RevealFreestanding",i.RightFacingTriangle="RightFacingTriangle",i.Share="Share",i.Slideshow="Slideshow",i.SmartBadge="SmartBadge",i.StatusAvailable="StatusAvailable",i.StatusNone="StatusNone",i.StatusPartiallyAvailable="StatusPartiallyAvailable",i.StatusUnavailable="StatusUnavailable",i.StopProgressFreestanding="StopProgressFreestanding",i.StopProgress="StopProgress",i.TrashEmpty="TrashEmpty",i.TrashFull="TrashFull",i.User="User",i.UserAccounts="UserAccounts",i.UserGroup="UserGroup",i.UserGuest="UserGuest",i))(Z||{});function V([t,e,n]){switch(n){case"Submenu":return new m(t,e);case"Predefined":return new G(t,e);case"Check":return new b(t,e);case"Icon":return new k(t,e);case"MenuItem":default:return new p(t,e)}}var I,O,C=class extends _{constructor(n,s,a){super(n);c(this,I,void 0);c(this,O,void 0);d(this,I,s),d(this,O,a)}get id(){return l(this,I)}get kind(){return l(this,O)}static async _new(n,s){return r("plugin:menu|new",{kind:n,opts:s})}};I=new WeakMap,O=new WeakMap;var v=class extends C{constructor(e,n,s){super(e,n,s)}async append(e){return r("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.kind,n.rid])})}async prepend(e){return r("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.kind,n.rid])})}async insert(e,n){return r("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(s=>[s.kind,s.rid]),position:n})}async remove(e){return r("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.kind,e.rid]})}async removeAt(e){return r("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(V)}async items(){return r("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(V))}async get(e){return r("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(V)}async popup(e,n){return r("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},f=class extends v{constructor(e,n){super(e,n,"Menu")}static async new(e){return super._new("Menu",e).then(([n,s])=>new f(n,s))}static async default(){return r("plugin:menu|default").then(([e,n])=>new f(e,n))}async setAsAppMenu(){return r("plugin:menu|set_as_app_menu",{rid:this.rid,kind:this.kind})}async setAsWindowMenu(e){return r("plugin:menu|set_as_window_menu",{rid:this.rid,kind:this.kind,window:e})}},E=class extends C{async setText(e){return r("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async text(){return r("plugin:menu|text",{rid:this.rid,kind:this.kind})}},F=class extends E{async setEnabled(e){return r("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async isEnabled(){return r("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}},M=class extends F{async setAccelerator(e){return r("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},p=class extends M{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return super._new("MenuItem",e).then(([n,s])=>new p(n,s))}},m=class extends v{constructor(e,n){super(e,n,"Submenu")}static async new(e){return super._new("Submenu",e).then(([n,s])=>new m(n,s))}async setAsWindowsMenuForNSApp(){return r("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid,kind:this.kind})}async setAsHelpMenuForNSApp(){return r("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid,kind:this.kind})}};J(m,F);var G=class extends E{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return super._new("MenuItem",e).then(([n,s])=>new p(n,s))}},b=class extends M{constructor(e,n){super(e,n,"Check")}static async new(e){return super._new("Check",e).then(([n,s])=>new b(n,s))}async setChecked(e){return r("plugin:menu|set_checked",{rid:this.rid,kind:this.kind,checked:e})}async isChecked(){return r("plugin:menu|is_checked",{rid:this.rid,kind:this.kind})}},k=class extends M{constructor(e,n){super(e,n,"Icon")}static async new(e){return super._new("Icon",e).then(([n,s])=>new k(n,s))}async setIcon(e){return r("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return r("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};var He=r;return ne(Ve);})(); +"use strict";var __TAURI_IIFE__=(()=>{var x=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var h=(r,e)=>{for(var n in e)x(r,n,{get:e[n],enumerable:!0})},ee=(r,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of N(e))!B.call(r,u)&&u!==n&&x(r,u,{get:()=>e[u],enumerable:!(i=X(e,u))||i.enumerable});return r};var ne=r=>ee(x({},"__esModule",{value:!0}),r);var Q=(r,e,n)=>{if(!e.has(r))throw TypeError("Cannot "+n)};var l=(r,e,n)=>(Q(r,e,"read from private field"),n?n.call(r):e.get(r)),c=(r,e,n)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,n)},p=(r,e,n,i)=>(Q(r,e,"write to private field"),i?i.call(r,n):e.set(r,n),n);var Ge={};h(Ge,{event:()=>H,invoke:()=>Ve,menu:()=>$,path:()=>V,tauri:()=>L,tray:()=>G});var H={};h(H,{TauriEvent:()=>S,emit:()=>se,listen:()=>m,once:()=>W});var L={};h(L,{Channel:()=>E,PluginListener:()=>v,addPluginListener:()=>te,convertFileSrc:()=>ie,invoke:()=>t,transformCallback:()=>f});function re(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function f(r,e=!1){let n=re(),i=`_${n}`;return Object.defineProperty(window,i,{value:u=>(e&&Reflect.deleteProperty(window,i),r?.(u)),writable:!1,configurable:!0}),n}var y,E=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;c(this,y,()=>{});this.id=f(e=>{l(this,y).call(this,e)})}set onmessage(e){p(this,y,e)}get onmessage(){return l(this,y)}toJSON(){return`__CHANNEL__:${this.id}`}};y=new WeakMap;var v=class{constructor(e,n,i){this.plugin=e,this.event=n,this.channelId=i}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function te(r,e,n){let i=new E;return i.onmessage=n,t(`plugin:${r}|register_listener`,{event:e,handler:i}).then(()=>new v(r,e,i.id))}async function t(r,e={},n){return new Promise((i,u)=>{let P=f(D=>{i(D),Reflect.deleteProperty(window,`_${z}`)},!0),z=f(D=>{u(D),Reflect.deleteProperty(window,`_${P}`)},!0);window.__TAURI_IPC__({cmd:r,callback:P,error:z,payload:e,options:n})})}function ie(r,e="asset"){return window.__TAURI__.convertFileSrc(r,e)}var S=(a=>(a.WINDOW_RESIZED="tauri://resize",a.WINDOW_MOVED="tauri://move",a.WINDOW_CLOSE_REQUESTED="tauri://close-requested",a.WINDOW_CREATED="tauri://window-created",a.WINDOW_DESTROYED="tauri://destroyed",a.WINDOW_FOCUS="tauri://focus",a.WINDOW_BLUR="tauri://blur",a.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",a.WINDOW_THEME_CHANGED="tauri://theme-changed",a.WINDOW_FILE_DROP="tauri://file-drop",a.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",a.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",a.MENU="tauri://menu",a.TRAY="tauri://tray",a))(S||{});async function Y(r,e){await t("plugin:event|unlisten",{event:r,eventId:e})}async function m(r,e,n){return t("plugin:event|listen",{event:r,windowLabel:n?.target,handler:f(e)}).then(i=>async()=>Y(r,i))}async function W(r,e,n){return m(r,i=>{e(i),Y(r,i.id).catch(()=>{})},n)}async function se(r,e,n){await t("plugin:event|emit",{event:r,windowLabel:n?.target,payload:e})}var V={};h(V,{BaseDirectory:()=>q,appCacheDir:()=>le,appConfigDir:()=>oe,appDataDir:()=>ue,appLocalDataDir:()=>ae,appLogDir:()=>Ee,audioDir:()=>de,basename:()=>Le,cacheDir:()=>ce,configDir:()=>pe,dataDir:()=>me,delimiter:()=>Re,desktopDir:()=>ge,dirname:()=>De,documentDir:()=>_e,downloadDir:()=>he,executableDir:()=>ye,extname:()=>xe,fontDir:()=>fe,homeDir:()=>be,isAbsolute:()=>We,join:()=>Fe,localDataDir:()=>we,normalize:()=>Ue,pictureDir:()=>ke,publicDir:()=>Pe,resolve:()=>Ce,resolveResource:()=>Me,resourceDir:()=>Ae,runtimeDir:()=>Ie,sep:()=>Se,tempDir:()=>ve,templateDir:()=>Te,videoDir:()=>Oe});var q=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(q||{});async function oe(){return t("plugin:path|resolve_directory",{directory:13})}async function ue(){return t("plugin:path|resolve_directory",{directory:14})}async function ae(){return t("plugin:path|resolve_directory",{directory:15})}async function le(){return t("plugin:path|resolve_directory",{directory:16})}async function de(){return t("plugin:path|resolve_directory",{directory:1})}async function ce(){return t("plugin:path|resolve_directory",{directory:2})}async function pe(){return t("plugin:path|resolve_directory",{directory:3})}async function me(){return t("plugin:path|resolve_directory",{directory:4})}async function ge(){return t("plugin:path|resolve_directory",{directory:18})}async function _e(){return t("plugin:path|resolve_directory",{directory:6})}async function he(){return t("plugin:path|resolve_directory",{directory:7})}async function ye(){return t("plugin:path|resolve_directory",{directory:19})}async function fe(){return t("plugin:path|resolve_directory",{directory:20})}async function be(){return t("plugin:path|resolve_directory",{directory:21})}async function we(){return t("plugin:path|resolve_directory",{directory:5})}async function ke(){return t("plugin:path|resolve_directory",{directory:8})}async function Pe(){return t("plugin:path|resolve_directory",{directory:9})}async function Ae(){return t("plugin:path|resolve_directory",{directory:11})}async function Me(r){return t("plugin:path|resolve_directory",{directory:11,path:r})}async function Ie(){return t("plugin:path|resolve_directory",{directory:22})}async function Te(){return t("plugin:path|resolve_directory",{directory:23})}async function Oe(){return t("plugin:path|resolve_directory",{directory:10})}async function Ee(){return t("plugin:path|resolve_directory",{directory:17})}async function ve(r){return t("plugin:path|resolve_directory",{directory:12})}function Se(){return window.__TAURI__.path.__sep}function Re(){return window.__TAURI__.path.__delimiter}async function Ce(...r){return t("plugin:path|resolve",{paths:r})}async function Ue(r){return t("plugin:path|normalize",{path:r})}async function Fe(...r){return t("plugin:path|join",{paths:r})}async function De(r){return t("plugin:path|dirname",{path:r})}async function xe(r){return t("plugin:path|extname",{path:r})}async function Le(r,e){return t("plugin:path|basename",{path:r,ext:e})}async function We(r){return t("plugin:path|isAbsolute",{path:r})}var G={};h(G,{TrayIcon:()=>M});var A,b=class{constructor(e){c(this,A,void 0);p(this,A,e)}get rid(){return l(this,A)}async close(){return t("plugin:resources|close",{rid:this.rid})}};A=new WeakMap;function J(r,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i)||Object.create(null))})})}var M=class extends b{constructor(n,i){super(n);this.id=i}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),t("plugin:tray|new",{options:n??{}}).then(([i,u])=>new M(i,u))}async setIcon(n){return t("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),t("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return t("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return t("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return t("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return t("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return t("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return t("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async listen(n,i){return m(n,i,{target:window.__TAURI_METADATA__.__currentWindow.label})}async once(n,i){return W(n,i,{target:window.__TAURI_METADATA__.__currentWindow.label})}async on(n){return m("tauri://tray",i=>{i.payload.id==this.id&&n(i.payload)},{target:window.__TAURI_METADATA__.__currentWindow.label})}};var $={};h($,{CheckMenuItem:()=>w,IconMenuItem:()=>k,Menu:()=>d,MenuItem:()=>g,NativeIcon:()=>Z,Submenu:()=>_});async function He(r,e){if(!window.__TAURI_MENU__.handlers){window.__TAURI_MENU__.handlers={};let n=await m("tauri://menu",i=>{let u=window.__TAURI_MENU__.handlers?.[i.payload.id];if(u)for(e of u)e()},{target:window.__TAURI_METADATA__.__currentWindow.label});window.addEventListener("unload",()=>n())}window.__TAURI_MENU__.handlers[r]||(window.__TAURI_MENU__.handlers[r]=[]),window.__TAURI_MENU__.handlers[r].push(e)}var Z=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(Z||{});function K([r,e,n]){switch(n){case"Submenu":return new _(r,e);case"Predefined":return new j(r,e);case"Check":return new w(r,e);case"Icon":return new k(r,e);case"MenuItem":default:return new g(r,e)}}var T,O,R=class extends b{constructor(n,i,u){super(n);c(this,T,void 0);c(this,O,void 0);p(this,T,i),p(this,O,u)}get id(){return l(this,T)}get kind(){return l(this,O)}static async _new(n,i){let u;return"action"in i&&(u=i.action,delete i.action),t("plugin:menu|new",{kind:n,opts:i}).then(P=>(u&&He(P[1],u),P))}};T=new WeakMap,O=new WeakMap;var C=class extends R{constructor(e,n,i){super(e,n,i)}async append(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.kind,n.rid])})}async prepend(e){return t("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.kind,n.rid])})}async insert(e,n){return t("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(i=>[i.kind,i.rid]),position:n})}async remove(e){return t("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.kind,e.rid]})}async removeAt(e){return t("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(K)}async items(){return t("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(K))}async get(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?K(n):null)}async popup(e,n){return t("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},d=class extends C{constructor(e,n){super(e,n,"Menu")}static async new(e){return super._new("Menu",e).then(([n,i])=>new d(n,i))}static async default(){return t("plugin:menu|default").then(([e,n])=>new d(e,n))}async setAsAppMenu(){return t("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new d(e[0],e[1]):null)}async setAsWindowMenu(e){return t("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new d(n[0],n[1]):null)}},U=class extends R{async text(){return t("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return t("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},F=class extends U{async isEnabled(){return t("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return t("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},I=class extends F{async setAccelerator(e){return t("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},g=class extends I{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return super._new("MenuItem",e).then(([n,i])=>new g(n,i))}},_=class extends C{constructor(e,n){super(e,n,"Submenu")}static async new(e){return super._new("Submenu",e).then(([n,i])=>new _(n,i))}async setAsWindowsMenuForNSApp(){return t("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return t("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};J(_,F);var j=class extends U{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return super._new("MenuItem",e).then(([n,i])=>new g(n,i))}},w=class extends I{constructor(e,n){super(e,n,"Check")}static async new(e){return super._new("Check",e).then(([n,i])=>new w(n,i))}async isChecked(){return t("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return t("plugin:menu|set_checked",{rid:this.rid,checked:e})}},k=class extends I{constructor(e,n){super(e,n,"Icon")}static async new(e){return super._new("Icon",e).then(([n,i])=>new k(n,i))}async setIcon(e){return t("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return t("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};var Ve=t;return ne(Ge);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index 8429ed2cd95..0b258746b1b 100644 --- a/tooling/api/docs/js-api.json +++ b/tooling/api/docs/js-api.json @@ -1 +1 @@ -{"id":0,"name":"@tauri-apps/api","variant":"project","kind":1,"flags":{},"children":[{"id":1,"name":"event","variant":"declaration","kind":2,"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":36,"name":"TauriEvent","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":49,"name":"MENU","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":59,"character":2}],"type":{"type":"literal","value":"tauri://menu"}},{"id":43,"name":"WINDOW_BLUR","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":53,"character":2}],"type":{"type":"literal","value":"tauri://blur"}},{"id":39,"name":"WINDOW_CLOSE_REQUESTED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":49,"character":2}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":40,"name":"WINDOW_CREATED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":50,"character":2}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":41,"name":"WINDOW_DESTROYED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":51,"character":2}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":46,"name":"WINDOW_FILE_DROP","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":56,"character":2}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":48,"name":"WINDOW_FILE_DROP_CANCELLED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":58,"character":2}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":47,"name":"WINDOW_FILE_DROP_HOVER","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":57,"character":2}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":42,"name":"WINDOW_FOCUS","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":52,"character":2}],"type":{"type":"literal","value":"tauri://focus"}},{"id":38,"name":"WINDOW_MOVED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":48,"character":2}],"type":{"type":"literal","value":"tauri://move"}},{"id":37,"name":"WINDOW_RESIZED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":47,"character":2}],"type":{"type":"literal","value":"tauri://resize"}},{"id":44,"name":"WINDOW_SCALE_FACTOR_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":54,"character":2}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":45,"name":"WINDOW_THEME_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":55,"character":2}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[49,43,39,40,41,46,48,47,42,38,37,44,45]}],"sources":[{"fileName":"event.ts","line":46,"character":5}]},{"id":2,"name":"Event","variant":"declaration","kind":256,"flags":{},"children":[{"id":3,"name":"event","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"event.ts","line":16,"character":2}],"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":5,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"event.ts","line":20,"character":2}],"type":{"type":"intrinsic","name":"number"}},{"id":6,"name":"payload","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"event.ts","line":22,"character":2}],"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}},{"id":4,"name":"windowLabel","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"event.ts","line":18,"character":2}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[3,5,6,4]}],"sources":[{"fileName":"event.ts","line":14,"character":10}],"typeParameters":[{"id":7,"name":"T","variant":"typeParam","kind":131072,"flags":{}}]},{"id":17,"name":"Options","variant":"declaration","kind":256,"flags":{},"children":[{"id":18,"name":"target","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Label of the window the function targets.\n\nWhen listening to events and using this value,\nonly events triggered by the window with the given label are received.\n\nWhen emitting events, only the window with the given label will receive it."}]},"sources":[{"fileName":"event.ts","line":40,"character":2}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[18]}],"sources":[{"fileName":"event.ts","line":31,"character":10}]},{"id":8,"name":"EventCallback","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":5}],"typeParameters":[{"id":12,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"type":{"type":"reflection","declaration":{"id":9,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":24}],"signatures":[{"id":10,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":11,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":2,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Event","package":"@tauri-apps/api"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":16,"name":"EventName","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":29,"character":5}],"type":{"type":"union","types":[{"type":"templateLiteral","head":"","tail":[[{"type":"reference","target":36,"name":"TauriEvent","package":"@tauri-apps/api"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}]}]}},{"id":13,"name":"UnlistenFn","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":5}],"type":{"type":"reflection","declaration":{"id":14,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":18}],"signatures":[{"id":15,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":31,"name":"emit","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":164,"character":15}],"signatures":[{"id":32,"name":"emit","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend and all Tauri windows."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":164,"character":0}],"parameters":[{"id":33,"name":"event","variant":"param","kind":32768,"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":34,"name":"payload","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}},{"id":35,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":19,"name":"listen","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":99,"character":15}],"signatures":[{"id":20,"name":"listen","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event. The event can be either global or window-specific.\nSee "},{"kind":"inline-tag","tag":"@link","text":"windowLabel","target":4,"tsLinkText":""},{"kind":"text","text":" to check the event source."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":99,"character":0}],"typeParameter":[{"id":21,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":22,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":23,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":24,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":25,"name":"once","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":137,"character":15}],"signatures":[{"id":26,"name":"once","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event. See "},{"kind":"inline-tag","tag":"@link","text":"listen","target":19,"tsLinkText":""},{"kind":"text","text":" for more information."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":137,"character":0}],"typeParameter":[{"id":27,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":28,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":29,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":30,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[36]},{"title":"Interfaces","children":[2,17]},{"title":"Type Aliases","children":[8,16,13]},{"title":"Functions","children":[31,19,25]}],"sources":[{"fileName":"event.ts","line":1,"character":0}]},{"id":50,"name":"mocks","variant":"declaration","kind":2,"flags":{},"children":[{"id":62,"name":"clearMocks","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":178,"character":16}],"signatures":[{"id":63,"name":"clearMocks","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"mocks.ts","line":178,"character":0}],"type":{"type":"intrinsic","name":"void"}}]},{"id":51,"name":"mockIPC","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":80,"character":16}],"signatures":[{"id":52,"name":"mockIPC","variant":"signature","kind":4096,"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, payload) => {\n switch (cmd) {\n case \"add\":\n return (payload.a as number) + (payload.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, payload) => {\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"}]}]},"sources":[{"fileName":"mocks.ts","line":80,"character":0}],"parameters":[{"id":53,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":54,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6}],"signatures":[{"id":55,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6}],"parameters":[{"id":56,"name":"cmd","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":57,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":58,"name":"mockWindows","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":142,"character":16}],"signatures":[{"id":59,"name":"mockWindows","variant":"signature","kind":4096,"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 === \"plugin:event|emit\") {\n console.log('emit event', args?.event, args?.payload);\n }\n});\n\nconst { emit } = await import(\"@tauri-apps/api/event\");\nawait emit('loaded'); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":142,"character":0}],"parameters":[{"id":60,"name":"current","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":61,"name":"additionalWindows","variant":"param","kind":32768,"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":[62,51,58]}],"sources":[{"fileName":"mocks.ts","line":1,"character":0}]},{"id":64,"name":"path","variant":"declaration","kind":2,"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\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":65,"name":"BaseDirectory","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":81,"name":"AppCache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2}],"type":{"type":"literal","value":16}},{"id":78,"name":"AppConfig","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":32,"character":2}],"type":{"type":"literal","value":13}},{"id":79,"name":"AppData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2}],"type":{"type":"literal","value":14}},{"id":80,"name":"AppLocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2}],"type":{"type":"literal","value":15}},{"id":82,"name":"AppLog","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2}],"type":{"type":"literal","value":17}},{"id":66,"name":"Audio","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":20,"character":2}],"type":{"type":"literal","value":1}},{"id":67,"name":"Cache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":21,"character":2}],"type":{"type":"literal","value":2}},{"id":68,"name":"Config","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":22,"character":2}],"type":{"type":"literal","value":3}},{"id":69,"name":"Data","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":23,"character":2}],"type":{"type":"literal","value":4}},{"id":83,"name":"Desktop","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2}],"type":{"type":"literal","value":18}},{"id":71,"name":"Document","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":25,"character":2}],"type":{"type":"literal","value":6}},{"id":72,"name":"Download","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":26,"character":2}],"type":{"type":"literal","value":7}},{"id":84,"name":"Executable","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2}],"type":{"type":"literal","value":19}},{"id":85,"name":"Font","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2}],"type":{"type":"literal","value":20}},{"id":86,"name":"Home","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2}],"type":{"type":"literal","value":21}},{"id":70,"name":"LocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":24,"character":2}],"type":{"type":"literal","value":5}},{"id":73,"name":"Picture","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":27,"character":2}],"type":{"type":"literal","value":8}},{"id":74,"name":"Public","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":28,"character":2}],"type":{"type":"literal","value":9}},{"id":76,"name":"Resource","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":30,"character":2}],"type":{"type":"literal","value":11}},{"id":87,"name":"Runtime","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2}],"type":{"type":"literal","value":22}},{"id":77,"name":"Temp","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":31,"character":2}],"type":{"type":"literal","value":12}},{"id":88,"name":"Template","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2}],"type":{"type":"literal","value":23}},{"id":75,"name":"Video","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":29,"character":2}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[81,78,79,80,82,66,67,68,69,83,71,72,84,85,86,70,73,74,76,87,77,88,75]}],"sources":[{"fileName":"path.ts","line":19,"character":5}]},{"id":95,"name":"appCacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":108,"character":15}],"signatures":[{"id":96,"name":"appCacheDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":108,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":89,"name":"appConfigDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":57,"character":15}],"signatures":[{"id":90,"name":"appConfigDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":57,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":91,"name":"appDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":74,"character":15}],"signatures":[{"id":92,"name":"appDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":74,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":93,"name":"appLocalDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":91,"character":15}],"signatures":[{"id":94,"name":"appLocalDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":91,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":97,"name":"appLogDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":520,"character":15}],"signatures":[{"id":98,"name":"appLogDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":520,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":99,"name":"audioDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":130,"character":15}],"signatures":[{"id":100,"name":"audioDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":130,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":155,"name":"basename","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":653,"character":15}],"signatures":[{"id":156,"name":"basename","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":653,"character":0}],"parameters":[{"id":157,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":158,"name":"ext","variant":"param","kind":32768,"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","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":101,"name":"cacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":152,"character":15}],"signatures":[{"id":102,"name":"cacheDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":152,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":103,"name":"configDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":174,"character":15}],"signatures":[{"id":104,"name":"configDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":174,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":105,"name":"dataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":196,"character":15}],"signatures":[{"id":106,"name":"dataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":196,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":138,"name":"delimiter","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":560,"character":9}],"signatures":[{"id":139,"name":"delimiter","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns 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":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":560,"character":0}],"type":{"type":"intrinsic","name":"string"}}]},{"id":107,"name":"desktopDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":218,"character":15}],"signatures":[{"id":108,"name":"desktopDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":218,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":149,"name":"dirname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":619,"character":15}],"signatures":[{"id":150,"name":"dirname","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":619,"character":0}],"parameters":[{"id":151,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":109,"name":"documentDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":240,"character":15}],"signatures":[{"id":110,"name":"documentDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":240,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":111,"name":"downloadDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":262,"character":15}],"signatures":[{"id":112,"name":"downloadDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":262,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":113,"name":"executableDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":284,"character":15}],"signatures":[{"id":114,"name":"executableDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":284,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":152,"name":"extname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":635,"character":15}],"signatures":[{"id":153,"name":"extname","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":635,"character":0}],"parameters":[{"id":154,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":115,"name":"fontDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":306,"character":15}],"signatures":[{"id":116,"name":"fontDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":306,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":117,"name":"homeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":328,"character":15}],"signatures":[{"id":118,"name":"homeDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":328,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":159,"name":"isAbsolute","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":667,"character":15}],"signatures":[{"id":160,"name":"isAbsolute","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":667,"character":0}],"parameters":[{"id":161,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":146,"name":"join","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":604,"character":15}],"signatures":[{"id":147,"name":"join","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":604,"character":0}],"parameters":[{"id":148,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":119,"name":"localDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":350,"character":15}],"signatures":[{"id":120,"name":"localDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":350,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":143,"name":"normalize","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":589,"character":15}],"signatures":[{"id":144,"name":"normalize","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":589,"character":0}],"parameters":[{"id":145,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":121,"name":"pictureDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":372,"character":15}],"signatures":[{"id":122,"name":"pictureDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":372,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":123,"name":"publicDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":394,"character":15}],"signatures":[{"id":124,"name":"publicDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":394,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":140,"name":"resolve","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":574,"character":15}],"signatures":[{"id":141,"name":"resolve","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":574,"character":0}],"parameters":[{"id":142,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":127,"name":"resolveResource","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":431,"character":15}],"signatures":[{"id":128,"name":"resolveResource","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":431,"character":0}],"parameters":[{"id":129,"name":"resourcePath","variant":"param","kind":32768,"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","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":125,"name":"resourceDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":411,"character":15}],"signatures":[{"id":126,"name":"resourceDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":411,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":130,"name":"runtimeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":454,"character":15}],"signatures":[{"id":131,"name":"runtimeDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":454,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":136,"name":"sep","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":549,"character":9}],"signatures":[{"id":137,"name":"sep","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns 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":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":549,"character":0}],"type":{"type":"intrinsic","name":"string"}}]},{"id":162,"name":"tempDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":536,"character":15}],"signatures":[{"id":163,"name":"tempDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a temporary directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { tempDir } from '@tauri-apps/api/path';\nconst temp = await tempDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":536,"character":0}],"parameters":[{"id":164,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":132,"name":"templateDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":476,"character":15}],"signatures":[{"id":133,"name":"templateDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":476,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":134,"name":"videoDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":498,"character":15}],"signatures":[{"id":135,"name":"videoDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":498,"character":0}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[65]},{"title":"Functions","children":[95,89,91,93,97,99,155,101,103,105,138,107,149,109,111,113,152,115,117,159,146,119,143,121,123,140,127,125,130,136,162,132,134]}],"sources":[{"fileName":"path.ts","line":1,"character":0}]},{"id":165,"name":"tauri","variant":"declaration","kind":2,"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":176,"name":"Channel","variant":"declaration","kind":128,"flags":{},"children":[{"id":177,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":71,"character":2}],"signatures":[{"id":178,"name":"new Channel","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":71,"character":2}],"typeParameter":[{"id":179,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":176,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Channel","package":"@tauri-apps/api"}}]},{"id":182,"name":"#onmessage","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":67,"character":2}],"type":{"type":"reflection","declaration":{"id":183,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":67,"character":14}],"signatures":[{"id":184,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":67,"character":14}],"parameters":[{"id":185,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":181,"name":"__TAURI_CHANNEL_MARKER__","variant":"declaration","kind":1024,"flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":66,"character":19}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":180,"name":"id","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":64,"character":2}],"type":{"type":"intrinsic","name":"number"}},{"id":186,"name":"onmessage","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":6},{"fileName":"tauri.ts","line":81,"character":6}],"getSignature":{"id":187,"name":"onmessage","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":2}],"type":{"type":"reflection","declaration":{"id":188,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":19}],"signatures":[{"id":189,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":19}],"parameters":[{"id":190,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":191,"name":"onmessage","variant":"signature","kind":1048576,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":2}],"parameters":[{"id":192,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":193,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":25}],"signatures":[{"id":194,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":25}],"parameters":[{"id":195,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":196,"name":"toJSON","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":85,"character":2}],"signatures":[{"id":197,"name":"toJSON","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":85,"character":2}],"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[177]},{"title":"Properties","children":[182,181,180]},{"title":"Accessors","children":[186]},{"title":"Methods","children":[196]}],"sources":[{"fileName":"tauri.ts","line":63,"character":6}],"typeParameters":[{"id":198,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":199,"name":"PluginListener","variant":"declaration","kind":128,"flags":{},"children":[{"id":200,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":95,"character":2}],"signatures":[{"id":201,"name":"new PluginListener","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":95,"character":2}],"parameters":[{"id":202,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":203,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":204,"name":"channelId","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":199,"name":"PluginListener","package":"@tauri-apps/api"}}]},{"id":207,"name":"channelId","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":93,"character":2}],"type":{"type":"intrinsic","name":"number"}},{"id":206,"name":"event","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":92,"character":2}],"type":{"type":"intrinsic","name":"string"}},{"id":205,"name":"plugin","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":91,"character":2}],"type":{"type":"intrinsic","name":"string"}},{"id":208,"name":"unregister","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":101,"character":8}],"signatures":[{"id":209,"name":"unregister","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":101,"character":2}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[200]},{"title":"Properties","children":[207,206,205]},{"title":"Methods","children":[208]}],"sources":[{"fileName":"tauri.ts","line":90,"character":6}]},{"id":167,"name":"InvokeOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":168,"name":"headers","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":139,"character":2}],"type":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.dom.d.ts","qualifiedName":"Headers"},"name":"Headers","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/API/Headers"}]}}],"groups":[{"title":"Properties","children":[168]}],"sources":[{"fileName":"tauri.ts","line":138,"character":10}]},{"id":166,"name":"InvokeArgs","variant":"declaration","kind":4194304,"flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":133,"character":5}],"type":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"},{"type":"array","elementType":{"type":"intrinsic","name":"number"}},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"ArrayBuffer"},"name":"ArrayBuffer","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":210,"name":"addPluginListener","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":116,"character":15}],"signatures":[{"id":211,"name":"addPluginListener","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a listener to a plugin event."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The listener object to stop listening to the events."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":116,"character":0}],"typeParameter":[{"id":212,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":213,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":214,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":215,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":216,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":119,"character":6}],"signatures":[{"id":217,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":119,"character":6}],"parameters":[{"id":218,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":199,"name":"PluginListener","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":225,"name":"convertFileSrc","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":212,"character":9}],"signatures":[{"id":226,"name":"convertFileSrc","variant":"signature","kind":4096,"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' ipc: https://ipc.localhost; 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"}]}]},"sources":[{"fileName":"tauri.ts","line":212,"character":0}],"parameters":[{"id":227,"name":"filePath","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":228,"name":"protocol","variant":"param","kind":32768,"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":219,"name":"invoke","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":157,"character":15}],"signatures":[{"id":220,"name":"invoke","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"tauri.ts","line":157,"character":0}],"typeParameter":[{"id":221,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":222,"name":"cmd","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":223,"name":"args","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","target":166,"name":"InvokeArgs","package":"@tauri-apps/api"},"defaultValue":"{}"},{"id":224,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The request options."}]},"type":{"type":"reference","target":167,"name":"InvokeOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":169,"name":"transformCallback","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":41,"character":9}],"signatures":[{"id":170,"name":"transformCallback","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"tauri.ts","line":41,"character":0}],"parameters":[{"id":171,"name":"callback","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":172,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":42,"character":13}],"signatures":[{"id":173,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":42,"character":13}],"parameters":[{"id":174,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":175,"name":"once","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[176,199]},{"title":"Interfaces","children":[167]},{"title":"Type Aliases","children":[166]},{"title":"Functions","children":[210,225,219,169]}],"sources":[{"fileName":"tauri.ts","line":1,"character":0}]}],"groups":[{"title":"Modules","children":[1,50,64,165]}],"packageName":"@tauri-apps/api","symbolIdMap":{"1":{"sourceFileName":"src/event.ts","qualifiedName":""},"2":{"sourceFileName":"src/event.ts","qualifiedName":"Event"},"3":{"sourceFileName":"src/event.ts","qualifiedName":"Event.event"},"4":{"sourceFileName":"src/event.ts","qualifiedName":"Event.windowLabel"},"5":{"sourceFileName":"src/event.ts","qualifiedName":"Event.id"},"6":{"sourceFileName":"src/event.ts","qualifiedName":"Event.payload"},"7":{"sourceFileName":"src/event.ts","qualifiedName":"Event.T"},"8":{"sourceFileName":"src/event.ts","qualifiedName":"EventCallback"},"9":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"10":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"11":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"12":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"13":{"sourceFileName":"src/event.ts","qualifiedName":"UnlistenFn"},"14":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"15":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"16":{"sourceFileName":"src/event.ts","qualifiedName":"EventName"},"17":{"sourceFileName":"src/event.ts","qualifiedName":"Options"},"18":{"sourceFileName":"src/event.ts","qualifiedName":"Options.target"},"19":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"20":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"21":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"22":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"23":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"24":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"25":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"26":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"27":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"28":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"29":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"30":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"31":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"32":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"33":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"34":{"sourceFileName":"src/event.ts","qualifiedName":"payload"},"35":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"36":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent"},"37":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_RESIZED"},"38":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_MOVED"},"39":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CLOSE_REQUESTED"},"40":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CREATED"},"41":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_DESTROYED"},"42":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FOCUS"},"43":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_BLUR"},"44":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_SCALE_FACTOR_CHANGED"},"45":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_THEME_CHANGED"},"46":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP"},"47":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_HOVER"},"48":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_CANCELLED"},"49":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.MENU"},"50":{"sourceFileName":"src/mocks.ts","qualifiedName":""},"51":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"52":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"53":{"sourceFileName":"src/mocks.ts","qualifiedName":"cb"},"54":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"55":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"56":{"sourceFileName":"src/mocks.ts","qualifiedName":"cmd"},"57":{"sourceFileName":"src/mocks.ts","qualifiedName":"payload"},"58":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"59":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"60":{"sourceFileName":"src/mocks.ts","qualifiedName":"current"},"61":{"sourceFileName":"src/mocks.ts","qualifiedName":"additionalWindows"},"62":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"63":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"64":{"sourceFileName":"src/path.ts","qualifiedName":""},"65":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory"},"66":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Audio"},"67":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Cache"},"68":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Config"},"69":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Data"},"70":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.LocalData"},"71":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Document"},"72":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Download"},"73":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Picture"},"74":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Public"},"75":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Video"},"76":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Resource"},"77":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Temp"},"78":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppConfig"},"79":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppData"},"80":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLocalData"},"81":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppCache"},"82":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLog"},"83":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Desktop"},"84":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Executable"},"85":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Font"},"86":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Home"},"87":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Runtime"},"88":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Template"},"89":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"90":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"91":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"92":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"93":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"94":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"95":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"96":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"97":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"98":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"99":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"100":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"101":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"102":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"103":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"104":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"105":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"106":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"107":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"108":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"109":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"110":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"111":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"112":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"113":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"114":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"115":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"116":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"117":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"118":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"119":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"120":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"121":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"122":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"123":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"124":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"125":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"126":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"127":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"128":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"129":{"sourceFileName":"src/path.ts","qualifiedName":"resourcePath"},"130":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"131":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"132":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"133":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"134":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"135":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"136":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"137":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"138":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"139":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"140":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"141":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"142":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"143":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"144":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"145":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"146":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"147":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"148":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"149":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"150":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"151":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"152":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"153":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"154":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"155":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"156":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"157":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"158":{"sourceFileName":"src/path.ts","qualifiedName":"ext"},"159":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"160":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"161":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"162":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"163":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"164":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"165":{"sourceFileName":"src/tauri.ts","qualifiedName":""},"166":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeArgs"},"167":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeOptions"},"168":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeOptions.headers"},"169":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"170":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"171":{"sourceFileName":"src/tauri.ts","qualifiedName":"callback"},"172":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"173":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"174":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"175":{"sourceFileName":"src/tauri.ts","qualifiedName":"once"},"176":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"177":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__constructor"},"178":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"179":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"180":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.id"},"181":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__TAURI_CHANNEL_MARKER__"},"182":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.#onmessage"},"183":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"184":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"185":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"186":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"187":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"188":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"189":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"190":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"191":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"192":{"sourceFileName":"src/tauri.ts","qualifiedName":"handler"},"193":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"194":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"195":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"196":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"197":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"198":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"199":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"200":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.__constructor"},"201":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"202":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"203":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"204":{"sourceFileName":"src/tauri.ts","qualifiedName":"channelId"},"205":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.plugin"},"206":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.event"},"207":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.channelId"},"208":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"209":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"210":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"211":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"212":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"213":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"214":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"215":{"sourceFileName":"src/tauri.ts","qualifiedName":"cb"},"216":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"217":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"218":{"sourceFileName":"src/tauri.ts","qualifiedName":"payload"},"219":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"220":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"221":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"222":{"sourceFileName":"src/tauri.ts","qualifiedName":"cmd"},"223":{"sourceFileName":"src/tauri.ts","qualifiedName":"args"},"224":{"sourceFileName":"src/tauri.ts","qualifiedName":"options"},"225":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"226":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"227":{"sourceFileName":"src/tauri.ts","qualifiedName":"filePath"},"228":{"sourceFileName":"src/tauri.ts","qualifiedName":"protocol"}}} \ No newline at end of file +{"id":0,"name":"@tauri-apps/api","variant":"project","kind":1,"flags":{},"children":[{"id":1,"name":"event","variant":"declaration","kind":2,"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":36,"name":"TauriEvent","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":49,"name":"MENU","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":59,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L59"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":50,"name":"TRAY","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":60,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L60"}],"type":{"type":"literal","value":"tauri://tray"}},{"id":43,"name":"WINDOW_BLUR","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L53"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":39,"name":"WINDOW_CLOSE_REQUESTED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L49"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":40,"name":"WINDOW_CREATED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":50,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L50"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":41,"name":"WINDOW_DESTROYED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L51"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":46,"name":"WINDOW_FILE_DROP","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L56"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":48,"name":"WINDOW_FILE_DROP_CANCELLED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":58,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L58"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":47,"name":"WINDOW_FILE_DROP_HOVER","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":57,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L57"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":42,"name":"WINDOW_FOCUS","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L52"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":38,"name":"WINDOW_MOVED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L48"}],"type":{"type":"literal","value":"tauri://move"}},{"id":37,"name":"WINDOW_RESIZED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L47"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":44,"name":"WINDOW_SCALE_FACTOR_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L54"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":45,"name":"WINDOW_THEME_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L55"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[49,50,43,39,40,41,46,48,47,42,38,37,44,45]}],"sources":[{"fileName":"event.ts","line":46,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L46"}]},{"id":2,"name":"Event","variant":"declaration","kind":256,"flags":{},"children":[{"id":3,"name":"event","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L16"}],"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":5,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"event.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L20"}],"type":{"type":"intrinsic","name":"number"}},{"id":6,"name":"payload","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L22"}],"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}},{"id":4,"name":"windowLabel","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"event.ts","line":18,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L18"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[3,5,6,4]}],"sources":[{"fileName":"event.ts","line":14,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L14"}],"typeParameters":[{"id":7,"name":"T","variant":"typeParam","kind":131072,"flags":{}}]},{"id":17,"name":"Options","variant":"declaration","kind":256,"flags":{},"children":[{"id":18,"name":"target","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Label of the window the function targets.\n\nWhen listening to events and using this value,\nonly events triggered by the window with the given label are received.\n\nWhen emitting events, only the window with the given label will receive it."}]},"sources":[{"fileName":"event.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L40"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[18]}],"sources":[{"fileName":"event.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L31"}]},{"id":8,"name":"EventCallback","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L25"}],"typeParameters":[{"id":12,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"type":{"type":"reflection","declaration":{"id":9,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":24,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L25"}],"signatures":[{"id":10,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":11,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":2,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Event","package":"@tauri-apps/api"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":16,"name":"EventName","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L29"}],"type":{"type":"union","types":[{"type":"templateLiteral","head":"","tail":[[{"type":"reference","target":36,"name":"TauriEvent","package":"@tauri-apps/api"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}]}]}},{"id":13,"name":"UnlistenFn","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L27"}],"type":{"type":"reflection","declaration":{"id":14,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":18,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L27"}],"signatures":[{"id":15,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":31,"name":"emit","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L165"}],"signatures":[{"id":32,"name":"emit","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend and all Tauri windows."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":165,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L165"}],"parameters":[{"id":33,"name":"event","variant":"param","kind":32768,"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":34,"name":"payload","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}},{"id":35,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":19,"name":"listen","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":100,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L100"}],"signatures":[{"id":20,"name":"listen","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event. The event can be either global or window-specific.\nSee "},{"kind":"inline-tag","tag":"@link","text":"windowLabel","target":4,"tsLinkText":""},{"kind":"text","text":" to check the event source."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":100,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L100"}],"typeParameter":[{"id":21,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":22,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":23,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":24,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":25,"name":"once","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":138,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L138"}],"signatures":[{"id":26,"name":"once","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event. See "},{"kind":"inline-tag","tag":"@link","text":"listen","target":19,"tsLinkText":""},{"kind":"text","text":" for more information."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":138,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L138"}],"typeParameter":[{"id":27,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":28,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":29,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":30,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[36]},{"title":"Interfaces","children":[2,17]},{"title":"Type Aliases","children":[8,16,13]},{"title":"Functions","children":[31,19,25]}],"sources":[{"fileName":"event.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L1"}]},{"id":65,"name":"menu","variant":"declaration","kind":2,"flags":{},"children":[{"id":116,"name":"NativeIcon","variant":"declaration","kind":8,"flags":{},"children":[{"id":117,"name":"Add","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An add item template image."}]},"sources":[{"fileName":"menu.ts","line":61,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L61"}],"type":{"type":"literal","value":"Add"}},{"id":118,"name":"Advanced","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Advanced preferences toolbar icon for the preferences window."}]},"sources":[{"fileName":"menu.ts","line":63,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L63"}],"type":{"type":"literal","value":"Advanced"}},{"id":119,"name":"Bluetooth","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A Bluetooth template image."}]},"sources":[{"fileName":"menu.ts","line":65,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L65"}],"type":{"type":"literal","value":"Bluetooth"}},{"id":120,"name":"Bookmarks","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Bookmarks image suitable for a template."}]},"sources":[{"fileName":"menu.ts","line":67,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L67"}],"type":{"type":"literal","value":"Bookmarks"}},{"id":121,"name":"Caution","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A caution image."}]},"sources":[{"fileName":"menu.ts","line":69,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L69"}],"type":{"type":"literal","value":"Caution"}},{"id":122,"name":"ColorPanel","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A color panel toolbar icon."}]},"sources":[{"fileName":"menu.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L71"}],"type":{"type":"literal","value":"ColorPanel"}},{"id":123,"name":"ColumnView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A column view mode template image."}]},"sources":[{"fileName":"menu.ts","line":73,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L73"}],"type":{"type":"literal","value":"ColumnView"}},{"id":124,"name":"Computer","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A computer icon."}]},"sources":[{"fileName":"menu.ts","line":75,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L75"}],"type":{"type":"literal","value":"Computer"}},{"id":125,"name":"EnterFullScreen","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An enter full-screen mode template image."}]},"sources":[{"fileName":"menu.ts","line":77,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L77"}],"type":{"type":"literal","value":"EnterFullScreen"}},{"id":126,"name":"Everyone","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for all users."}]},"sources":[{"fileName":"menu.ts","line":79,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L79"}],"type":{"type":"literal","value":"Everyone"}},{"id":127,"name":"ExitFullScreen","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An exit full-screen mode template image."}]},"sources":[{"fileName":"menu.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L81"}],"type":{"type":"literal","value":"ExitFullScreen"}},{"id":128,"name":"FlowView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A cover flow view mode template image."}]},"sources":[{"fileName":"menu.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L83"}],"type":{"type":"literal","value":"FlowView"}},{"id":129,"name":"Folder","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A folder image."}]},"sources":[{"fileName":"menu.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L85"}],"type":{"type":"literal","value":"Folder"}},{"id":130,"name":"FolderBurnable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A burnable folder icon."}]},"sources":[{"fileName":"menu.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L87"}],"type":{"type":"literal","value":"FolderBurnable"}},{"id":131,"name":"FolderSmart","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A smart folder icon."}]},"sources":[{"fileName":"menu.ts","line":89,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L89"}],"type":{"type":"literal","value":"FolderSmart"}},{"id":132,"name":"FollowLinkFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A link template image."}]},"sources":[{"fileName":"menu.ts","line":91,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L91"}],"type":{"type":"literal","value":"FollowLinkFreestanding"}},{"id":133,"name":"FontPanel","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A font panel toolbar icon."}]},"sources":[{"fileName":"menu.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L93"}],"type":{"type":"literal","value":"FontPanel"}},{"id":134,"name":"GoLeft","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A "},{"kind":"code","text":"`go back`"},{"kind":"text","text":" template image."}]},"sources":[{"fileName":"menu.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L95"}],"type":{"type":"literal","value":"GoLeft"}},{"id":135,"name":"GoRight","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A "},{"kind":"code","text":"`go forward`"},{"kind":"text","text":" template image."}]},"sources":[{"fileName":"menu.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L97"}],"type":{"type":"literal","value":"GoRight"}},{"id":136,"name":"Home","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Home image suitable for a template."}]},"sources":[{"fileName":"menu.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L99"}],"type":{"type":"literal","value":"Home"}},{"id":137,"name":"IChatTheater","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An iChat Theater template image."}]},"sources":[{"fileName":"menu.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L101"}],"type":{"type":"literal","value":"IChatTheater"}},{"id":138,"name":"IconView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An icon view mode template image."}]},"sources":[{"fileName":"menu.ts","line":103,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L103"}],"type":{"type":"literal","value":"IconView"}},{"id":139,"name":"Info","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An information toolbar icon."}]},"sources":[{"fileName":"menu.ts","line":105,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L105"}],"type":{"type":"literal","value":"Info"}},{"id":140,"name":"InvalidDataFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A template image used to denote invalid data."}]},"sources":[{"fileName":"menu.ts","line":107,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L107"}],"type":{"type":"literal","value":"InvalidDataFreestanding"}},{"id":141,"name":"LeftFacingTriangle","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A generic left-facing triangle template image."}]},"sources":[{"fileName":"menu.ts","line":109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L109"}],"type":{"type":"literal","value":"LeftFacingTriangle"}},{"id":142,"name":"ListView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A list view mode template image."}]},"sources":[{"fileName":"menu.ts","line":111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L111"}],"type":{"type":"literal","value":"ListView"}},{"id":143,"name":"LockLocked","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A locked padlock template image."}]},"sources":[{"fileName":"menu.ts","line":113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L113"}],"type":{"type":"literal","value":"LockLocked"}},{"id":144,"name":"LockUnlocked","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An unlocked padlock template image."}]},"sources":[{"fileName":"menu.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L115"}],"type":{"type":"literal","value":"LockUnlocked"}},{"id":145,"name":"MenuMixedState","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A horizontal dash, for use in menus."}]},"sources":[{"fileName":"menu.ts","line":117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L117"}],"type":{"type":"literal","value":"MenuMixedState"}},{"id":146,"name":"MenuOnState","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A check mark template image, for use in menus."}]},"sources":[{"fileName":"menu.ts","line":119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L119"}],"type":{"type":"literal","value":"MenuOnState"}},{"id":147,"name":"MobileMe","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A MobileMe icon."}]},"sources":[{"fileName":"menu.ts","line":121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L121"}],"type":{"type":"literal","value":"MobileMe"}},{"id":148,"name":"MultipleDocuments","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A drag image for multiple items."}]},"sources":[{"fileName":"menu.ts","line":123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L123"}],"type":{"type":"literal","value":"MultipleDocuments"}},{"id":149,"name":"Network","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A network icon."}]},"sources":[{"fileName":"menu.ts","line":125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L125"}],"type":{"type":"literal","value":"Network"}},{"id":150,"name":"Path","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A path button template image."}]},"sources":[{"fileName":"menu.ts","line":127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L127"}],"type":{"type":"literal","value":"Path"}},{"id":151,"name":"PreferencesGeneral","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"General preferences toolbar icon for the preferences window."}]},"sources":[{"fileName":"menu.ts","line":129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L129"}],"type":{"type":"literal","value":"PreferencesGeneral"}},{"id":152,"name":"QuickLook","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A Quick Look template image."}]},"sources":[{"fileName":"menu.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L131"}],"type":{"type":"literal","value":"QuickLook"}},{"id":154,"name":"Refresh","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A refresh template image."}]},"sources":[{"fileName":"menu.ts","line":135,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L135"}],"type":{"type":"literal","value":"Refresh"}},{"id":153,"name":"RefreshFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A refresh template image."}]},"sources":[{"fileName":"menu.ts","line":133,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L133"}],"type":{"type":"literal","value":"RefreshFreestanding"}},{"id":155,"name":"Remove","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A remove item template image."}]},"sources":[{"fileName":"menu.ts","line":137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L137"}],"type":{"type":"literal","value":"Remove"}},{"id":156,"name":"RevealFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A reveal contents template image."}]},"sources":[{"fileName":"menu.ts","line":139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L139"}],"type":{"type":"literal","value":"RevealFreestanding"}},{"id":157,"name":"RightFacingTriangle","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A generic right-facing triangle template image."}]},"sources":[{"fileName":"menu.ts","line":141,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L141"}],"type":{"type":"literal","value":"RightFacingTriangle"}},{"id":158,"name":"Share","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A share view template image."}]},"sources":[{"fileName":"menu.ts","line":143,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L143"}],"type":{"type":"literal","value":"Share"}},{"id":159,"name":"Slideshow","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A slideshow template image."}]},"sources":[{"fileName":"menu.ts","line":145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L145"}],"type":{"type":"literal","value":"Slideshow"}},{"id":160,"name":"SmartBadge","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A badge for a "},{"kind":"code","text":"`smart`"},{"kind":"text","text":" item."}]},"sources":[{"fileName":"menu.ts","line":147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L147"}],"type":{"type":"literal","value":"SmartBadge"}},{"id":161,"name":"StatusAvailable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small green indicator, similar to iChat’s available image."}]},"sources":[{"fileName":"menu.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L149"}],"type":{"type":"literal","value":"StatusAvailable"}},{"id":162,"name":"StatusNone","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small clear indicator."}]},"sources":[{"fileName":"menu.ts","line":151,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L151"}],"type":{"type":"literal","value":"StatusNone"}},{"id":163,"name":"StatusPartiallyAvailable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small yellow indicator, similar to iChat’s idle image."}]},"sources":[{"fileName":"menu.ts","line":153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L153"}],"type":{"type":"literal","value":"StatusPartiallyAvailable"}},{"id":164,"name":"StatusUnavailable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small red indicator, similar to iChat’s unavailable image."}]},"sources":[{"fileName":"menu.ts","line":155,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L155"}],"type":{"type":"literal","value":"StatusUnavailable"}},{"id":166,"name":"StopProgress","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A stop progress button template image."}]},"sources":[{"fileName":"menu.ts","line":159,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L159"}],"type":{"type":"literal","value":"StopProgress"}},{"id":165,"name":"StopProgressFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A stop progress template image."}]},"sources":[{"fileName":"menu.ts","line":157,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L157"}],"type":{"type":"literal","value":"StopProgressFreestanding"}},{"id":167,"name":"TrashEmpty","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An image of the empty trash can."}]},"sources":[{"fileName":"menu.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L161"}],"type":{"type":"literal","value":"TrashEmpty"}},{"id":168,"name":"TrashFull","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An image of the full trash can."}]},"sources":[{"fileName":"menu.ts","line":163,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L163"}],"type":{"type":"literal","value":"TrashFull"}},{"id":169,"name":"User","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for a single user."}]},"sources":[{"fileName":"menu.ts","line":165,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L165"}],"type":{"type":"literal","value":"User"}},{"id":170,"name":"UserAccounts","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"User account toolbar icon for the preferences window."}]},"sources":[{"fileName":"menu.ts","line":167,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L167"}],"type":{"type":"literal","value":"UserAccounts"}},{"id":171,"name":"UserGroup","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for a group of users."}]},"sources":[{"fileName":"menu.ts","line":169,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L169"}],"type":{"type":"literal","value":"UserGroup"}},{"id":172,"name":"UserGuest","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for guests."}]},"sources":[{"fileName":"menu.ts","line":171,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L171"}],"type":{"type":"literal","value":"UserGuest"}}],"groups":[{"title":"Enumeration Members","children":[117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,153,155,156,157,158,159,160,161,162,163,164,166,165,167,168,169,170,171,172]}],"sources":[{"fileName":"menu.ts","line":59,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L59"}]},{"id":209,"name":"CheckMenuItem","variant":"declaration","kind":128,"flags":{},"children":[{"id":217,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":550,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L550"}],"signatures":[{"id":218,"name":"new CheckMenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":550,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L550"}],"parameters":[{"id":219,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":220,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}},{"id":239,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#id"}},{"id":240,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#kind"}},{"id":245,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#rid"}},{"id":241,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":242,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},{"id":243,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":244,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},{"id":246,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":247,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},{"id":248,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":249,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}},{"id":221,"name":"isChecked","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":560,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L560"}],"signatures":[{"id":222,"name":"isChecked","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":560,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L560"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":229,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"signatures":[{"id":230,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}},{"id":226,"name":"setAccelerator","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"signatures":[{"id":227,"name":"setAccelerator","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"parameters":[{"id":228,"name":"accelerator","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}},{"id":223,"name":"setChecked","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":564,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L564"}],"signatures":[{"id":224,"name":"setChecked","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":564,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L564"}],"parameters":[{"id":225,"name":"checked","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":231,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"signatures":[{"id":232,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"parameters":[{"id":233,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}},{"id":236,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"signatures":[{"id":237,"name":"setText","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"parameters":[{"id":238,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}},{"id":234,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"signatures":[{"id":235,"name":"text","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}},{"id":213,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":214,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":215,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":216,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}},{"id":210,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":554,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L554"}],"signatures":[{"id":211,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":554,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L554"}],"parameters":[{"id":212,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[217]},{"title":"Properties","children":[239,240,245]},{"title":"Accessors","children":[241,243,246]},{"title":"Methods","children":[248,221,229,226,223,231,236,234,213,210]}],"sources":[{"fileName":"menu.ts","line":549,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L549"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4"},"name":"MenuItemBase4","package":"@tauri-apps/api"}]},{"id":250,"name":"IconMenuItem","variant":"declaration","kind":128,"flags":{},"children":[{"id":258,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":577,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L577"}],"signatures":[{"id":259,"name":"new IconMenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":577,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L577"}],"parameters":[{"id":260,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":261,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}},{"id":281,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#id"}},{"id":282,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#kind"}},{"id":287,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#rid"}},{"id":283,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":284,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},{"id":285,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":286,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},{"id":288,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":289,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},{"id":290,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":291,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}},{"id":271,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"signatures":[{"id":272,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}},{"id":268,"name":"setAccelerator","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"signatures":[{"id":269,"name":"setAccelerator","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"parameters":[{"id":270,"name":"accelerator","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}},{"id":273,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"signatures":[{"id":274,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"parameters":[{"id":275,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}},{"id":262,"name":"setIcon","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":587,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L587"}],"signatures":[{"id":263,"name":"setIcon","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":587,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L587"}],"parameters":[{"id":264,"name":"icon","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":265,"name":"setNativeIcon","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":591,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L591"}],"signatures":[{"id":266,"name":"setNativeIcon","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":591,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L591"}],"parameters":[{"id":267,"name":"icon","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":116,"name":"NativeIcon","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":278,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"signatures":[{"id":279,"name":"setText","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"parameters":[{"id":280,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}},{"id":276,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"signatures":[{"id":277,"name":"text","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}},{"id":254,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":255,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":256,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":257,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}},{"id":251,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":581,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L581"}],"signatures":[{"id":252,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":581,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L581"}],"parameters":[{"id":253,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":106,"name":"IconMenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[258]},{"title":"Properties","children":[281,282,287]},{"title":"Accessors","children":[283,285,288]},{"title":"Methods","children":[290,271,268,273,262,265,278,276,254,251]}],"sources":[{"fileName":"menu.ts","line":576,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L576"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4"},"name":"MenuItemBase4","package":"@tauri-apps/api"}]},{"id":357,"name":"Menu","variant":"declaration","kind":128,"flags":{},"children":[{"id":367,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":380,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L380"}],"signatures":[{"id":368,"name":"new Menu","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":380,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L380"}],"parameters":[{"id":369,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":370,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuBase.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuBase.constructor"}},{"id":404,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.#id"}},{"id":405,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.#kind"}},{"id":410,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.#rid"}},{"id":406,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":407,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.id"}},{"id":408,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":409,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.kind"}},{"id":411,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":412,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.rid"}},{"id":376,"name":"append","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":248,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L248"}],"signatures":[{"id":377,"name":"append","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":248,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L248"}],"typeParameter":[{"id":378,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":379,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.append"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.append"}},{"id":413,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":414,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.close"}},{"id":397,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":339,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L339"}],"signatures":[{"id":398,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":339,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L339"}],"parameters":[{"id":399,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.get"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.get"}},{"id":384,"name":"insert","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":284,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L284"}],"signatures":[{"id":385,"name":"insert","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":284,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L284"}],"typeParameter":[{"id":386,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":387,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}},{"id":388,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.insert"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.insert"}},{"id":395,"name":"items","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":330,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L330"}],"signatures":[{"id":396,"name":"items","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":330,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L330"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.items"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.items"}},{"id":400,"name":"popup","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":358,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L358"}],"signatures":[{"id":401,"name":"popup","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":358,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L358"}],"parameters":[{"id":402,"name":"window","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":403,"name":"position","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"number"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.popup"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.popup"}},{"id":380,"name":"prepend","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":266,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L266"}],"signatures":[{"id":381,"name":"prepend","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":266,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L266"}],"typeParameter":[{"id":382,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":383,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.prepend"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.prepend"}},{"id":389,"name":"remove","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":303,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L303"}],"signatures":[{"id":390,"name":"remove","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":303,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L303"}],"parameters":[{"id":391,"name":"item","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.remove"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.remove"}},{"id":392,"name":"removeAt","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":313,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L313"}],"signatures":[{"id":393,"name":"removeAt","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":313,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L313"}],"parameters":[{"id":394,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.removeAt"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.removeAt"}},{"id":371,"name":"setAsAppMenu","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":394,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L394"}],"signatures":[{"id":372,"name":"setAsAppMenu","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":394,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L394"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":373,"name":"setAsWindowMenu","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":401,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L401"}],"signatures":[{"id":374,"name":"setAsWindowMenu","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":401,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L401"}],"parameters":[{"id":375,"name":"window","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":363,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":364,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":365,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":366,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase._new"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase._new"}},{"id":361,"name":"default","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":388,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L388"}],"signatures":[{"id":362,"name":"default","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":388,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L388"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":358,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":384,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L384"}],"signatures":[{"id":359,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":384,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L384"}],"parameters":[{"id":360,"name":"opts","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":68,"name":"MenuOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[367]},{"title":"Properties","children":[404,405,410]},{"title":"Accessors","children":[406,408,411]},{"title":"Methods","children":[376,413,397,384,395,400,380,389,392,371,373,363,361,358]}],"sources":[{"fileName":"menu.ts","line":379,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L379"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase"},"name":"MenuBase","package":"@tauri-apps/api"}]},{"id":173,"name":"MenuItem","variant":"declaration","kind":128,"flags":{},"children":[{"id":181,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":456,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L456"}],"signatures":[{"id":182,"name":"new MenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":456,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L456"}],"parameters":[{"id":183,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":184,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}},{"id":198,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#id"}},{"id":199,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#kind"}},{"id":204,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#rid"}},{"id":200,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":201,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},{"id":202,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":203,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},{"id":205,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":206,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},{"id":207,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":208,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}},{"id":188,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"signatures":[{"id":189,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}},{"id":185,"name":"setAccelerator","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"signatures":[{"id":186,"name":"setAccelerator","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"parameters":[{"id":187,"name":"accelerator","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}},{"id":190,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"signatures":[{"id":191,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"parameters":[{"id":192,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}},{"id":195,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"signatures":[{"id":196,"name":"setText","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"parameters":[{"id":197,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}},{"id":193,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"signatures":[{"id":194,"name":"text","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}},{"id":177,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":178,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":179,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":180,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}},{"id":174,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":460,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L460"}],"signatures":[{"id":175,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":460,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L460"}],"parameters":[{"id":176,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[181]},{"title":"Properties","children":[198,199,204]},{"title":"Accessors","children":[200,202,205]},{"title":"Methods","children":[207,188,185,190,195,193,177,174]}],"sources":[{"fileName":"menu.ts","line":455,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L455"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4"},"name":"MenuItemBase4","package":"@tauri-apps/api"}]},{"id":292,"name":"Submenu","variant":"declaration","kind":128,"flags":{},"children":[{"id":300,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":472,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L472"}],"signatures":[{"id":301,"name":"new Submenu","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":472,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L472"}],"parameters":[{"id":302,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":303,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.constructor"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.constructor"}},{"id":336,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.#id"}},{"id":337,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.#kind"}},{"id":342,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.#rid"}},{"id":338,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":339,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.id"}},{"id":340,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":341,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.kind"}},{"id":343,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":344,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.rid"}},{"id":308,"name":"append","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":248,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L248"}],"signatures":[{"id":309,"name":"append","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":248,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L248"}],"typeParameter":[{"id":310,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":311,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":345,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":346,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.close"}},{"id":329,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":339,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L339"}],"signatures":[{"id":330,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":339,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L339"}],"parameters":[{"id":331,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":316,"name":"insert","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":284,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L284"}],"signatures":[{"id":317,"name":"insert","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":284,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L284"}],"typeParameter":[{"id":318,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":319,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}},{"id":320,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":347,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"signatures":[{"id":348,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.isEnabled"}},{"id":327,"name":"items","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":330,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L330"}],"signatures":[{"id":328,"name":"items","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":330,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L330"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":332,"name":"popup","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":358,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L358"}],"signatures":[{"id":333,"name":"popup","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":358,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L358"}],"parameters":[{"id":334,"name":"window","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":335,"name":"position","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"number"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":312,"name":"prepend","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":266,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L266"}],"signatures":[{"id":313,"name":"prepend","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":266,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L266"}],"typeParameter":[{"id":314,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":315,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":321,"name":"remove","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":303,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L303"}],"signatures":[{"id":322,"name":"remove","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":303,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L303"}],"parameters":[{"id":323,"name":"item","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":324,"name":"removeAt","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":313,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L313"}],"signatures":[{"id":325,"name":"removeAt","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":313,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L313"}],"parameters":[{"id":326,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":306,"name":"setAsHelpMenuForNSApp","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":486,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L486"}],"signatures":[{"id":307,"name":"setAsHelpMenuForNSApp","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":486,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L486"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":304,"name":"setAsWindowsMenuForNSApp","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":480,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L480"}],"signatures":[{"id":305,"name":"setAsWindowsMenuForNSApp","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":480,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L480"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":349,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"signatures":[{"id":350,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"parameters":[{"id":351,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setEnabled"}},{"id":354,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"signatures":[{"id":355,"name":"setText","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"parameters":[{"id":356,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setText"}},{"id":352,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"signatures":[{"id":353,"name":"text","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.text"}},{"id":296,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":297,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":298,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":299,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":293,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":476,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L476"}],"signatures":[{"id":294,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":476,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L476"}],"parameters":[{"id":295,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":79,"name":"SubmenuOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[300]},{"title":"Properties","children":[336,337,342]},{"title":"Accessors","children":[338,340,343]},{"title":"Methods","children":[308,345,329,316,347,327,332,312,321,324,306,304,349,354,352,296,293]}],"sources":[{"fileName":"menu.ts","line":470,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L470"},{"fileName":"menu.ts","line":471,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L471"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3"},"name":"MenuItemBase3","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase"},"name":"MenuBase","package":"@tauri-apps/api"}]},{"id":97,"name":"CheckMenuItemOptions","variant":"declaration","kind":256,"flags":{},"children":[{"id":102,"name":"accelerator","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":451,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L451"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":75,"name":"MenuItemOptions.accelerator"}},{"id":103,"name":"action","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":452,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"reflection","declaration":{"id":104,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"signatures":[{"id":105,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"intrinsic","name":"void"}}]}},"inheritedFrom":{"type":"reference","target":76,"name":"MenuItemOptions.action"}},{"id":98,"name":"checked","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":546,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L546"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":101,"name":"enabled","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":450,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L450"}],"type":{"type":"intrinsic","name":"boolean"},"inheritedFrom":{"type":"reference","target":74,"name":"MenuItemOptions.enabled"}},{"id":99,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":448,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L448"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":72,"name":"MenuItemOptions.id"}},{"id":100,"name":"text","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":449,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L449"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":73,"name":"MenuItemOptions.text"}}],"groups":[{"title":"Properties","children":[102,103,98,101,99,100]}],"sources":[{"fileName":"menu.ts","line":545,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L545"}],"extendedTypes":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}]},{"id":106,"name":"IconMenuItemOptions","variant":"declaration","kind":256,"flags":{},"children":[{"id":112,"name":"accelerator","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":451,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L451"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":75,"name":"MenuItemOptions.accelerator"}},{"id":113,"name":"action","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":452,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"reflection","declaration":{"id":114,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"signatures":[{"id":115,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"intrinsic","name":"void"}}]}},"inheritedFrom":{"type":"reference","target":76,"name":"MenuItemOptions.action"}},{"id":111,"name":"enabled","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":450,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L450"}],"type":{"type":"intrinsic","name":"boolean"},"inheritedFrom":{"type":"reference","target":74,"name":"MenuItemOptions.enabled"}},{"id":107,"name":"icon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":573,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L573"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":109,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":448,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L448"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":72,"name":"MenuItemOptions.id"}},{"id":108,"name":"nativeIcon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":574,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L574"}],"type":{"type":"reference","target":116,"name":"NativeIcon","package":"@tauri-apps/api"}},{"id":110,"name":"text","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":449,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L449"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":73,"name":"MenuItemOptions.text"}}],"groups":[{"title":"Properties","children":[112,113,111,107,109,108,110]}],"sources":[{"fileName":"menu.ts","line":572,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L572"}],"extendedTypes":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}]},{"id":66,"name":"MenuEvent","variant":"declaration","kind":256,"flags":{},"children":[{"id":67,"name":"id","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"menu.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L20"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[67]}],"sources":[{"fileName":"menu.ts","line":19,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L19"}]},{"id":71,"name":"MenuItemOptions","variant":"declaration","kind":256,"flags":{},"children":[{"id":75,"name":"accelerator","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":451,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L451"}],"type":{"type":"intrinsic","name":"string"}},{"id":76,"name":"action","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":452,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"reflection","declaration":{"id":77,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"signatures":[{"id":78,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":74,"name":"enabled","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":450,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L450"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":72,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":448,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L448"}],"type":{"type":"intrinsic","name":"string"}},{"id":73,"name":"text","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":449,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L449"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[75,76,74,72,73]}],"sources":[{"fileName":"menu.ts","line":447,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L447"}],"extendedBy":[{"type":"reference","target":97,"name":"CheckMenuItemOptions"},{"type":"reference","target":106,"name":"IconMenuItemOptions"}]},{"id":68,"name":"MenuOptions","variant":"declaration","kind":256,"flags":{},"children":[{"id":69,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":369,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L369"}],"type":{"type":"intrinsic","name":"string"}},{"id":70,"name":"items","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"menu.ts","line":370,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L370"}],"type":{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}}],"groups":[{"title":"Properties","children":[69,70]}],"sources":[{"fileName":"menu.ts","line":368,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L368"}]},{"id":80,"name":"PredefinedMenuItemOptions","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"menu.ts","line":495,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L495"}],"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Omit"},"typeArguments":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"},{"type":"union","types":[{"type":"literal","value":"enabled"},{"type":"literal","value":"accelerator"},{"type":"literal","value":"id"},{"type":"literal","value":"action"}]}],"name":"Omit","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys"},{"type":"reflection","declaration":{"id":81,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":82,"name":"item","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"menu.ts","line":499,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L499"}],"type":{"type":"union","types":[{"type":"literal","value":"Separator"},{"type":"literal","value":"Copy"},{"type":"literal","value":"Cut"},{"type":"literal","value":"Paste"},{"type":"literal","value":"SelectAll"},{"type":"literal","value":"Undo"},{"type":"literal","value":"Redo"},{"type":"literal","value":"Minimize"},{"type":"literal","value":"Maximize"},{"type":"literal","value":"Fullscreen"},{"type":"literal","value":"Hide"},{"type":"literal","value":"HideOthers"},{"type":"literal","value":"ShowAll"},{"type":"literal","value":"CloseWindow"},{"type":"literal","value":"Quit"},{"type":"literal","value":"Services"},{"type":"reflection","declaration":{"id":83,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":84,"name":"About","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"menu.ts","line":517,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L517"}],"type":{"type":"reflection","declaration":{"id":85,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":89,"name":"authors","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":521,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L521"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":90,"name":"comments","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":522,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L522"}],"type":{"type":"intrinsic","name":"string"}},{"id":91,"name":"copyright","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":523,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L523"}],"type":{"type":"intrinsic","name":"string"}},{"id":95,"name":"credits","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":527,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L527"}],"type":{"type":"intrinsic","name":"string"}},{"id":96,"name":"icon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":528,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L528"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":92,"name":"license","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":524,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L524"}],"type":{"type":"intrinsic","name":"string"}},{"id":86,"name":"name","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":518,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L518"}],"type":{"type":"intrinsic","name":"string"}},{"id":88,"name":"short_version","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":520,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L520"}],"type":{"type":"intrinsic","name":"string"}},{"id":87,"name":"version","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":519,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L519"}],"type":{"type":"intrinsic","name":"string"}},{"id":93,"name":"website","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":525,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L525"}],"type":{"type":"intrinsic","name":"string"}},{"id":94,"name":"website_label","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":526,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L526"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[89,90,91,95,96,92,86,88,87,93,94]}],"sources":[{"fileName":"menu.ts","line":517,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L517"}]}}}],"groups":[{"title":"Properties","children":[84]}],"sources":[{"fileName":"menu.ts","line":516,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L516"}]}}]}}],"groups":[{"title":"Properties","children":[82]}],"sources":[{"fileName":"menu.ts","line":498,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L498"}]}}]}},{"id":79,"name":"SubmenuOptions","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"menu.ts","line":467,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L467"}],"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Omit"},"typeArguments":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"},{"type":"union","types":[{"type":"literal","value":"accelerator"},{"type":"literal","value":"action"}]}],"name":"Omit","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys"},{"type":"reference","target":68,"name":"MenuOptions","package":"@tauri-apps/api"}]}}],"groups":[{"title":"Enumerations","children":[116]},{"title":"Classes","children":[209,250,357,173,292]},{"title":"Interfaces","children":[97,106,66,71,68]},{"title":"Type Aliases","children":[80,79]}],"sources":[{"fileName":"menu.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L1"}]},{"id":51,"name":"mocks","variant":"declaration","kind":2,"flags":{},"children":[{"id":63,"name":"clearMocks","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":178,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L178"}],"signatures":[{"id":64,"name":"clearMocks","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"mocks.ts","line":178,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L178"}],"type":{"type":"intrinsic","name":"void"}}]},{"id":52,"name":"mockIPC","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":80,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L80"}],"signatures":[{"id":53,"name":"mockIPC","variant":"signature","kind":4096,"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, payload) => {\n switch (cmd) {\n case \"add\":\n return (payload.a as number) + (payload.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, payload) => {\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"}]}]},"sources":[{"fileName":"mocks.ts","line":80,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L80"}],"parameters":[{"id":54,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":55,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L81"}],"signatures":[{"id":56,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L81"}],"parameters":[{"id":57,"name":"cmd","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":58,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":59,"name":"mockWindows","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":142,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L142"}],"signatures":[{"id":60,"name":"mockWindows","variant":"signature","kind":4096,"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 === \"plugin:event|emit\") {\n console.log('emit event', args?.event, args?.payload);\n }\n});\n\nconst { emit } = await import(\"@tauri-apps/api/event\");\nawait emit('loaded'); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":142,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L142"}],"parameters":[{"id":61,"name":"current","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":62,"name":"additionalWindows","variant":"param","kind":32768,"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":[63,52,59]}],"sources":[{"fileName":"mocks.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L1"}]},{"id":415,"name":"path","variant":"declaration","kind":2,"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\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":416,"name":"BaseDirectory","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":432,"name":"AppCache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":16}},{"id":429,"name":"AppConfig","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L32"}],"type":{"type":"literal","value":13}},{"id":430,"name":"AppData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":14}},{"id":431,"name":"AppLocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":15}},{"id":433,"name":"AppLog","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":17}},{"id":417,"name":"Audio","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L20"}],"type":{"type":"literal","value":1}},{"id":418,"name":"Cache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L21"}],"type":{"type":"literal","value":2}},{"id":419,"name":"Config","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L22"}],"type":{"type":"literal","value":3}},{"id":420,"name":"Data","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L23"}],"type":{"type":"literal","value":4}},{"id":434,"name":"Desktop","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":18}},{"id":422,"name":"Document","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L25"}],"type":{"type":"literal","value":6}},{"id":423,"name":"Download","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L26"}],"type":{"type":"literal","value":7}},{"id":435,"name":"Executable","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":19}},{"id":436,"name":"Font","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":20}},{"id":437,"name":"Home","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":21}},{"id":421,"name":"LocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L24"}],"type":{"type":"literal","value":5}},{"id":424,"name":"Picture","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L27"}],"type":{"type":"literal","value":8}},{"id":425,"name":"Public","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L28"}],"type":{"type":"literal","value":9}},{"id":427,"name":"Resource","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L30"}],"type":{"type":"literal","value":11}},{"id":438,"name":"Runtime","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":22}},{"id":428,"name":"Temp","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L31"}],"type":{"type":"literal","value":12}},{"id":439,"name":"Template","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":23}},{"id":426,"name":"Video","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L29"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[432,429,430,431,433,417,418,419,420,434,422,423,435,436,437,421,424,425,427,438,428,439,426]}],"sources":[{"fileName":"path.ts","line":19,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L19"}]},{"id":446,"name":"appCacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":108,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L108"}],"signatures":[{"id":447,"name":"appCacheDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":108,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L108"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":440,"name":"appConfigDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":57,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L57"}],"signatures":[{"id":441,"name":"appConfigDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":57,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L57"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":442,"name":"appDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":74,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L74"}],"signatures":[{"id":443,"name":"appDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":74,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L74"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":444,"name":"appLocalDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":91,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L91"}],"signatures":[{"id":445,"name":"appLocalDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":91,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L91"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":448,"name":"appLogDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":520,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L520"}],"signatures":[{"id":449,"name":"appLogDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":520,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L520"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":450,"name":"audioDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":130,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L130"}],"signatures":[{"id":451,"name":"audioDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":130,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L130"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":506,"name":"basename","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":653,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L653"}],"signatures":[{"id":507,"name":"basename","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":653,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L653"}],"parameters":[{"id":508,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":509,"name":"ext","variant":"param","kind":32768,"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","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":452,"name":"cacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":152,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L152"}],"signatures":[{"id":453,"name":"cacheDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":152,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L152"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":454,"name":"configDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":174,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L174"}],"signatures":[{"id":455,"name":"configDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":174,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L174"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":456,"name":"dataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":196,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L196"}],"signatures":[{"id":457,"name":"dataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":196,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L196"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":489,"name":"delimiter","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":560,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L560"}],"signatures":[{"id":490,"name":"delimiter","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns 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":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":560,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L560"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":458,"name":"desktopDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":218,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L218"}],"signatures":[{"id":459,"name":"desktopDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":218,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L218"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":500,"name":"dirname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":619,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L619"}],"signatures":[{"id":501,"name":"dirname","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":619,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L619"}],"parameters":[{"id":502,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":460,"name":"documentDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":240,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L240"}],"signatures":[{"id":461,"name":"documentDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":240,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L240"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":462,"name":"downloadDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":262,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L262"}],"signatures":[{"id":463,"name":"downloadDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":262,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L262"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":464,"name":"executableDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":284,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L284"}],"signatures":[{"id":465,"name":"executableDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":284,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L284"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":503,"name":"extname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":635,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L635"}],"signatures":[{"id":504,"name":"extname","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":635,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L635"}],"parameters":[{"id":505,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":466,"name":"fontDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":306,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L306"}],"signatures":[{"id":467,"name":"fontDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":306,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L306"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":468,"name":"homeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":328,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L328"}],"signatures":[{"id":469,"name":"homeDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":328,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L328"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":510,"name":"isAbsolute","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":667,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L667"}],"signatures":[{"id":511,"name":"isAbsolute","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":667,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L667"}],"parameters":[{"id":512,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":497,"name":"join","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":604,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L604"}],"signatures":[{"id":498,"name":"join","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":604,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L604"}],"parameters":[{"id":499,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":470,"name":"localDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":350,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L350"}],"signatures":[{"id":471,"name":"localDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":350,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L350"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":494,"name":"normalize","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":589,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L589"}],"signatures":[{"id":495,"name":"normalize","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":589,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L589"}],"parameters":[{"id":496,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":472,"name":"pictureDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":372,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L372"}],"signatures":[{"id":473,"name":"pictureDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":372,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L372"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":474,"name":"publicDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":394,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L394"}],"signatures":[{"id":475,"name":"publicDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":394,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L394"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":491,"name":"resolve","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":574,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L574"}],"signatures":[{"id":492,"name":"resolve","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":574,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L574"}],"parameters":[{"id":493,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":478,"name":"resolveResource","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":431,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L431"}],"signatures":[{"id":479,"name":"resolveResource","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":431,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L431"}],"parameters":[{"id":480,"name":"resourcePath","variant":"param","kind":32768,"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","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":476,"name":"resourceDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":411,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L411"}],"signatures":[{"id":477,"name":"resourceDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":411,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L411"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":481,"name":"runtimeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":454,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L454"}],"signatures":[{"id":482,"name":"runtimeDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":454,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L454"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":487,"name":"sep","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":549,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L549"}],"signatures":[{"id":488,"name":"sep","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns 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":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":549,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L549"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":513,"name":"tempDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":536,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L536"}],"signatures":[{"id":514,"name":"tempDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a temporary directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { tempDir } from '@tauri-apps/api/path';\nconst temp = await tempDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":536,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L536"}],"parameters":[{"id":515,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":483,"name":"templateDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":476,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L476"}],"signatures":[{"id":484,"name":"templateDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":476,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L476"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":485,"name":"videoDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":498,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L498"}],"signatures":[{"id":486,"name":"videoDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":498,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L498"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[416]},{"title":"Functions","children":[446,440,442,444,448,450,506,452,454,456,489,458,500,460,462,464,503,466,468,510,497,470,494,472,474,491,478,476,481,487,513,483,485]}],"sources":[{"fileName":"path.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L1"}]},{"id":516,"name":"tauri","variant":"declaration","kind":2,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":527,"name":"Channel","variant":"declaration","kind":128,"flags":{},"children":[{"id":528,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L71"}],"signatures":[{"id":529,"name":"new Channel","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L71"}],"typeParameter":[{"id":530,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":527,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Channel","package":"@tauri-apps/api"}}]},{"id":533,"name":"#onmessage","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":67,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L67"}],"type":{"type":"reflection","declaration":{"id":534,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":67,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L67"}],"signatures":[{"id":535,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":67,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L67"}],"parameters":[{"id":536,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":532,"name":"__TAURI_CHANNEL_MARKER__","variant":"declaration","kind":1024,"flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":66,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L66"}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":531,"name":"id","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L64"}],"type":{"type":"intrinsic","name":"number"}},{"id":537,"name":"onmessage","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L77"},{"fileName":"tauri.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L81"}],"getSignature":{"id":538,"name":"onmessage","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L81"}],"type":{"type":"reflection","declaration":{"id":539,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L81"}],"signatures":[{"id":540,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L81"}],"parameters":[{"id":541,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":542,"name":"onmessage","variant":"signature","kind":1048576,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L77"}],"parameters":[{"id":543,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":544,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L77"}],"signatures":[{"id":545,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L77"}],"parameters":[{"id":546,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":547,"name":"toJSON","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L85"}],"signatures":[{"id":548,"name":"toJSON","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L85"}],"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[528]},{"title":"Properties","children":[533,532,531]},{"title":"Accessors","children":[537]},{"title":"Methods","children":[547]}],"sources":[{"fileName":"tauri.ts","line":63,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L63"}],"typeParameters":[{"id":549,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":550,"name":"PluginListener","variant":"declaration","kind":128,"flags":{},"children":[{"id":551,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L95"}],"signatures":[{"id":552,"name":"new PluginListener","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L95"}],"parameters":[{"id":553,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":554,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":555,"name":"channelId","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":550,"name":"PluginListener","package":"@tauri-apps/api"}}]},{"id":558,"name":"channelId","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L93"}],"type":{"type":"intrinsic","name":"number"}},{"id":557,"name":"event","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":92,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L92"}],"type":{"type":"intrinsic","name":"string"}},{"id":556,"name":"plugin","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":91,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L91"}],"type":{"type":"intrinsic","name":"string"}},{"id":559,"name":"unregister","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":101,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L101"}],"signatures":[{"id":560,"name":"unregister","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L101"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[551]},{"title":"Properties","children":[558,557,556]},{"title":"Methods","children":[559]}],"sources":[{"fileName":"tauri.ts","line":90,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L90"}]},{"id":518,"name":"InvokeOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":519,"name":"headers","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L139"}],"type":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.dom.d.ts","qualifiedName":"Headers"},"name":"Headers","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/API/Headers"}]}}],"groups":[{"title":"Properties","children":[519]}],"sources":[{"fileName":"tauri.ts","line":138,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L138"}]},{"id":517,"name":"InvokeArgs","variant":"declaration","kind":4194304,"flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":133,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L133"}],"type":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"},{"type":"array","elementType":{"type":"intrinsic","name":"number"}},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"ArrayBuffer"},"name":"ArrayBuffer","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":561,"name":"addPluginListener","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":116,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L116"}],"signatures":[{"id":562,"name":"addPluginListener","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a listener to a plugin event."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The listener object to stop listening to the events."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":116,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L116"}],"typeParameter":[{"id":563,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":564,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":565,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":566,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":567,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":119,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L119"}],"signatures":[{"id":568,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":119,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L119"}],"parameters":[{"id":569,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":550,"name":"PluginListener","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":576,"name":"convertFileSrc","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":212,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L212"}],"signatures":[{"id":577,"name":"convertFileSrc","variant":"signature","kind":4096,"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' ipc: https://ipc.localhost; 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"}]}]},"sources":[{"fileName":"tauri.ts","line":212,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L212"}],"parameters":[{"id":578,"name":"filePath","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":579,"name":"protocol","variant":"param","kind":32768,"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":570,"name":"invoke","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":157,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L157"}],"signatures":[{"id":571,"name":"invoke","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"tauri.ts","line":157,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L157"}],"typeParameter":[{"id":572,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":573,"name":"cmd","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":574,"name":"args","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","target":517,"name":"InvokeArgs","package":"@tauri-apps/api"},"defaultValue":"{}"},{"id":575,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The request options."}]},"type":{"type":"reference","target":518,"name":"InvokeOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":520,"name":"transformCallback","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":41,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L41"}],"signatures":[{"id":521,"name":"transformCallback","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"tauri.ts","line":41,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L41"}],"parameters":[{"id":522,"name":"callback","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":523,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":42,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L42"}],"signatures":[{"id":524,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":42,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L42"}],"parameters":[{"id":525,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":526,"name":"once","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[527,550]},{"title":"Interfaces","children":[518]},{"title":"Type Aliases","children":[517]},{"title":"Functions","children":[561,576,570,520]}],"sources":[{"fileName":"tauri.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L1"}]},{"id":580,"name":"tray","variant":"declaration","kind":2,"flags":{},"children":[{"id":601,"name":"TrayIcon","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Tray icon class and associated methods. This type constructor is private,\ninstead, you should use the static method "},{"kind":"inline-tag","tag":"@linkcode","text":"new","target":602,"tsLinkText":""},{"kind":"text","text":".\n\n#### Warning\n\nUnlike Rust, javascript does not have any way to run cleanup code\nwhen an object is being removed by garbage collection, but this tray icon\nwill be cleaned up when the tauri app exists, however if you want to cleanup\nthis object early, you need to call "},{"kind":"inline-tag","tag":"@linkcode","text":"close","target":207,"tsLinkText":""},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```ts\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new({ tooltip: 'awesome tray tooltip' });\ntray.set_tooltip('new tooltip');\n```"}]}]},"children":[{"id":605,"name":"constructor","variant":"declaration","kind":512,"flags":{"isPrivate":true},"sources":[{"fileName":"tray.ts","line":124,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L124"}],"signatures":[{"id":606,"name":"new TrayIcon","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tray.ts","line":124,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L124"}],"parameters":[{"id":607,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":608,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":601,"name":"TrayIcon","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"Resource.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"Resource.constructor"}},{"id":650,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.#rid"}},{"id":609,"name":"id","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The id associated with this tray icon."}]},"sources":[{"fileName":"tray.ts","line":122,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L122"}],"type":{"type":"intrinsic","name":"string"}},{"id":651,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":652,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.rid"}},{"id":653,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":654,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.close"}},{"id":634,"name":"listen","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":247,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L247"}],"signatures":[{"id":635,"name":"listen","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event emitted by the backend that is tied to the current webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new();\nconst unlisten = await tray.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."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"tray.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L247"}],"typeParameter":[{"id":636,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":637,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":638,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":644,"name":"on","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":308,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L308"}],"signatures":[{"id":645,"name":"on","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to this tray icon events."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new();\nconst unlisten = await tray.on((event) => {\n console.log(event)\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":"2.0.0"}]}]},"sources":[{"fileName":"tray.ts","line":308,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L308"}],"parameters":[{"id":646,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reflection","declaration":{"id":647,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tray.ts","line":308,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L308"}],"signatures":[{"id":648,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tray.ts","line":308,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L308"}],"parameters":[{"id":649,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":581,"name":"TrayIconEvent","package":"@tauri-apps/api"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":639,"name":"once","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":278,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L278"}],"signatures":[{"id":640,"name":"once","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event emitted by the backend that is tied to the current webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new();\nconst unlisten = await tray.once('state-initalized', (event) => {\n console.log(`State initalized`);\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":"2.0.0"}]}]},"sources":[{"fileName":"tray.ts","line":278,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L278"}],"typeParameter":[{"id":641,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":642,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":643,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":610,"name":"setIcon","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":148,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L148"}],"signatures":[{"id":611,"name":"setIcon","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets a new tray icon. If "},{"kind":"code","text":"`null`"},{"kind":"text","text":" is provided, it will remove the icon."}]},"sources":[{"fileName":"tray.ts","line":148,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L148"}],"parameters":[{"id":612,"name":"icon","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":628,"name":"setIconAsTemplate","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":210,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L210"}],"signatures":[{"id":629,"name":"setIconAsTemplate","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the current icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**"}]},"sources":[{"fileName":"tray.ts","line":210,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L210"}],"parameters":[{"id":630,"name":"asTemplate","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":613,"name":"setMenu","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":159,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L159"}],"signatures":[{"id":614,"name":"setMenu","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets a new tray menu.\n\n#### Platform-specific:\n\n- **Linux**: once a menu is set it cannot be removed so "},{"kind":"code","text":"`null`"},{"kind":"text","text":" has no effect"}]},"sources":[{"fileName":"tray.ts","line":159,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L159"}],"parameters":[{"id":615,"name":"menu","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":631,"name":"setMenuOnLeftClick","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":218,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L218"}],"signatures":[{"id":632,"name":"setMenuOnLeftClick","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Disable or enable showing the tray menu on left click. **macOS only**."}]},"sources":[{"fileName":"tray.ts","line":218,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L218"}],"parameters":[{"id":633,"name":"onLeft","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":625,"name":"setTempDirPath","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":205,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L205"}],"signatures":[{"id":626,"name":"setTempDirPath","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the tray icon temp dir path. **Linux only**.\n\nOn Linux, we need to write the icon to the disk and usually it will\nbe "},{"kind":"code","text":"`$XDG_RUNTIME_DIR/tray-icon`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$TEMP/tray-icon`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"tray.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L205"}],"parameters":[{"id":627,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":619,"name":"setTitle","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":190,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L190"}],"signatures":[{"id":620,"name":"setTitle","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the tooltip for this tray icon.\n\n## Platform-specific:\n\n- **Linux:** The title will not be shown unless there is an icon\nas well. The title is useful for numerical and other frequently\nupdated information. In general, it shouldn't be shown unless a\nuser requests it as it can take up a significant amount of space\non the user's panel. This may not be shown in all visualizations.\n- **Windows:** Unsupported"}]},"sources":[{"fileName":"tray.ts","line":190,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L190"}],"parameters":[{"id":621,"name":"title","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":616,"name":"setTooltip","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":174,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L174"}],"signatures":[{"id":617,"name":"setTooltip","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the tooltip for this tray icon.\n\n## Platform-specific:\n\n- **Linux:** Unsupported"}]},"sources":[{"fileName":"tray.ts","line":174,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L174"}],"parameters":[{"id":618,"name":"tooltip","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":622,"name":"setVisible","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":195,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L195"}],"signatures":[{"id":623,"name":"setVisible","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Show or hide this tray icon."}]},"sources":[{"fileName":"tray.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L195"}],"parameters":[{"id":624,"name":"visible","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":602,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"tray.ts","line":137,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L137"}],"signatures":[{"id":603,"name":"new","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new "},{"kind":"inline-tag","tag":"@linkcode","text":"TrayIcon","target":601,"tsLinkText":""},{"kind":"text","text":"\n\n#### Platform-specific:\n\n- **Linux:** Sometimes the icon won't be visible unless a menu is set.\nSetting an empty "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":357,"tsLinkText":""},{"kind":"text","text":" is enough."}]},"sources":[{"fileName":"tray.ts","line":137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L137"}],"parameters":[{"id":604,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":592,"name":"TrayIconOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":601,"name":"TrayIcon","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[605]},{"title":"Properties","children":[650,609]},{"title":"Accessors","children":[651]},{"title":"Methods","children":[653,634,644,639,610,628,613,631,625,619,616,622,602]}],"sources":[{"fileName":"tray.ts","line":120,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L120"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource"},"name":"Resource","package":"@tauri-apps/api"}]},{"id":581,"name":"TrayIconEvent","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Describes a tray event emitted when a tray icon is clicked\n\n#### Platform-specific:\n\n- **Linux**: Unsupported. The event is not emmited even though the icon is shown,\nthe icon will still show a context menu on right click."}]},"children":[{"id":591,"name":"clickType","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The click type that triggered this event."}]},"sources":[{"fileName":"tray.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L45"}],"type":{"type":"union","types":[{"type":"literal","value":"Left"},{"type":"literal","value":"Right"},{"type":"literal","value":"Double"}]}},{"id":585,"name":"iconRect","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Position and size of the tray icon."}]},"sources":[{"fileName":"tray.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L34"}],"type":{"type":"reflection","declaration":{"id":586,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":590,"name":"bottom","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The y-coordinate of the lower-right corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":42,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L42"}],"type":{"type":"intrinsic","name":"number"}},{"id":587,"name":"left","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The x-coordinate of the upper-left corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":36,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L36"}],"type":{"type":"intrinsic","name":"number"}},{"id":589,"name":"right","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The x-coordinate of the lower-right corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":40,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L40"}],"type":{"type":"intrinsic","name":"number"}},{"id":588,"name":"top","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The y-coordinate of the upper-left corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":38,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L38"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[590,587,589,588]}],"sources":[{"fileName":"tray.ts","line":34,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L34"}]}}},{"id":582,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Id of the tray icon which triggered this event."}]},"sources":[{"fileName":"tray.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L28"}],"type":{"type":"intrinsic","name":"string"}},{"id":583,"name":"x","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Physical X Position of the click the triggered this event."}]},"sources":[{"fileName":"tray.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L30"}],"type":{"type":"intrinsic","name":"number"}},{"id":584,"name":"y","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Physical Y Position of the click the triggered this event."}]},"sources":[{"fileName":"tray.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L32"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[591,585,582,583,584]}],"sources":[{"fileName":"tray.ts","line":26,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L26"}]},{"id":592,"name":"TrayIconOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"inline-tag","tag":"@link","text":"`TrayIcon`","target":602,"tsLinkText":"`TrayIcon`"},{"kind":"text","text":" creation options"}]},"children":[{"id":595,"name":"icon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon which could be icon bytes or path to the icon file.\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```"}]},"sources":[{"fileName":"tray.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L71"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":599,"name":"iconAsTemplate","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Use the icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**."}]},"sources":[{"fileName":"tray.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L97"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":593,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon id. If undefined, a random one will be assigend"}]},"sources":[{"fileName":"tray.ts","line":58,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L58"}],"type":{"type":"intrinsic","name":"string"}},{"id":594,"name":"menu","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon menu"}]},"sources":[{"fileName":"tray.ts","line":60,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L60"}],"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}]}},{"id":600,"name":"menuOnLeftClieck","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether to show the tray menu on left click or not, default is "},{"kind":"code","text":"`true`"},{"kind":"text","text":". **macOS only**."}]},"sources":[{"fileName":"tray.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L99"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":598,"name":"tempDirPath","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon temp dir path. **Linux only**.\n\nOn Linux, we need to write the icon to the disk and usually it will\nbe "},{"kind":"code","text":"`$XDG_RUNTIME_DIR/tray-icon`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$TEMP/tray-icon`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"tray.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L93"}],"type":{"type":"intrinsic","name":"string"}},{"id":597,"name":"title","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tooltip text\n\n#### Platform-specific\n\n- **Linux:** The title will not be shown unless there is an icon\nas well. The title is useful for numerical and other frequently\nupdated information. In general, it shouldn't be shown unless a\nuser requests it as it can take up a significant amount of space\non the user's panel. This may not be shown in all visualizations.\n- **Windows:** Unsupported."}]},"sources":[{"fileName":"tray.ts","line":86,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L86"}],"type":{"type":"intrinsic","name":"string"}},{"id":596,"name":"tooltip","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon tooltip"}]},"sources":[{"fileName":"tray.ts","line":73,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L73"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[595,599,593,594,600,598,597,596]}],"sources":[{"fileName":"tray.ts","line":56,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L56"}]}],"groups":[{"title":"Classes","children":[601]},{"title":"Interfaces","children":[581,592]}],"sources":[{"fileName":"tray.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L1"}]}],"groups":[{"title":"Modules","children":[1,65,51,415,516,580]}],"packageName":"@tauri-apps/api","symbolIdMap":{"1":{"sourceFileName":"src/event.ts","qualifiedName":""},"2":{"sourceFileName":"src/event.ts","qualifiedName":"Event"},"3":{"sourceFileName":"src/event.ts","qualifiedName":"Event.event"},"4":{"sourceFileName":"src/event.ts","qualifiedName":"Event.windowLabel"},"5":{"sourceFileName":"src/event.ts","qualifiedName":"Event.id"},"6":{"sourceFileName":"src/event.ts","qualifiedName":"Event.payload"},"7":{"sourceFileName":"src/event.ts","qualifiedName":"Event.T"},"8":{"sourceFileName":"src/event.ts","qualifiedName":"EventCallback"},"9":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"10":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"11":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"12":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"13":{"sourceFileName":"src/event.ts","qualifiedName":"UnlistenFn"},"14":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"15":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"16":{"sourceFileName":"src/event.ts","qualifiedName":"EventName"},"17":{"sourceFileName":"src/event.ts","qualifiedName":"Options"},"18":{"sourceFileName":"src/event.ts","qualifiedName":"Options.target"},"19":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"20":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"21":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"22":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"23":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"24":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"25":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"26":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"27":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"28":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"29":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"30":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"31":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"32":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"33":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"34":{"sourceFileName":"src/event.ts","qualifiedName":"payload"},"35":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"36":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent"},"37":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_RESIZED"},"38":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_MOVED"},"39":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CLOSE_REQUESTED"},"40":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CREATED"},"41":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_DESTROYED"},"42":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FOCUS"},"43":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_BLUR"},"44":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_SCALE_FACTOR_CHANGED"},"45":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_THEME_CHANGED"},"46":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP"},"47":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_HOVER"},"48":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_CANCELLED"},"49":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.MENU"},"50":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.TRAY"},"51":{"sourceFileName":"src/mocks.ts","qualifiedName":""},"52":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"53":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"54":{"sourceFileName":"src/mocks.ts","qualifiedName":"cb"},"55":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"56":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"57":{"sourceFileName":"src/mocks.ts","qualifiedName":"cmd"},"58":{"sourceFileName":"src/mocks.ts","qualifiedName":"payload"},"59":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"60":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"61":{"sourceFileName":"src/mocks.ts","qualifiedName":"current"},"62":{"sourceFileName":"src/mocks.ts","qualifiedName":"additionalWindows"},"63":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"64":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"65":{"sourceFileName":"src/menu.ts","qualifiedName":""},"66":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuEvent"},"67":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuEvent.id"},"68":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuOptions"},"69":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuOptions.id"},"70":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuOptions.items"},"71":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions"},"72":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.id"},"73":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.text"},"74":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.enabled"},"75":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.accelerator"},"76":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.action"},"77":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"78":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"79":{"sourceFileName":"src/menu.ts","qualifiedName":"SubmenuOptions"},"80":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItemOptions"},"81":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"82":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.item"},"83":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"84":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.About"},"85":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"86":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.name"},"87":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.version"},"88":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.short_version"},"89":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.authors"},"90":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.comments"},"91":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.copyright"},"92":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.license"},"93":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.website"},"94":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.website_label"},"95":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.credits"},"96":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.icon"},"97":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItemOptions"},"98":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItemOptions.checked"},"99":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.id"},"100":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.text"},"101":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.enabled"},"102":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.accelerator"},"103":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.action"},"104":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"105":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"106":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItemOptions"},"107":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItemOptions.icon"},"108":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItemOptions.nativeIcon"},"109":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.id"},"110":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.text"},"111":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.enabled"},"112":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.accelerator"},"113":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.action"},"114":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"115":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"116":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon"},"117":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Add"},"118":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Advanced"},"119":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Bluetooth"},"120":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Bookmarks"},"121":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Caution"},"122":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ColorPanel"},"123":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ColumnView"},"124":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Computer"},"125":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.EnterFullScreen"},"126":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Everyone"},"127":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ExitFullScreen"},"128":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FlowView"},"129":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Folder"},"130":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FolderBurnable"},"131":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FolderSmart"},"132":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FollowLinkFreestanding"},"133":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FontPanel"},"134":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.GoLeft"},"135":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.GoRight"},"136":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Home"},"137":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.IChatTheater"},"138":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.IconView"},"139":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Info"},"140":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.InvalidDataFreestanding"},"141":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.LeftFacingTriangle"},"142":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ListView"},"143":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.LockLocked"},"144":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.LockUnlocked"},"145":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MenuMixedState"},"146":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MenuOnState"},"147":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MobileMe"},"148":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MultipleDocuments"},"149":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Network"},"150":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Path"},"151":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.PreferencesGeneral"},"152":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.QuickLook"},"153":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.RefreshFreestanding"},"154":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Refresh"},"155":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Remove"},"156":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.RevealFreestanding"},"157":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.RightFacingTriangle"},"158":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Share"},"159":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Slideshow"},"160":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.SmartBadge"},"161":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusAvailable"},"162":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusNone"},"163":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusPartiallyAvailable"},"164":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusUnavailable"},"165":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StopProgressFreestanding"},"166":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StopProgress"},"167":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.TrashEmpty"},"168":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.TrashFull"},"169":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.User"},"170":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.UserAccounts"},"171":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.UserGroup"},"172":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.UserGuest"},"173":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem"},"174":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem.new"},"175":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem.new"},"176":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"177":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"178":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"179":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"180":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"181":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem.__constructor"},"182":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem"},"183":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"184":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"185":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"186":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"187":{"sourceFileName":"src/menu.ts","qualifiedName":"accelerator"},"188":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"189":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"190":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"191":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"192":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"193":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"194":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"195":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"196":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"197":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"198":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"199":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"200":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"201":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"202":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"203":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"204":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"205":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"206":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"207":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"208":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"209":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem"},"210":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.new"},"211":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.new"},"212":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"213":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"214":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"215":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"216":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"217":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.__constructor"},"218":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem"},"219":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"220":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"221":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.isChecked"},"222":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.isChecked"},"223":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.setChecked"},"224":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.setChecked"},"225":{"sourceFileName":"src/menu.ts","qualifiedName":"checked"},"226":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"227":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"228":{"sourceFileName":"src/menu.ts","qualifiedName":"accelerator"},"229":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"230":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"231":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"232":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"233":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"234":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"235":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"236":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"237":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"238":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"239":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"240":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"241":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"242":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"243":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"244":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"245":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"246":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"247":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"248":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"249":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"250":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem"},"251":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.new"},"252":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.new"},"253":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"254":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"255":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"256":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"257":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"258":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.__constructor"},"259":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem"},"260":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"261":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"262":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setIcon"},"263":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setIcon"},"264":{"sourceFileName":"src/menu.ts","qualifiedName":"icon"},"265":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setNativeIcon"},"266":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setNativeIcon"},"267":{"sourceFileName":"src/menu.ts","qualifiedName":"icon"},"268":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"269":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"270":{"sourceFileName":"src/menu.ts","qualifiedName":"accelerator"},"271":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"272":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"273":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"274":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"275":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"276":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"277":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"278":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"279":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"280":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"281":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"282":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"283":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"284":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"285":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"286":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"287":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"288":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"289":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"290":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"291":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"292":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu"},"293":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.new"},"294":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.new"},"295":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"296":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"297":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"298":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"299":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"300":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.__constructor"},"301":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu"},"302":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"303":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"304":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsWindowsMenuForNSApp"},"305":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsWindowsMenuForNSApp"},"306":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsHelpMenuForNSApp"},"307":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsHelpMenuForNSApp"},"308":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"309":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"310":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"311":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"312":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"313":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"314":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"315":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"316":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"317":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"318":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"319":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"320":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"321":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"322":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"323":{"sourceFileName":"src/menu.ts","qualifiedName":"item"},"324":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"325":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"326":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"327":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"328":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"329":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"330":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"331":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"332":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"333":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"334":{"sourceFileName":"src/menu.ts","qualifiedName":"window"},"335":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"336":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"337":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"338":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"339":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"340":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"341":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"342":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"343":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"344":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"345":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"346":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"347":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"348":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"349":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"350":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"351":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"352":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"353":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"354":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"355":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"356":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"357":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu"},"358":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.new"},"359":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.new"},"360":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"361":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.default"},"362":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.default"},"363":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"364":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"365":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"366":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"367":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.__constructor"},"368":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu"},"369":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"370":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"371":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsAppMenu"},"372":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsAppMenu"},"373":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsWindowMenu"},"374":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsWindowMenu"},"375":{"sourceFileName":"src/menu.ts","qualifiedName":"window"},"376":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"377":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"378":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"379":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"380":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"381":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"382":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"383":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"384":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"385":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"386":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"387":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"388":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"389":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"390":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"391":{"sourceFileName":"src/menu.ts","qualifiedName":"item"},"392":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"393":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"394":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"395":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"396":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"397":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"398":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"399":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"400":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"401":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"402":{"sourceFileName":"src/menu.ts","qualifiedName":"window"},"403":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"404":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"405":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"406":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"407":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"408":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"409":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"410":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"411":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"412":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"413":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"414":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"415":{"sourceFileName":"src/path.ts","qualifiedName":""},"416":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory"},"417":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Audio"},"418":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Cache"},"419":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Config"},"420":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Data"},"421":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.LocalData"},"422":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Document"},"423":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Download"},"424":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Picture"},"425":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Public"},"426":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Video"},"427":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Resource"},"428":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Temp"},"429":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppConfig"},"430":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppData"},"431":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLocalData"},"432":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppCache"},"433":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLog"},"434":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Desktop"},"435":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Executable"},"436":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Font"},"437":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Home"},"438":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Runtime"},"439":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Template"},"440":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"441":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"442":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"443":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"444":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"445":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"446":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"447":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"448":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"449":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"450":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"451":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"452":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"453":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"454":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"455":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"456":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"457":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"458":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"459":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"460":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"461":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"462":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"463":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"464":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"465":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"466":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"467":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"468":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"469":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"470":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"471":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"472":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"473":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"474":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"475":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"476":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"477":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"478":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"479":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"480":{"sourceFileName":"src/path.ts","qualifiedName":"resourcePath"},"481":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"482":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"483":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"484":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"485":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"486":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"487":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"488":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"489":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"490":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"491":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"492":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"493":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"494":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"495":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"496":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"497":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"498":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"499":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"500":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"501":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"502":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"503":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"504":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"505":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"506":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"507":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"508":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"509":{"sourceFileName":"src/path.ts","qualifiedName":"ext"},"510":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"511":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"512":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"513":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"514":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"515":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"516":{"sourceFileName":"src/tauri.ts","qualifiedName":""},"517":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeArgs"},"518":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeOptions"},"519":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeOptions.headers"},"520":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"521":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"522":{"sourceFileName":"src/tauri.ts","qualifiedName":"callback"},"523":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"524":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"525":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"526":{"sourceFileName":"src/tauri.ts","qualifiedName":"once"},"527":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"528":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__constructor"},"529":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"530":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"531":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.id"},"532":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__TAURI_CHANNEL_MARKER__"},"533":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.#onmessage"},"534":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"535":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"536":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"537":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"538":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"539":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"540":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"541":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"542":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"543":{"sourceFileName":"src/tauri.ts","qualifiedName":"handler"},"544":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"545":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"546":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"547":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"548":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"549":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"550":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"551":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.__constructor"},"552":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"553":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"554":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"555":{"sourceFileName":"src/tauri.ts","qualifiedName":"channelId"},"556":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.plugin"},"557":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.event"},"558":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.channelId"},"559":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"560":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"561":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"562":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"563":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"564":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"565":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"566":{"sourceFileName":"src/tauri.ts","qualifiedName":"cb"},"567":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"568":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"569":{"sourceFileName":"src/tauri.ts","qualifiedName":"payload"},"570":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"571":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"572":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"573":{"sourceFileName":"src/tauri.ts","qualifiedName":"cmd"},"574":{"sourceFileName":"src/tauri.ts","qualifiedName":"args"},"575":{"sourceFileName":"src/tauri.ts","qualifiedName":"options"},"576":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"577":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"578":{"sourceFileName":"src/tauri.ts","qualifiedName":"filePath"},"579":{"sourceFileName":"src/tauri.ts","qualifiedName":"protocol"},"580":{"sourceFileName":"src/tray.ts","qualifiedName":""},"581":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent"},"582":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.id"},"583":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.x"},"584":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.y"},"585":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.iconRect"},"586":{"sourceFileName":"src/tray.ts","qualifiedName":"__type"},"587":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.left"},"588":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.top"},"589":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.right"},"590":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.bottom"},"591":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.clickType"},"592":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions"},"593":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.id"},"594":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.menu"},"595":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.icon"},"596":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.tooltip"},"597":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.title"},"598":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.tempDirPath"},"599":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.iconAsTemplate"},"600":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.menuOnLeftClieck"},"601":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon"},"602":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.new"},"603":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.new"},"604":{"sourceFileName":"src/tray.ts","qualifiedName":"options"},"605":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.__constructor"},"606":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon"},"607":{"sourceFileName":"src/tray.ts","qualifiedName":"rid"},"608":{"sourceFileName":"src/tray.ts","qualifiedName":"id"},"609":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.id"},"610":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIcon"},"611":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIcon"},"612":{"sourceFileName":"src/tray.ts","qualifiedName":"icon"},"613":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenu"},"614":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenu"},"615":{"sourceFileName":"src/tray.ts","qualifiedName":"menu"},"616":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTooltip"},"617":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTooltip"},"618":{"sourceFileName":"src/tray.ts","qualifiedName":"tooltip"},"619":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTitle"},"620":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTitle"},"621":{"sourceFileName":"src/tray.ts","qualifiedName":"title"},"622":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setVisible"},"623":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setVisible"},"624":{"sourceFileName":"src/tray.ts","qualifiedName":"visible"},"625":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTempDirPath"},"626":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTempDirPath"},"627":{"sourceFileName":"src/tray.ts","qualifiedName":"path"},"628":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIconAsTemplate"},"629":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIconAsTemplate"},"630":{"sourceFileName":"src/tray.ts","qualifiedName":"asTemplate"},"631":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenuOnLeftClick"},"632":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenuOnLeftClick"},"633":{"sourceFileName":"src/tray.ts","qualifiedName":"onLeft"},"634":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.listen"},"635":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.listen"},"636":{"sourceFileName":"src/tray.ts","qualifiedName":"T"},"637":{"sourceFileName":"src/tray.ts","qualifiedName":"event"},"638":{"sourceFileName":"src/tray.ts","qualifiedName":"handler"},"639":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.once"},"640":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.once"},"641":{"sourceFileName":"src/tray.ts","qualifiedName":"T"},"642":{"sourceFileName":"src/tray.ts","qualifiedName":"event"},"643":{"sourceFileName":"src/tray.ts","qualifiedName":"handler"},"644":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.on"},"645":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.on"},"646":{"sourceFileName":"src/tray.ts","qualifiedName":"handler"},"647":{"sourceFileName":"src/tray.ts","qualifiedName":"__type"},"648":{"sourceFileName":"src/tray.ts","qualifiedName":"__type"},"649":{"sourceFileName":"src/tray.ts","qualifiedName":"event"},"650":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"651":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"652":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"653":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"654":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"}}} \ No newline at end of file diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 0a2d466fc27..b574576f645 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -2,6 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +import { TauriEvent, listen } from './event' import { Resource, applyMixins } from './internal' import { invoke } from './tauri' @@ -19,6 +20,42 @@ interface MenuEvent { id: string } +declare global { + interface Window { + __TAURI_MENU__: { + handlers?: { [key: string]: (() => void)[] } + } + } +} + +async function addEventListener(id: string, handler: () => void) { + if (!window.__TAURI_MENU__.handlers) { + window.__TAURI_MENU__.handlers = {} + const unlisten = await listen( + TauriEvent.MENU, + (e) => { + const handlers = window.__TAURI_MENU__.handlers?.[e.payload.id] + if (handlers) { + for (handler of handlers) { + handler() + } + } + }, + { + target: window.__TAURI_METADATA__.__currentWindow.label + } + ) + + window.addEventListener('unload', () => unlisten()) + } + + if (!window.__TAURI_MENU__.handlers[id]) { + window.__TAURI_MENU__.handlers[id] = [] + } + + window.__TAURI_MENU__.handlers[id].push(handler) +} + enum NativeIcon { /** An add item template image. */ Add = 'Add', @@ -185,7 +222,21 @@ class MenuItemBase extends Resource { kind: ItemKind, opts?: unknown ): Promise<[number, string]> { - return invoke('plugin:menu|new', { kind, opts }) + let handler: null | (() => void) + // @ts-expect-error + if ('action' in opts) { + handler = opts.action as () => void + delete opts.action + } + + return invoke<[number, string]>('plugin:menu|new', { kind, opts }).then( + (ret) => { + if (handler) { + addEventListener(ret[1], handler) + } + return ret + } + ) } } @@ -398,6 +449,7 @@ interface MenuItemOptions { text?: string enabled?: boolean accelerator?: string + action?: () => void } class MenuItem extends MenuItemBase4 { @@ -412,7 +464,8 @@ class MenuItem extends MenuItemBase4 { } } -type SubmenuOptions = Omit & MenuOptions +type SubmenuOptions = Omit & + MenuOptions interface Submenu extends MenuItemBase3 {} class Submenu extends MenuBase { @@ -441,7 +494,7 @@ applyMixins(Submenu, MenuItemBase3) type PredefinedMenuItemOptions = Omit< MenuItemOptions, - 'enabled' | 'accelerator' | 'id' + 'enabled' | 'accelerator' | 'id' | 'action' > & { item: | 'Separator' diff --git a/tooling/api/src/tray.ts b/tooling/api/src/tray.ts index 7aec096cfea..0b86d1fc5ab 100644 --- a/tooling/api/src/tray.ts +++ b/tooling/api/src/tray.ts @@ -3,7 +3,7 @@ // SPDX-License-Identifier: MIT import { Menu } from './menu' -import { EventCallback, EventName, UnlistenFn, listen, once } from './event' +import { TauriEvent, UnlistenFn, listen } from './event' import { Resource } from './internal' import { Submenu } from './menu' import { invoke } from './tauri' @@ -215,68 +215,6 @@ export class TrayIcon extends Resource { }) } - /** - * Listen to an event emitted by the backend that is tied to the current webview window. - * - * @example - * ```typescript - * import { TrayIcon } from '@tauri-apps/api/tray'; - * const tray = await TrayIcon.new(); - * const unlisten = await tray.listen('state-changed', (event) => { - * console.log(`Got error: ${payload}`); - * }); - * - * // you need to call unlisten if your handler goes out of scope e.g. the component is unmounted - * unlisten(); - * ``` - * - * @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. - * @param handler Event handler. - * @returns A promise resolving to a function to unlisten to the event. - * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. - * - * @since 2.0.0 - */ - async listen( - event: EventName, - handler: EventCallback - ): Promise { - return listen(event, handler, { - target: window.__TAURI_METADATA__.__currentWindow.label - }) - } - - /** - * Listen to an one-off event emitted by the backend that is tied to the current webview window. - * - * @example - * ```typescript - * import { TrayIcon } from '@tauri-apps/api/tray'; - * const tray = await TrayIcon.new(); - * const unlisten = await tray.once('state-initalized', (event) => { - * console.log(`State initalized`); - * }); - * - * // you need to call unlisten if your handler goes out of scope e.g. the component is unmounted - * unlisten(); - * ``` - * - * @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. - * @param handler Event handler. - * @returns A promise resolving to a function to unlisten to the event. - * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. - * - * @since 2.0.0 - */ - async once( - event: EventName, - handler: EventCallback - ): Promise { - return once(event, handler, { - target: window.__TAURI_METADATA__.__currentWindow.label - }) - } - /** * Listen to this tray icon events. * @@ -284,7 +222,7 @@ export class TrayIcon extends Resource { * ```typescript * import { TrayIcon } from '@tauri-apps/api/tray'; * const tray = await TrayIcon.new(); - * const unlisten = await tray.onTrayIconEvent((event) => { + * const unlisten = await tray.on((event) => { * console.log(event) * }); * @@ -298,11 +236,17 @@ export class TrayIcon extends Resource { * * @since 2.0.0 */ - async onTrayIconEvent( - handler: EventCallback - ): Promise { - return listen('tauri://tray', handler, { - target: window.__TAURI_METADATA__.__currentWindow.label - }) + async on(handler: (event: TrayIconEvent) => void): Promise { + return listen( + TauriEvent.TRAY, + (e) => { + if (e.payload.id == this.id) { + handler(e.payload) + } + }, + { + target: window.__TAURI_METADATA__.__currentWindow.label + } + ) } } From cfe3b35bc6f4ee32f689d6b971200e32326cd1bd Mon Sep 17 00:00:00 2001 From: amrbashir Date: Mon, 28 Aug 2023 23:16:00 +0300 Subject: [PATCH 05/64] update example api to latest vite-svelte template --- examples/api/README.md | 10 +- examples/api/dist/assets/index.css | 1 - examples/api/dist/assets/index.js | 9 - examples/api/dist/index.html | 15 - examples/api/dist/tauri_logo.png | Bin 2810 -> 0 bytes examples/api/index.html | 2 +- examples/api/jsconfig.json | 10 +- examples/api/package.json | 17 +- examples/api/src-tauri/Cargo.lock | 6 +- examples/api/src-tauri/tauri.conf.json | 21 +- examples/api/src/vite-env.d.ts | 2 + examples/api/svelte.config.js | 7 + examples/api/vite.config.js | 11 +- examples/api/yarn.lock | 776 +++++++++++++++---------- 14 files changed, 502 insertions(+), 385 deletions(-) delete mode 100644 examples/api/dist/assets/index.css delete mode 100644 examples/api/dist/assets/index.js delete mode 100644 examples/api/dist/index.html delete mode 100644 examples/api/dist/tauri_logo.png create mode 100644 examples/api/src/vite-env.d.ts create mode 100644 examples/api/svelte.config.js diff --git a/examples/api/README.md b/examples/api/README.md index d9fe94b1f47..c0cba6e1a21 100644 --- a/examples/api/README.md +++ b/examples/api/README.md @@ -1,4 +1,5 @@ # API example + This example demonstrates Tauri's API capabilities using the `@tauri-apps/api` package. It's used as the main validation app, serving as the testbed of our development process. In the future, this app will be used on Tauri's integration tests. @@ -7,19 +8,22 @@ In the future, this app will be used on Tauri's integration tests. ## Running the example - Compile Tauri -go to root of the Tauri repo and run: -Linux / Mac: + go to root of the Tauri repo and run: + Linux / Mac: + ``` # choose to install node cli (1) bash .scripts/setup.sh ``` Windows: + ``` ./.scripts/setup.ps1 ``` - Install dependencies (Run inside of this folder `examples/api/`) + ```bash # with yarn $ yarn @@ -28,6 +32,7 @@ $ npm install ``` - Run the app in development mode (Run inside of this folder `examples/api/`) + ```bash # with yarn $ yarn tauri dev @@ -36,6 +41,7 @@ $ npm run tauri dev ``` - Build an run the release app (Run inside of this folder `examples/api/`) + ```bash $ yarn tauri build $ ./src-tauri/target/release/app diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css deleted file mode 100644 index b165b4364e6..00000000000 --- a/examples/api/dist/assets/index.css +++ /dev/null @@ -1 +0,0 @@ -*,::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/v28/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.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-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-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-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;}.grid-rows-\[min-content_auto\]{grid-template-rows:min-content auto;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.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;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.grow{flex-grow:1;}.flex-col{flex-direction:column;}@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;}.items-center{align-items:center;}.self-center{align-self: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;}.b{border-width:1px;border-style:solid;}.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);}.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);}.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;}.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;}.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{--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\: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 deleted file mode 100644 index 2c1a92b2909..00000000000 --- a/examples/api/dist/assets/index.js +++ /dev/null @@ -1,9 +0,0 @@ -(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const f of a.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&i(f)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerpolicy&&(a.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?a.credentials="include":o.crossorigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();function E(){}function ot(e){return e()}function Ge(){return Object.create(null)}function U(e){e.forEach(ot)}function pt(e){return typeof e=="function"}function de(e,t){return e!=e?t==t:e!==t||e&&typeof e=="object"||typeof e=="function"}let ye;function gt(e,t){return ye||(ye=document.createElement("a")),ye.href=t,e===ye.href}function _t(e){return Object.keys(e).length===0}function bt(e,...t){if(e==null)return E;const n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function vt(e,t,n){e.$$.on_destroy.push(bt(t,n))}function s(e,t){e.appendChild(t)}function w(e,t,n){e.insertBefore(t,n||null)}function y(e){e.parentNode.removeChild(e)}function Xe(e,t){for(let n=0;ne.removeEventListener(t,n,i)}function c(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function wt(e){return Array.from(e.childNodes)}function kt(e,t){t=""+t,e.wholeText!==t&&(e.data=t)}class Et{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,i=null){this.e||(this.is_svg?this.e=yt(n.nodeName):this.e=d(n.nodeName),this.t=n,this.c(t)),this.i(i)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n{Ee.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}else i&&i()}function Je(e){e&&e.c()}function Ne(e,t,n,i){const{fragment:o,on_mount:a,on_destroy:f,after_update:r}=e.$$;o&&o.m(t,n),i||Ie(()=>{const m=a.map(ot).filter(pt);f?f.push(...m):U(m),e.$$.on_mount=[]}),r.forEach(Ie)}function We(e,t){const n=e.$$;n.fragment!==null&&(U(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Tt(e,t){e.$$.dirty[0]===-1&&(ce.push(e),Lt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<{const M=D.length?D[0]:S;return u.ctx&&o(u.ctx[_],u.ctx[_]=M)&&(!u.skip_bound&&u.bound[_]&&u.bound[_](M),T&&Tt(e,_)),S}):[],u.update(),T=!0,U(u.before_update),u.fragment=i?i(u.ctx):!1,t.target){if(t.hydrate){const _=wt(t.target);u.fragment&&u.fragment.l(_),_.forEach(y)}else u.fragment&&u.fragment.c();t.intro&&Me(e.$$.fragment),Ne(e,t.target,t.anchor,t.customElement),ct()}ae(m)}class Se{$destroy(){We(this,1),this.$destroy=E}$on(t,n){const i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{const o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!_t(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}const K=[];function Ot(e,t=E){let n;const i=new Set;function o(r){if(de(e,r)&&(e=r,n)){const m=!K.length;for(const u of i)u[1](),K.push(u,e);if(m){for(let u=0;u{i.delete(u),i.size===0&&(n(),n=null)}}return{set:o,update:a,subscribe:f}}var Ct=Object.defineProperty,at=(e,t)=>{for(var n in t)Ct(e,n,{get:t[n],enumerable:!0})},At={};at(At,{convertFileSrc:()=>Mt,invoke:()=>J,transformCallback:()=>Le});function It(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function Le(e,t=!1){let n=It(),i=`_${n}`;return Object.defineProperty(window,i,{value:o=>(t&&Reflect.deleteProperty(window,i),e==null?void 0:e(o)),writable:!1,configurable:!0}),n}async function J(e,t={}){return new Promise((n,i)=>{let o=Le(f=>{n(f),Reflect.deleteProperty(window,`_${a}`)},!0),a=Le(f=>{i(f),Reflect.deleteProperty(window,`_${o}`)},!0);window.__TAURI_IPC__({cmd:e,callback:o,error:a,...t})})}function Mt(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}function Nt(e){let t,n,i,o,a,f;return{c(){t=d("div"),n=d("p"),n.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.`,i=g(),o=d("button"),o.textContent="Context menu",c(o,"class","btn")},m(r,m){w(r,t,m),s(t,n),s(t,i),s(t,o),a||(f=q(o,"click",e[0]),a=!0)},p:E,i:E,o:E,d(r){r&&y(t),a=!1,f()}}}function Wt(e){function t(){J("popup_context_menu")}return[t]}class Pt extends Se{constructor(t){super(),xe(this,t,Wt,Nt,de,{})}}async function Pe(e){return J("tauri",e)}var Rt={};at(Rt,{TauriEvent:()=>ft,emit:()=>ht,listen:()=>mt,once:()=>jt});async function ut(e,t){return Pe({__tauriModule:"Event",message:{cmd:"unlisten",event:e,eventId:t}})}async function Ht(e,t,n){await Pe({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})}async function dt(e,t,n){return Pe({__tauriModule:"Event",message:{cmd:"listen",event:e,windowLabel:t,handler:Le(n)}}).then(i=>async()=>ut(e,i))}async function qt(e,t,n){return dt(e,t,i=>{n(i),ut(e,i.id).catch(()=>{})})}var ft=(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))(ft||{});async function mt(e,t){return dt(e,null,t)}async function jt(e,t){return qt(e,null,t)}async function ht(e,t){return Ht(e,void 0,t)}function Ut(e){let t,n,i,o,a,f,r,m;return{c(){t=d("div"),n=d("button"),n.textContent="Call Log API",i=g(),o=d("button"),o.textContent="Call Request (async) API",a=g(),f=d("button"),f.textContent="Send event to Rust",c(n,"class","btn"),c(n,"id","log"),c(o,"class","btn"),c(o,"id","request"),c(f,"class","btn"),c(f,"id","event")},m(u,T){w(u,t,T),s(t,n),s(t,i),s(t,o),s(t,a),s(t,f),r||(m=[q(n,"click",e[0]),q(o,"click",e[1]),q(f,"click",e[2])],r=!0)},p:E,i:E,o:E,d(u){u&&y(t),r=!1,U(m)}}}function zt(e,t,n){let{onMessage:i}=t,o;$e(async()=>{o=await mt("rust-event",i)}),lt(()=>{o&&o()});function a(){J("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function f(){J("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function r(){ht("js-event","this is the payload string")}return e.$$set=m=>{"onMessage"in m&&n(3,i=m.onMessage)},[a,f,r,i]}class Ft extends Se{constructor(t){super(),xe(this,t,zt,Ut,de,{onMessage:3})}}function Vt(e){let t;return{c(){t=d("div"),t.innerHTML=`
Not available for Linux
- `,c(t,"class","flex flex-col gap-2")},m(n,i){w(n,t,i)},p:E,i:E,o:E,d(n){n&&y(t)}}}function Bt(e,t,n){let{onMessage:i}=t;const o=window.constraints={audio:!0,video:!0};function a(r){const m=document.querySelector("video"),u=r.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${u[0].label}`),window.stream=r,m.srcObject=r}function f(r){if(r.name==="ConstraintNotSatisfiedError"){const m=o.video;i(`The resolution ${m.width.exact}x${m.height.exact} px is not supported by your device.`)}else r.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: ${r.name}`,r)}return $e(async()=>{try{const r=await navigator.mediaDevices.getUserMedia(o);a(r)}catch(r){f(r)}}),lt(()=>{window.stream.getTracks().forEach(function(r){r.stop()})}),e.$$set=r=>{"onMessage"in r&&n(0,i=r.onMessage)},[i]}class Gt extends Se{constructor(t){super(),xe(this,t,Bt,Vt,de,{onMessage:0})}}function Qe(e,t,n){const i=e.slice();return i[23]=t[n],i}function Ze(e,t,n){const i=e.slice();return i[26]=t[n],i}function Xt(e){let t;return{c(){t=d("span"),c(t,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&y(t)}}}function Yt(e){let t;return{c(){t=d("span"),c(t,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){w(n,t,i)},d(n){n&&y(t)}}}function Kt(e){let t,n;return{c(){t=Q(`Switch to Dark mode - `),n=d("div"),c(n,"class","i-ph-moon")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&y(t),i&&y(n)}}}function Jt(e){let t,n;return{c(){t=Q(`Switch to Light mode - `),n=d("div"),c(n,"class","i-ph-sun")},m(i,o){w(i,t,o),w(i,n,o)},d(i){i&&y(t),i&&y(n)}}}function Qt(e){let t,n,i,o,a=e[26].label+"",f,r,m,u;function T(){return e[14](e[26])}return{c(){t=d("a"),n=d("div"),i=g(),o=d("p"),f=Q(a),c(n,"class",e[26].icon+" mr-2"),c(t,"href","##"),c(t,"class",r="nv "+(e[1]===e[26]?"nv_selected":""))},m(_,S){w(_,t,S),s(t,n),s(t,i),s(t,o),s(o,f),m||(u=q(t,"click",T),m=!0)},p(_,S){e=_,S&2&&r!==(r="nv "+(e[1]===e[26]?"nv_selected":""))&&c(t,"class",r)},d(_){_&&y(t),m=!1,u()}}}function et(e){let t,n=e[26]&&Qt(e);return{c(){n&&n.c(),t=rt()},m(i,o){n&&n.m(i,o),w(i,t,o)},p(i,o){i[26]&&n.p(i,o)},d(i){n&&n.d(i),i&&y(t)}}}function tt(e){let t,n=e[23].html+"",i;return{c(){t=new Et(!1),i=rt(),t.a=i},m(o,a){t.m(n,o,a),w(o,i,a)},p(o,a){a&16&&n!==(n=o[23].html+"")&&t.p(n)},d(o){o&&y(i),o&&t.d()}}}function Zt(e){let t,n,i,o,a,f,r,m,u,T,_,S,D,M,Z,N,k,O,z,C,F,ee,fe,te,me,h,v,x,ne,W,P,V,he=e[1].label+"",De,Re,pe,ie,b,He,I,ge,qe,B,_e,je,oe,Ue,re,se,Te,ze;function Fe(l,A){return l[0]?Yt:Xt}let be=Fe(e),R=be(e);function Ve(l,A){return l[2]?Jt:Kt}let ve=Ve(e),H=ve(e),G=e[5],$=[];for(let l=0;l`,k=g(),O=d("a"),O.innerHTML=`GitHub - `,z=g(),C=d("a"),C.innerHTML=`Source - `,F=g(),ee=d("br"),fe=g(),te=d("div"),me=g(),h=d("br"),v=g(),x=d("div");for(let l=0;l<$.length;l+=1)$[l].c();ne=g(),W=d("main"),P=d("div"),V=d("h1"),De=Q(he),Re=g(),pe=d("div"),ie=d("div"),b&&Je(b.$$.fragment),He=g(),I=d("div"),ge=d("div"),qe=g(),B=d("div"),_e=d("p"),_e.textContent="Console",je=g(),oe=d("div"),oe.innerHTML='
',Ue=g(),re=d("div");for(let l=0;l{We(p,1)}),Dt()}X?(b=new X(Be(l)),Je(b.$$.fragment),Me(b.$$.fragment,1),Ne(b,ie,null)):b=null}if(A&16){Y=l[4];let p;for(p=0;p{h.ctrlKey&&h.key==="b"&&J("toggle_menu")});const o=[{label:"Welcome",component:Pt,icon:"i-ph-hand-waving"},{label:"Communication",component:Ft,icon:"i-codicon-radio-tower"},{label:"WebRTC",component:Gt,icon:"i-ph-broadcast"}];let a=o[0];function f(h){n(1,a=h)}let r;$e(()=>{n(2,r=localStorage&&localStorage.getItem("theme")=="dark"),it(r)});function m(){n(2,r=!r),it(r)}let u=Ot([]);vt(e,u,h=>n(4,i=h));function T(h){u.update(v=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof h=="string"?h:JSON.stringify(h,null,1))+"
"},...v])}function _(h){u.update(v=>[{html:`
[${new Date().toLocaleTimeString()}]: `+h+"
"},...v])}function S(){u.update(()=>[])}let D,M,Z;function N(h){Z=h.clientY;const v=window.getComputedStyle(D);M=parseInt(v.height,10);const x=W=>{const P=W.clientY-Z,V=M-P;n(3,D.style.height=`${V{document.removeEventListener("mouseup",ne),document.removeEventListener("mousemove",x)};document.addEventListener("mouseup",ne),document.addEventListener("mousemove",x)}let k=!1,O,z,C=!1,F=0,ee=0;const fe=(h,v,x)=>Math.min(Math.max(v,h),x);$e(()=>{n(13,O=document.querySelector("#sidebar")),z=document.querySelector("#sidebarToggle"),document.addEventListener("click",h=>{z.contains(h.target)?n(0,k=!k):k&&!O.contains(h.target)&&n(0,k=!1)}),document.addEventListener("touchstart",h=>{if(z.contains(h.target))return;const v=h.touches[0].clientX;(0{if(C){const v=h.touches[0].clientX;ee=v;const x=(v-F)/10;O.style.setProperty("--translate-x",`-${fe(0,k?0-x:18.75-x,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(C){const h=(ee-F)/10;n(0,k=k?h>-(18.75/2):h>18.75/2)}C=!1})});const te=h=>{f(h),n(0,k=!1)};function me(h){Ce[h?"unshift":"push"](()=>{D=h,n(3,D)})}return e.$$.update=()=>{if(e.$$.dirty&1){const h=document.querySelector("#sidebar");h&&en(h,k)}},[k,a,r,D,i,o,f,m,u,T,_,S,N,O,te,me]}class nn extends Se{constructor(t){super(),xe(this,t,tn,Zt,de,{})}}new nn({target:document.querySelector("#app")}); diff --git a/examples/api/dist/index.html b/examples/api/dist/index.html deleted file mode 100644 index a3d79e1136b..00000000000 --- a/examples/api/dist/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - Svelte + Vite App - - - - - -
- - - diff --git a/examples/api/dist/tauri_logo.png b/examples/api/dist/tauri_logo.png deleted file mode 100644 index 2c53b8c4bd721c7346831ba6be581d03a0a4d755..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2810 zcmVwHth5sLepoh&l$aA>P7ref%n2|jz?>kS6AYZdW~EhRi)8HML~ZY2gfUsWoAfh zv0AP#5L6Pk7xQXFMZ9>wMV6^2xv-A2Cu9~C2k0EA9|nI5;o-eYY?&k>uopQpUXc~o zERaZ8f%_x5t!Zwct&9=h0pg{G_88R+Tpzu{sSBiYqe7G+t{t*WEwP0KK@`G3UC}5j zutqy3K`D;sQcCQjUtYOGQ?A>9etL-|td^D01?oY{V2_4G9%puO86`y%j~25@#A=xw z;*AP}Jk|I`#kBgvg+^hQxlNX-WT3?gM}Zu$yWyr*_FRw$QH&)HQk;W2=W5DjYqh42 zbc}sC23lh4grK@6UYs1$m|@{STw9^L?FQ!!MxZsaOcim2<=utV;6PpeBU=kn5`Sqx}+uV*|KNaFBnCp#6~a~4Y$c7$3gRgnvrKiygYeKmZ>7Pu%5m- zMRJpNNs5egsQ6*+sa7QVe3#f0FW;B6{aUfs$4En(T=D$mf0TfWi;JS;I2$wun$70X z;^JaC>3M_@TMr&Q@Mr*^KYuP^-lUw-Mo2K4a;3acY1`rSnd|0;X>{4dI~7h}GQ8IYe+X7+{5ix>4H zO2F5zU#s|Xax@0;MO7e>EyX!poa5ZkwG43#9N^&Q@G;!}?dYq$KZbMH&~H7?@#En8 z{@$ZUk4lv68uaM~c6m?Uo|Pdg4ybe8Z8}i}q{J&SkrKPccAgH3Z0mg@CIx)yIa52n z^a4#esZ?s0g~=jH(oZR@pWd9i>Fb-SP`NWn<{-X5_>Q)_G$X)e81rnfbW5K;eag}F z!VQ7rlJ{5#d@WAf~PyAToya^zO&-^Ox&OPY{c7OhrUzHS8 zBSc|q<}MdjN~#QRMWJ-D+O3y@CA?RmZxyx%pYKf2>)7 z&>c?XggW9z7gn`1DB=OZy?gia*tXBswtxTdv&5?S?GaY$$}ed}MRa&WH#^?ipFJ|+ z%bhTbt^!$mGEV`iTqT#@B;?`4hb)qaP{M#SA3cR=r~-5YDsdj-IQhQg2JR36aE&IM z$B!SgH>n_|`T_q(M#1=evAtNw6+U@)mKVB`7(u18zpre1&jyH!f<$K>BR?J{_wU;X zM}*pA1e4vW(TgvCr3vEt`nrFiNB}He8A7V{Z%?Pwv0ca{aCLR1v`YMtuvMcNbcE$d z+E*ToWbtfmCDBAP#B<0Z;#&4#Du`f0TiN>oZje;*NPW`g3Nac~J%Ao8-Z5LP{sy?^ zeB2u{D+I1^<;{NzN*4%Ab-MQB0S!TDnJSbBQH*ZGg!hD@%8yCex=w!Dk+|$}BmAV# z&CPLwGEpw>d%9=+NW>1{wYJYRv*?@23iW9?h(RS z4c_?v@#*s)6N{j$IyD-Dh@`Ic_A$A^Had5RZ7j;6LW>EYj)y0<_i&_o0<~u9#Q847 zWfh+8k<=^)uar1>`u2365@0NOj!_M9*I+W2V-L4~d)p1R(YZq+(#9?mP8|=+W|9tw zu~d00acJrk$f%&fQfToI}#|^eojSfL>+D3=?93_Zq9S@6_ zq+gnv!X?q0>UR7qZHY=4lbN#4Mfc=n&&y_&u>`DC9uv{qWU4%9${ka_>wCdz14aDd zhSdYHm@s$fwg2E5301b8XD^0{3mu3maZ+gH0@?F%O(sX&As5!EcEqU7Btl&_f2dJ3L{`(pg)VY%iC0TGNMc1qwEX_R+9yTI z=D_I{A*5$$R;jY2>c)Io=vHG_a{YoAox+gLl!IV#HVd|vit2&r6(ZeA6e!l|m zbs2e{Ft0*fuh|vz>+dKHz@~|5g$o%}gXX=X^T~Xw|avVRk zOIG-XLOeB1DK(3$05KK#4Xm5)R2&agl8)XKu+_>bwzJhbNHC=nt&f6Wj8Ew4^W}O< z`s=VVoGV6@k@Iovgmdw#7nhRZnQ~3K#T5O8erEtYcoYFV#CB`Hn-FB~-+tIeGPNp&e0^7<8U}WQs_nRuu__h#CTK=|E(@u9!{Xv1 zXSmndrBMv{Mu!Q^>@Y5{(P;c%wcTX3kcTrbhH3B1|2%znx(f?cinNZ=YO!VFY&`}G z8D5*%IfW1f(;CIw05@U-u}Z{(s50n$^C7O)IQ!~=)p8MwMb`D1=H9puEZS&{9hHRTsjbA?d98QDpeJG{=f+HtA&E zZ|2ems{9nTxh$?H@6Hm}Z9jSU?>t*7Rds5sH0N$zpylr9nNeN&=Xpjt8tXzq8lvLM z)ZQT1s9KiadmQTmXPwAYeNg`{gn8Ag;M|v}iKhG&V)LZaTymOXNjhRxNSTi$PW!w2 zGCNFBpk;bc)}Y1`*Dzo(0Pz*A3!Hs~u7TYmsitj)gx#Ox)26jle+;z0Hq$e0Gb)(w z@$Y}O?(YwTh_lmAZ~ldpL26gFe)K;c{5uZ<6WI=xjnxj8nIx95+5`fl6f)?}2CR@v zP0T-uu)Zqz!4UGK6m_I0YS(jLjwX4k#$vHpEEbE!VzF2(7Rzn%8+s-;M1& diff --git a/examples/api/index.html b/examples/api/index.html index 3b39b0f66a9..df11ed2eaed 100644 --- a/examples/api/index.html +++ b/examples/api/index.html @@ -3,7 +3,7 @@ - Svelte + Vite App + API Example App diff --git a/examples/api/jsconfig.json b/examples/api/jsconfig.json index 42585941e16..5696a2de74a 100644 --- a/examples/api/jsconfig.json +++ b/examples/api/jsconfig.json @@ -1,14 +1,14 @@ { "compilerOptions": { - "moduleResolution": "node", - "target": "esnext", - "module": "esnext", + "moduleResolution": "bundler", + "target": "ESNext", + "module": "ESNext", /** * svelte-preprocess cannot figure out whether you have * a value or a type, so tell TypeScript to enforce using * `import type` instead of `import` for Types. */ - "importsNotUsedAsValues": "error", + "verbatimModuleSyntax": true, "isolatedModules": true, "resolveJsonModule": true, /** @@ -18,8 +18,6 @@ "sourceMap": true, "esModuleInterop": true, "skipLibCheck": true, - "forceConsistentCasingInFileNames": true, - "baseUrl": ".", /** * Typecheck JS in `.svelte` and `.js` files by default. * Disable this if you'd like to use dynamic types. diff --git a/examples/api/package.json b/examples/api/package.json index 4a8cf964131..1d47aad86d0 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -1,11 +1,12 @@ { - "name": "svelte-app", + "name": "api", + "private": true, "version": "1.0.0", "type": "module", "scripts": { - "dev": "vite --clearScreen false", + "dev": "vite", "build": "vite build", - "serve": "vite preview", + "preview": "vite preview", "tauri": "node ../../tooling/cli/node/tauri.js" }, "dependencies": { @@ -13,12 +14,12 @@ "@zerodevx/svelte-json-view": "0.2.1" }, "devDependencies": { - "@iconify-json/codicon": "^1.1.10", - "@iconify-json/ph": "^1.1.1", - "@sveltejs/vite-plugin-svelte": "^1.0.1", + "@sveltejs/vite-plugin-svelte": "^2.4.2", + "svelte": "^4.0.5", + "vite": "^4.4.5", "internal-ip": "^7.0.0", - "svelte": "^3.49.0", "unocss": "^0.39.3", - "vite": "^3.2.7" + "@iconify-json/codicon": "^1.1.10", + "@iconify-json/ph": "^1.1.1" } } diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 0628ea51bc0..7257a941796 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -2137,9 +2137,7 @@ dependencies = [ [[package]] name = "muda" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7de0cd2fdb9ef32781658513eab9080a22b3a9775955019daaf1f54bd37753a" +version = "0.8.5" dependencies = [ "cocoa 0.25.0", "crossbeam-channel", @@ -3879,8 +3877,6 @@ dependencies = [ [[package]] name = "tray-icon" version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b164327e17101c78ba3dfdf879b977027ef1bd7855668ac30063de21fc02447" dependencies = [ "cocoa 0.25.0", "core-graphics 0.23.1", diff --git a/examples/api/src-tauri/tauri.conf.json b/examples/api/src-tauri/tauri.conf.json index 784733dd675..14c1259d833 100644 --- a/examples/api/src-tauri/tauri.conf.json +++ b/examples/api/src-tauri/tauri.conf.json @@ -2,7 +2,7 @@ "$schema": "../../../core/tauri-config-schema/schema.json", "build": { "distDir": "../dist", - "devPath": "http://localhost:5173", + "devPath": "http://localhost:1520", "beforeDevCommand": "yarn dev", "beforeBuildCommand": "yarn build", "withGlobalTauri": true @@ -26,11 +26,7 @@ "name": "theme", "takesValue": true, "description": "App theme", - "possibleValues": [ - "light", - "dark", - "system" - ] + "possibleValues": ["light", "dark", "system"] }, { "short": "v", @@ -93,9 +89,7 @@ "csp": { "default-src": "'self' customprotocol: asset:", "connect-src": "ipc: https://ipc.localhost", - "font-src": [ - "https://fonts.gstatic.com" - ], + "font-src": ["https://fonts.gstatic.com"], "img-src": "'self' asset: https://asset.localhost blob: data:", "style-src": "'unsafe-inline' 'self' https://fonts.googleapis.com" }, @@ -103,13 +97,8 @@ "assetProtocol": { "enable": true, "scope": { - "allow": [ - "$APPDATA/db/**", - "$RESOURCE/**" - ], - "deny": [ - "$APPDATA/db/*.stronghold" - ] + "allow": ["$APPDATA/db/**", "$RESOURCE/**"], + "deny": ["$APPDATA/db/*.stronghold"] } } } diff --git a/examples/api/src/vite-env.d.ts b/examples/api/src/vite-env.d.ts new file mode 100644 index 00000000000..4078e7476a2 --- /dev/null +++ b/examples/api/src/vite-env.d.ts @@ -0,0 +1,2 @@ +/// +/// diff --git a/examples/api/svelte.config.js b/examples/api/svelte.config.js new file mode 100644 index 00000000000..b0683fd24d7 --- /dev/null +++ b/examples/api/svelte.config.js @@ -0,0 +1,7 @@ +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' + +export default { + // Consult https://svelte.dev/docs#compile-time-svelte-preprocess + // for more information about preprocessors + preprocess: vitePreprocess(), +} diff --git a/examples/api/vite.config.js b/examples/api/vite.config.js index 5adb47734a6..62d40341872 100644 --- a/examples/api/vite.config.js +++ b/examples/api/vite.config.js @@ -9,7 +9,11 @@ import { internalIpV4 } from 'internal-ip' // https://vitejs.dev/config/ export default defineConfig(async ({ command, mode }) => { - const host = process.env.TAURI_PLATFORM === 'android' || process.env.TAURI_PLATFORM === 'ios' ? (await internalIpV4()) : 'localhost' + const host = + process.env.TAURI_PLATFORM === 'android' || + process.env.TAURI_PLATFORM === 'ios' + ? await internalIpV4() + : 'localhost' return { plugins: [Unocss(), svelte()], build: { @@ -21,14 +25,15 @@ export default defineConfig(async ({ command, mode }) => { } } }, + clearScreen: false, server: { host: '0.0.0.0', - port: 5173, + port: 1520, strictPort: true, hmr: { protocol: 'ws', host, - port: 5183 + port: 1521 }, fs: { allow: ['.', '../../tooling/api/dist'] diff --git a/examples/api/yarn.lock b/examples/api/yarn.lock index e92415b4a90..8aeb3e4eb3a 100644 --- a/examples/api/yarn.lock +++ b/examples/api/yarn.lock @@ -2,44 +2,162 @@ # yarn lockfile v1 +"@ampproject/remapping@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" + integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== + dependencies: + "@jridgewell/gen-mapping" "^0.3.0" + "@jridgewell/trace-mapping" "^0.3.9" + "@antfu/install-pkg@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.1.0.tgz#8d8c61820cbc32e5c37d82d515485ad3ee9bd052" - integrity sha512-VaIJd3d1o7irZfK1U0nvBsHMyjkuyMP3HKYVV53z8DKyulkHKmjhhtccXO51WSPeeSHIeoJEoNOKavYpS7jkZw== + version "0.1.1" + resolved "https://registry.yarnpkg.com/@antfu/install-pkg/-/install-pkg-0.1.1.tgz#157bb04f0de8100b9e4c01734db1a6c77e98bbb5" + integrity sha512-LyB/8+bSfa0DFGC06zpCEfs89/XoWZwws5ygEa5D+Xsm3OfI+aXQ86VgVG7Acyef+rSZ5HE7J8rrxzrQeM3PjQ== dependencies: execa "^5.1.1" find-up "^5.0.0" -"@antfu/utils@^0.5.0", "@antfu/utils@^0.5.1": +"@antfu/utils@^0.5.0": version "0.5.2" resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.5.2.tgz#8c2d931ff927be0ebe740169874a3d4004ab414b" integrity sha512-CQkeV+oJxUazwjlHD0/3ZD08QWKuGQkhnrKo3e6ly5pd48VUpXbb77q0xMU4+vc2CkJnDS02Eq/M9ugyX20XZA== -"@esbuild/android-arm@0.15.18": - version "0.15.18" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.15.18.tgz#266d40b8fdcf87962df8af05b76219bc786b4f80" - integrity sha512-5GT+kcs2WVGjVs7+boataCkO5Fg0y4kCjzkB5bAip7H4jfnOS3dA6KPiww9W1OEKTKeAcUVhdZGvgI65OXmUnw== - -"@esbuild/linux-loong64@0.15.18": - version "0.15.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.15.18.tgz#128b76ecb9be48b60cf5cfc1c63a4f00691a3239" - integrity sha512-L4jVKS82XVhw2nvzLg/19ClLWg0y27ulRwuP7lcyL6AbUWB5aPglXY3M21mauDQMDfRLs8cQmeT03r/+X3cZYQ== +"@antfu/utils@^0.7.5": + version "0.7.6" + resolved "https://registry.yarnpkg.com/@antfu/utils/-/utils-0.7.6.tgz#30a046419b9e1ecd276e53d41ab68fb6c558c04d" + integrity sha512-pvFiLP2BeOKA/ZOS6jxx4XhKzdVLHDhGlFEaZ2flWWYf2xOqVniqpk38I04DFRyz+L0ASggl7SkItTc+ZLju4w== + +"@esbuild/android-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz#984b4f9c8d0377443cc2dfcef266d02244593622" + integrity sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ== + +"@esbuild/android-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.18.20.tgz#fedb265bc3a589c84cc11f810804f234947c3682" + integrity sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw== + +"@esbuild/android-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.18.20.tgz#35cf419c4cfc8babe8893d296cd990e9e9f756f2" + integrity sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg== + +"@esbuild/darwin-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz#08172cbeccf95fbc383399a7f39cfbddaeb0d7c1" + integrity sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA== + +"@esbuild/darwin-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz#d70d5790d8bf475556b67d0f8b7c5bdff053d85d" + integrity sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ== + +"@esbuild/freebsd-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz#98755cd12707f93f210e2494d6a4b51b96977f54" + integrity sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw== + +"@esbuild/freebsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz#c1eb2bff03915f87c29cece4c1a7fa1f423b066e" + integrity sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ== + +"@esbuild/linux-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz#bad4238bd8f4fc25b5a021280c770ab5fc3a02a0" + integrity sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA== + +"@esbuild/linux-arm@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz#3e617c61f33508a27150ee417543c8ab5acc73b0" + integrity sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg== + +"@esbuild/linux-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz#699391cccba9aee6019b7f9892eb99219f1570a7" + integrity sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA== + +"@esbuild/linux-loong64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz#e6fccb7aac178dd2ffb9860465ac89d7f23b977d" + integrity sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg== + +"@esbuild/linux-mips64el@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz#eeff3a937de9c2310de30622a957ad1bd9183231" + integrity sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ== + +"@esbuild/linux-ppc64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz#2f7156bde20b01527993e6881435ad79ba9599fb" + integrity sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA== + +"@esbuild/linux-riscv64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz#6628389f210123d8b4743045af8caa7d4ddfc7a6" + integrity sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A== + +"@esbuild/linux-s390x@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz#255e81fb289b101026131858ab99fba63dcf0071" + integrity sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ== + +"@esbuild/linux-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz#c7690b3417af318a9b6f96df3031a8865176d338" + integrity sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w== + +"@esbuild/netbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz#30e8cd8a3dded63975e2df2438ca109601ebe0d1" + integrity sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A== + +"@esbuild/openbsd-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz#7812af31b205055874c8082ea9cf9ab0da6217ae" + integrity sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg== + +"@esbuild/sunos-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz#d5c275c3b4e73c9b0ecd38d1ca62c020f887ab9d" + integrity sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ== + +"@esbuild/win32-arm64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz#73bc7f5a9f8a77805f357fab97f290d0e4820ac9" + integrity sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg== + +"@esbuild/win32-ia32@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz#ec93cbf0ef1085cc12e71e0d661d20569ff42102" + integrity sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g== + +"@esbuild/win32-x64@0.18.20": + version "0.18.20" + resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz#786c5f41f043b07afb1af37683d7c33668858f6d" + integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== "@iconify-json/codicon@^1.1.10": - version "1.1.10" - resolved "https://registry.yarnpkg.com/@iconify-json/codicon/-/codicon-1.1.10.tgz#22fee909be51afebfbcc6cd57209064b5363f202" - integrity sha512-xx3nX5k4UeDQnpX9D1T6L1RCEwyLtqu3Lqk9plYK+SoBSQ/kR73bPy9WbYyDVOw2MDw50JCSpZZYlBC718k7Sg== + version "1.1.28" + resolved "https://registry.yarnpkg.com/@iconify-json/codicon/-/codicon-1.1.28.tgz#b753f619a902e382dad6575fa8075aff8fb1d9e3" + integrity sha512-a4rcQ/Rh65QJbifXeb5eAqiXZmgen6oX0jM/BV/64Hh69EREHYVnjndTSdQq+rywCxG6ipiMJBrfBnjX4+20Sg== dependencies: - "@iconify/types" "^1.1.0" + "@iconify/types" "*" "@iconify-json/ph@^1.1.1": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@iconify-json/ph/-/ph-1.1.1.tgz#17b3dee91a47055bac93d65c32b9ee33c654d56f" - integrity sha512-sIHTY+c1F8x29BM49IqoccJ3T8mvVXPcrE4WOpJ3GsBaip2YqFJRYU60rw64UL6GEI13vWSD7NsZKq8ytTO87g== + version "1.1.6" + resolved "https://registry.yarnpkg.com/@iconify-json/ph/-/ph-1.1.6.tgz#bbb7a3589199d91d8298bc084c4e893c8821ad8e" + integrity sha512-dexzEndlXQX/sbQhnEpA94Pby6JCGV2tZToSGcPPQpbilDGyk5VMd0ymusYoocRAn6+qLpGRvMoz5XFKGqP+VA== dependencies: - "@iconify/types" "^1.0.12" + "@iconify/types" "*" + +"@iconify/types@*": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@iconify/types/-/types-2.0.0.tgz#ab0e9ea681d6c8a1214f30cd741fe3a20cc57f57" + integrity sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg== -"@iconify/types@^1.0.12", "@iconify/types@^1.1.0": +"@iconify/types@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@iconify/types/-/types-1.1.0.tgz#dc15fc988b1b3fd558dd140a24ede7e0aac11280" integrity sha512-Jh0llaK2LRXQoYsorIH8maClebsnzTcve+7U3rQUSnC11X4jtPnFuyatqFLvMxZ8MLG8dB4zfHsbPfuvxluONw== @@ -56,6 +174,38 @@ kolorist "^1.5.1" local-pkg "^0.4.1" +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.3" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" + integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.1.0": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" + integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== + +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14", "@jridgewell/sourcemap-codec@^1.4.15": + version "1.4.15" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.18", "@jridgewell/trace-mapping@^0.3.9": + version "0.3.19" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" + integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -90,20 +240,33 @@ estree-walker "^2.0.1" picomatch "^2.2.2" -"@sveltejs/vite-plugin-svelte@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-1.0.1.tgz#7f468f03c933fcdfc60d4773671c73f33b9ef4d6" - integrity sha512-PorCgUounn0VXcpeJu+hOweZODKmGuLHsLomwqSj+p26IwjjGffmYQfVHtiTWq+NqaUuuHWWG7vPge6UFw4Aeg== +"@sveltejs/vite-plugin-svelte-inspector@^1.0.3": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-1.0.4.tgz#c99fcb73aaa845a3e2c0563409aeb3ee0b863add" + integrity sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ== dependencies: - "@rollup/pluginutils" "^4.2.1" debug "^4.3.4" - deepmerge "^4.2.2" + +"@sveltejs/vite-plugin-svelte@^2.4.2": + version "2.4.5" + resolved "https://registry.yarnpkg.com/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.4.5.tgz#55ba60ce37dfa3acf76b4ec54955011a34cd49a2" + integrity sha512-UJKsFNwhzCVuiZd06jM/psscyNJNDwjQC+qIeb7GBJK9iWeQCcIyfcPWDvbCudfcJggY9jtxJeeaZH7uny93FQ== + dependencies: + "@sveltejs/vite-plugin-svelte-inspector" "^1.0.3" + debug "^4.3.4" + deepmerge "^4.3.1" kleur "^4.1.5" - magic-string "^0.26.2" - svelte-hmr "^0.14.12" + magic-string "^0.30.2" + svelte-hmr "^0.15.3" + vitefu "^0.2.4" "@tauri-apps/api@../../tooling/api/dist": - version "2.0.0-alpha.3" + version "0.0.0" + +"@types/estree@*", "@types/estree@^1.0.0", "@types/estree@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" + integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== "@unocss/cli@0.39.3": version "0.39.3" @@ -254,14 +417,33 @@ resolved "https://registry.yarnpkg.com/@zerodevx/svelte-json-view/-/svelte-json-view-0.2.1.tgz#12d1497f49d120bfb74e098dbe46ce5f16240d1c" integrity sha512-yaLojLYTi08vccUKRg/XSRCCPoyzCZqrG+W8mVhJEGiOfFKAmWqNH6b+/il1gG3V1UaEe7amj2mzmo1mo4q1iA== +acorn@^8.10.0, acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + anymatch@~3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + version "3.1.3" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e" + integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" +aria-query@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.3.0.tgz#650c569e41ad90b51b3d7df5e5eed1c7549c103e" + integrity sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A== + dependencies: + dequal "^2.0.3" + +axobject-query@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.2.1.tgz#39c378a6e3b06ca679f29138151e45b2b32da62a" + integrity sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg== + dependencies: + dequal "^2.0.3" + binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" @@ -282,9 +464,9 @@ busboy@^1.6.0: streamsearch "^1.1.0" cac@^6.7.12: - version "6.7.12" - resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.12.tgz#6fb5ea2ff50bd01490dbda497f4ae75a99415193" - integrity sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA== + version "6.7.14" + resolved "https://registry.yarnpkg.com/cac/-/cac-6.7.14.tgz#804e1e6f506ee363cb0e3ccbb09cad5dd9870959" + integrity sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ== chokidar@^3.5.3: version "3.5.3" @@ -301,10 +483,21 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +code-red@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/code-red/-/code-red-1.0.4.tgz#59ba5c9d1d320a4ef795bc10a28bd42bfebe3e35" + integrity sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + "@types/estree" "^1.0.1" + acorn "^8.10.0" + estree-walker "^3.0.3" + periscopic "^3.1.0" + colorette@^2.0.16: - version "2.0.19" - resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.19.tgz#cdf044f47ad41a0f4b56b3a0d5b4e6e1a2d5a798" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== + version "2.0.20" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.20.tgz#9eb793e6833067f7235902fcd3b09917a000a95a" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== consola@^2.15.3: version "2.15.3" @@ -320,12 +513,12 @@ cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-tree@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.1.0.tgz#170e27ccf94e7c5facb183765c25898be843d1d2" - integrity sha512-PcysZRzToBbrpoUrZ9qfblRIRf8zbEAkU0AIpQFtgkFK0vSbzOmBCvdSAx2Zg7Xx5wiYJKUKk0NMP7kxevie/A== +css-tree@^2.1.0, css-tree@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.3.1.tgz#10264ce1e5442e8572fc82fbe490644ff54b5c20" + integrity sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw== dependencies: - mdn-data "2.0.27" + mdn-data "2.0.30" source-map-js "^1.0.1" debug@^4.3.4: @@ -335,10 +528,10 @@ debug@^4.3.4: dependencies: ms "2.1.2" -deepmerge@^4.2.2: - version "4.2.2" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.2.2.tgz#44d2ea3679b8f4d4ffba33f03d865fc1e7bf4955" - integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== +deepmerge@^4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" + integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== default-gateway@^6.0.3: version "6.0.3" @@ -347,154 +540,66 @@ default-gateway@^6.0.3: dependencies: execa "^5.0.0" -defu@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/defu/-/defu-6.0.0.tgz#b397a6709a2f3202747a3d9daf9446e41ad0c5fc" - integrity sha512-t2MZGLf1V2rV4VBZbWIaXKdX/mUcYW0n2znQZoADBkGGxYL8EWqCuCZBmJPJ/Yy9fofJkyuuSuo5GSwo0XdEgw== +defu@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/defu/-/defu-6.1.2.tgz#1217cba167410a1765ba93893c6dbac9ed9d9e5c" + integrity sha512-+uO4+qr7msjNNWKYPHqN/3+Dx3NFkmIzayk2L1MyZQlvgZb/J1A0fo410dpKrN2SnqFjt8n4JL8fDJE0wIgjFQ== -destr@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/destr/-/destr-1.1.1.tgz#910457d10a2f2f247add4ca4fdb4a03adcc49079" - integrity sha512-QqkneF8LrYmwATMdnuD2MLI3GHQIcBnG6qFC2q9bSH430VTCDAVjcspPmUaKhPGtAtPAftIUFqY1obQYQuwmbg== +dequal@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/dequal/-/dequal-2.0.3.tgz#2644214f1997d39ed0ee0ece72335490a7ac67be" + integrity sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA== + +destr@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/destr/-/destr-1.2.2.tgz#7ba9befcafb645a50e76b260449c63927b51e22f" + integrity sha512-lrbCJwD9saUQrqUfXvl6qoM+QN3W7tLV5pAOs+OqOmopCCz/JkE05MHedJR1xfk4IAnZuJXPVuN5+7jNA2ZCiA== duplexer@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== -esbuild-android-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-android-64/-/esbuild-android-64-0.15.18.tgz#20a7ae1416c8eaade917fb2453c1259302c637a5" - integrity sha512-wnpt3OXRhcjfIDSZu9bnzT4/TNTDsOUvip0foZOUBG7QbSt//w3QV4FInVJxNhKc/ErhUxc5z4QjHtMi7/TbgA== - -esbuild-android-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.15.18.tgz#9cc0ec60581d6ad267568f29cf4895ffdd9f2f04" - integrity sha512-G4xu89B8FCzav9XU8EjsXacCKSG2FT7wW9J6hOc18soEHJdtWu03L3TQDGf0geNxfLTtxENKBzMSq9LlbjS8OQ== - -esbuild-darwin-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.15.18.tgz#428e1730ea819d500808f220fbc5207aea6d4410" - integrity sha512-2WAvs95uPnVJPuYKP0Eqx+Dl/jaYseZEUUT1sjg97TJa4oBtbAKnPnl3b5M9l51/nbx7+QAEtuummJZW0sBEmg== - -esbuild-darwin-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.15.18.tgz#b6dfc7799115a2917f35970bfbc93ae50256b337" - integrity sha512-tKPSxcTJ5OmNb1btVikATJ8NftlyNlc8BVNtyT/UAr62JFOhwHlnoPrhYWz09akBLHI9nElFVfWSTSRsrZiDUA== - -esbuild-freebsd-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.15.18.tgz#4e190d9c2d1e67164619ae30a438be87d5eedaf2" - integrity sha512-TT3uBUxkteAjR1QbsmvSsjpKjOX6UkCstr8nMr+q7zi3NuZ1oIpa8U41Y8I8dJH2fJgdC3Dj3CXO5biLQpfdZA== - -esbuild-freebsd-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.15.18.tgz#18a4c0344ee23bd5a6d06d18c76e2fd6d3f91635" - integrity sha512-R/oVr+X3Tkh+S0+tL41wRMbdWtpWB8hEAMsOXDumSSa6qJR89U0S/PpLXrGF7Wk/JykfpWNokERUpCeHDl47wA== - -esbuild-linux-32@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.15.18.tgz#9a329731ee079b12262b793fb84eea762e82e0ce" - integrity sha512-lphF3HiCSYtaa9p1DtXndiQEeQDKPl9eN/XNoBf2amEghugNuqXNZA/ZovthNE2aa4EN43WroO0B85xVSjYkbg== - -esbuild-linux-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.15.18.tgz#532738075397b994467b514e524aeb520c191b6c" - integrity sha512-hNSeP97IviD7oxLKFuii5sDPJ+QHeiFTFLoLm7NZQligur8poNOWGIgpQ7Qf8Balb69hptMZzyOBIPtY09GZYw== - -esbuild-linux-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.15.18.tgz#5372e7993ac2da8f06b2ba313710d722b7a86e5d" - integrity sha512-54qr8kg/6ilcxd+0V3h9rjT4qmjc0CccMVWrjOEM/pEcUzt8X62HfBSeZfT2ECpM7104mk4yfQXkosY8Quptug== - -esbuild-linux-arm@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.15.18.tgz#e734aaf259a2e3d109d4886c9e81ec0f2fd9a9cc" - integrity sha512-UH779gstRblS4aoS2qpMl3wjg7U0j+ygu3GjIeTonCcN79ZvpPee12Qun3vcdxX+37O5LFxz39XeW2I9bybMVA== - -esbuild-linux-mips64le@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.15.18.tgz#c0487c14a9371a84eb08fab0e1d7b045a77105eb" - integrity sha512-Mk6Ppwzzz3YbMl/ZZL2P0q1tnYqh/trYZ1VfNP47C31yT0K8t9s7Z077QrDA/guU60tGNp2GOwCQnp+DYv7bxQ== - -esbuild-linux-ppc64le@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.15.18.tgz#af048ad94eed0ce32f6d5a873f7abe9115012507" - integrity sha512-b0XkN4pL9WUulPTa/VKHx2wLCgvIAbgwABGnKMY19WhKZPT+8BxhZdqz6EgkqCLld7X5qiCY2F/bfpUUlnFZ9w== - -esbuild-linux-riscv64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-riscv64/-/esbuild-linux-riscv64-0.15.18.tgz#423ed4e5927bd77f842bd566972178f424d455e6" - integrity sha512-ba2COaoF5wL6VLZWn04k+ACZjZ6NYniMSQStodFKH/Pu6RxzQqzsmjR1t9QC89VYJxBeyVPTaHuBMCejl3O/xg== - -esbuild-linux-s390x@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.15.18.tgz#21d21eaa962a183bfb76312e5a01cc5ae48ce8eb" - integrity sha512-VbpGuXEl5FCs1wDVp93O8UIzl3ZrglgnSQ+Hu79g7hZu6te6/YHgVJxCM2SqfIila0J3k0csfnf8VD2W7u2kzQ== - -esbuild-netbsd-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.15.18.tgz#ae75682f60d08560b1fe9482bfe0173e5110b998" - integrity sha512-98ukeCdvdX7wr1vUYQzKo4kQ0N2p27H7I11maINv73fVEXt2kyh4K4m9f35U1K43Xc2QGXlzAw0K9yoU7JUjOg== - -esbuild-openbsd-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.15.18.tgz#79591a90aa3b03e4863f93beec0d2bab2853d0a8" - integrity sha512-yK5NCcH31Uae076AyQAXeJzt/vxIo9+omZRKj1pauhk3ITuADzuOx5N2fdHrAKPxN+zH3w96uFKlY7yIn490xQ== - -esbuild-sunos-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.15.18.tgz#fd528aa5da5374b7e1e93d36ef9b07c3dfed2971" - integrity sha512-On22LLFlBeLNj/YF3FT+cXcyKPEI263nflYlAhz5crxtp3yRG1Ugfr7ITyxmCmjm4vbN/dGrb/B7w7U8yJR9yw== - -esbuild-windows-32@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.15.18.tgz#0e92b66ecdf5435a76813c4bc5ccda0696f4efc3" - integrity sha512-o+eyLu2MjVny/nt+E0uPnBxYuJHBvho8vWsC2lV61A7wwTWC3jkN2w36jtA+yv1UgYkHRihPuQsL23hsCYGcOQ== - -esbuild-windows-64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.15.18.tgz#0fc761d785414284fc408e7914226d33f82420d0" - integrity sha512-qinug1iTTaIIrCorAUjR0fcBk24fjzEedFYhhispP8Oc7SFvs+XeW3YpAKiKp8dRpizl4YYAhxMjlftAMJiaUw== - -esbuild-windows-arm64@0.15.18: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.15.18.tgz#5b5bdc56d341d0922ee94965c89ee120a6a86eb7" - integrity sha512-q9bsYzegpZcLziq0zgUi5KqGVtfhjxGbnksaBFYmWLxeV/S1fK4OLdq2DFYnXcLMjlZw2L0jLsk1eGoB522WXQ== - -esbuild@^0.15.9: - version "0.15.18" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.15.18.tgz#ea894adaf3fbc036d32320a00d4d6e4978a2f36d" - integrity sha512-x/R72SmW3sSFRm5zrrIjAhCeQSAWoni3CmHEqfQrZIQTM3lVCdehdwuIqaOtfC2slvpdlLa62GYoN8SxT23m6Q== +esbuild@^0.18.10: + version "0.18.20" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.18.20.tgz#4709f5a34801b43b799ab7d6d82f7284a9b7a7a6" + integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== optionalDependencies: - "@esbuild/android-arm" "0.15.18" - "@esbuild/linux-loong64" "0.15.18" - esbuild-android-64 "0.15.18" - esbuild-android-arm64 "0.15.18" - esbuild-darwin-64 "0.15.18" - esbuild-darwin-arm64 "0.15.18" - esbuild-freebsd-64 "0.15.18" - esbuild-freebsd-arm64 "0.15.18" - esbuild-linux-32 "0.15.18" - esbuild-linux-64 "0.15.18" - esbuild-linux-arm "0.15.18" - esbuild-linux-arm64 "0.15.18" - esbuild-linux-mips64le "0.15.18" - esbuild-linux-ppc64le "0.15.18" - esbuild-linux-riscv64 "0.15.18" - esbuild-linux-s390x "0.15.18" - esbuild-netbsd-64 "0.15.18" - esbuild-openbsd-64 "0.15.18" - esbuild-sunos-64 "0.15.18" - esbuild-windows-32 "0.15.18" - esbuild-windows-64 "0.15.18" - esbuild-windows-arm64 "0.15.18" + "@esbuild/android-arm" "0.18.20" + "@esbuild/android-arm64" "0.18.20" + "@esbuild/android-x64" "0.18.20" + "@esbuild/darwin-arm64" "0.18.20" + "@esbuild/darwin-x64" "0.18.20" + "@esbuild/freebsd-arm64" "0.18.20" + "@esbuild/freebsd-x64" "0.18.20" + "@esbuild/linux-arm" "0.18.20" + "@esbuild/linux-arm64" "0.18.20" + "@esbuild/linux-ia32" "0.18.20" + "@esbuild/linux-loong64" "0.18.20" + "@esbuild/linux-mips64el" "0.18.20" + "@esbuild/linux-ppc64" "0.18.20" + "@esbuild/linux-riscv64" "0.18.20" + "@esbuild/linux-s390x" "0.18.20" + "@esbuild/linux-x64" "0.18.20" + "@esbuild/netbsd-x64" "0.18.20" + "@esbuild/openbsd-x64" "0.18.20" + "@esbuild/sunos-x64" "0.18.20" + "@esbuild/win32-arm64" "0.18.20" + "@esbuild/win32-ia32" "0.18.20" + "@esbuild/win32-x64" "0.18.20" estree-walker@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-2.0.2.tgz#52f010178c2a4c117a7757cfe942adb7d2da4cac" integrity sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w== +estree-walker@^3.0.0, estree-walker@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/estree-walker/-/estree-walker-3.0.3.tgz#67c3e549ec402a487b4fc193d1953a524752340d" + integrity sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g== + dependencies: + "@types/estree" "^1.0.0" + execa@^5.0.0, execa@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd" @@ -511,9 +616,9 @@ execa@^5.0.0, execa@^5.1.1: strip-final-newline "^2.0.0" fast-glob@^3.2.11: - version "3.2.11" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" - integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + version "3.3.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" @@ -522,9 +627,9 @@ fast-glob@^3.2.11: micromatch "^4.0.4" fastq@^1.6.0: - version "1.13.0" - resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.13.0.tgz#616760f88a7526bdfc596b7cab8c18938c36b98c" - integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== + version "1.15.0" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.15.0.tgz#d04d07c6a2a68fe4599fea8d2e103a937fae6b3a" + integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== dependencies: reusify "^1.0.4" @@ -544,14 +649,9 @@ find-up@^5.0.0: path-exists "^4.0.0" fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + version "2.3.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" + integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== get-stream@^6.0.0: version "6.0.1" @@ -572,13 +672,6 @@ gzip-size@^6.0.0: dependencies: duplexer "^0.1.2" -has@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -600,9 +693,9 @@ ip-regex@^4.0.0: integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== ipaddr.js@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.0.1.tgz#eca256a7a877e917aeb368b0a7497ddf42ef81c0" - integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== + version "2.1.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-2.1.0.tgz#2119bc447ff8c257753b196fc5f1ce08a4cdf39f" + integrity sha512-LlbxQ7xKzfBusov6UMi4MFpEg0m+mAm9xyNGEduwXMEDuf4WfzB/RZwMVYEd7IKGvh4IUkEXYxtAVu9T3OelJQ== is-binary-path@~2.1.0: version "2.1.0" @@ -611,13 +704,6 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-core-module@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" - integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== - dependencies: - has "^1.0.3" - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -642,6 +728,13 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-reference@^3.0.0, is-reference@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-3.0.1.tgz#d400f4260f7e55733955e60d361d827eb4d3b831" + integrity sha512-baJJdQLiYaJdvFbJqXrcGv3WU3QCzBlUcI5QhbesIm6/xPsvmO+2CDoi/GMOFBQEQm+PXkwOPrp9KK5ozZsp2w== + dependencies: + "@types/estree" "*" + is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" @@ -652,10 +745,15 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -jiti@^1.13.0: - version "1.14.0" - resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.14.0.tgz#5350fff532a4d891ca4bcd700c47c1f40e6ee326" - integrity sha512-4IwstlaKQc9vCTC+qUXLM1hajy2ImiL9KnLvVYiaHOtS/v3wRjhLlGl121AmgDgx/O43uKmxownJghS5XMya2A== +jiti@^1.19.1: + version "1.19.3" + resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.19.3.tgz#ef554f76465b3c2b222dc077834a71f0d4a37569" + integrity sha512-5eEbBDQT/jF1xg6l36P+mWGGoH9Spuy0PCdSr2dtWRDGC6ph/w9ZCL4lmESW8f8F7MwT3XKescfP0wnZWAKL9w== + +jsonc-parser@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" + integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== kleur@^4.1.5: version "4.1.5" @@ -663,14 +761,19 @@ kleur@^4.1.5: integrity sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ== kolorist@^1.5.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.5.1.tgz#c3d66dc4fabde4f6b7faa6efda84c00491f9e52b" - integrity sha512-lxpCM3HTvquGxKGzHeknB/sUjuVoUElLlfYnXZT73K8geR9jQbroGlSCFBax9/0mpGoD3kzcMLnOlGQPJJNyqQ== + version "1.8.0" + resolved "https://registry.yarnpkg.com/kolorist/-/kolorist-1.8.0.tgz#edddbbbc7894bc13302cdf740af6374d4a04743c" + integrity sha512-Y+60/zizpJ3HRH8DCss+q95yr6145JXZo46OTpFvDZWLfRCE4qChOyk1b26nMaNpfHHgxagk9dXT5OP0Tfe+dQ== local-pkg@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.1.tgz#e7b0d7aa0b9c498a1110a5ac5b00ba66ef38cfff" - integrity sha512-lL87ytIGP2FU5PWwNDo0w3WhIo2gopIAxPg9RxDYF7m4rr5ahuZxP22xnJHIvaLTe4Z9P6uKKY2UHiwyB4pcrw== + version "0.4.3" + resolved "https://registry.yarnpkg.com/local-pkg/-/local-pkg-0.4.3.tgz#0ff361ab3ae7f1c19113d9bb97b98b905dbc4963" + integrity sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g== + +locate-character@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-character/-/locate-character-3.0.0.tgz#0305c5b8744f61028ef5d01f444009e00779f974" + integrity sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA== locate-path@^6.0.0: version "6.0.0" @@ -680,16 +783,23 @@ locate-path@^6.0.0: p-locate "^5.0.0" magic-string@^0.26.2: - version "0.26.2" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.2.tgz#5331700e4158cd6befda738bb6b0c7b93c0d4432" - integrity sha512-NzzlXpclt5zAbmo6h6jNc8zl2gNRGHvmsZW4IvZhTC4W7k4OlLP+S5YLussa/r3ixNT66KOQfNORlXHSOy/X4A== + version "0.26.7" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.7.tgz#caf7daf61b34e9982f8228c4527474dac8981d6f" + integrity sha512-hX9XH3ziStPoPhJxLq1syWuZMxbDvGNbVchfrdCtanC7D13888bMFow61x8axrx+GfHLtVeAx2kxL7tTGRl+Ow== dependencies: sourcemap-codec "^1.4.8" -mdn-data@2.0.27: - version "2.0.27" - resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.27.tgz#1710baa7b0db8176d3b3d565ccb7915fc69525ab" - integrity sha512-kwqO0I0jtWr25KcfLm9pia8vLZ8qoAKhWZuZMbneJq3jjBD3gl5nZs8l8Tu3ZBlBAHVQtDur9rdDGyvtfVraHQ== +magic-string@^0.30.0, magic-string@^0.30.2: + version "0.30.3" + resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.3.tgz#403755dfd9d6b398dfa40635d52e96c5ac095b85" + integrity sha512-B7xGbll2fG/VjP+SWg4sX3JynwIU0mjoTc6MPpKNuIvftk6u6vqhDnk1R80b8C2GBR6ywqy+1DcKBrevBg+bmw== + dependencies: + "@jridgewell/sourcemap-codec" "^1.4.15" + +mdn-data@2.0.30: + version "2.0.30" + resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc" + integrity sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA== merge-stream@^2.0.0: version "2.0.0" @@ -714,6 +824,16 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mlly@^1.2.0, mlly@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/mlly/-/mlly-1.4.1.tgz#7ab9cbb040bf8bd8205a0c341ce9acc3ae0c3a74" + integrity sha512-SCDs78Q2o09jiZiE2WziwVBEqXQ02XkGdUy45cbJf+BpYRIjArXRJ1Wbowxkb+NaM9DWvS3UC9GiO/6eqvQ/pg== + dependencies: + acorn "^8.10.0" + pathe "^1.1.1" + pkg-types "^1.0.3" + ufo "^1.3.0" + mrmime@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" @@ -729,10 +849,10 @@ nanoid@^3.3.6: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== -node-fetch-native@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-0.1.4.tgz#09b06754f9e298bac23848050da2352125634f89" - integrity sha512-10EKpOCQPXwZVFh3U1ptOMWBgKTbsN7Vvo6WVKt5pw4hp8zbv6ZVBZPlXw+5M6Tyi1oc1iD4/sNPd71KYA16tQ== +node-fetch-native@^0.1.8: + version "0.1.8" + resolved "https://registry.yarnpkg.com/node-fetch-native/-/node-fetch-native-0.1.8.tgz#19e2eaf6d86ac14e711ebd2612f40517c3468f2a" + integrity sha512-ZNaury9r0NxaT2oL65GvdGDy+5PlSaHTovT6JV5tOW07k1TQmgC0olZETa4C9KZg0+6zBr99ctTYa3Utqj9P/Q== normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" @@ -747,14 +867,14 @@ npm-run-path@^4.0.1: path-key "^3.0.0" ohmyfetch@^0.4.18: - version "0.4.18" - resolved "https://registry.yarnpkg.com/ohmyfetch/-/ohmyfetch-0.4.18.tgz#2952e04bd52662d0618d3d2f344db0250c3eeac2" - integrity sha512-MslzNrQzBLtZHmiZBI8QMOcMpdNFlK61OJ34nFNFynZ4v+4BonfCQ7VIN4EGXvGGq5zhDzgdJoY3o9S1l2T7KQ== + version "0.4.21" + resolved "https://registry.yarnpkg.com/ohmyfetch/-/ohmyfetch-0.4.21.tgz#6850db751fc7bbf08153aa8b11ff1ef45fcfd963" + integrity sha512-VG7f/JRvqvBOYvL0tHyEIEG7XHWm7OqIfAs6/HqwWwDfjiJ1g0huIpe5sFEmyb+7hpFa1EGNH2aERWR72tlClw== dependencies: - destr "^1.1.1" - node-fetch-native "^0.1.3" - ufo "^0.8.4" - undici "^5.2.0" + destr "^1.2.0" + node-fetch-native "^0.1.8" + ufo "^0.8.6" + undici "^5.12.0" onetime@^5.1.2: version "5.1.2" @@ -806,40 +926,53 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - pathe@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.3.0.tgz#fd95bc16208263fa6dc1c78c07b3907a528de6eb" - integrity sha512-3vUjp552BJzCw9vqKsO5sttHkbYqqsZtH0x1PNtItgqx8BXEXzoY1SYRKcL6BTyVh4lGJGLj0tM42elUDMvcYA== + version "0.3.9" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-0.3.9.tgz#4baff768f37f03e3d9341502865fb93116f65191" + integrity sha512-6Y6s0vT112P3jD8dGfuS6r+lpa0qqNrLyHPOwvXMnyNTQaYiwgau2DP3aNDsR13xqtGj7rrPo+jFUATpU6/s+g== + +pathe@^1.1.0, pathe@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathe/-/pathe-1.1.1.tgz#1dd31d382b974ba69809adc9a7a347e65d84829a" + integrity sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q== perfect-debounce@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/perfect-debounce/-/perfect-debounce-0.1.3.tgz#ff6798ea543a3ba1f0efeeaf97c0340f5c8871ce" integrity sha512-NOT9AcKiDGpnV/HBhI22Str++XWcErO/bALvHCuhv33owZW/CjH8KAFLZDCmu3727sihe0wTxpDhyGc6M8qacQ== +periscopic@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/periscopic/-/periscopic-3.1.0.tgz#7e9037bf51c5855bd33b48928828db4afa79d97a" + integrity sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw== + dependencies: + "@types/estree" "^1.0.0" + estree-walker "^3.0.0" + is-reference "^3.0.0" + picocolors@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.2, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== -picomatch@^2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" - integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== +pkg-types@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/pkg-types/-/pkg-types-1.0.3.tgz#988b42ab19254c01614d13f4f65a2cfc7880f868" + integrity sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A== + dependencies: + jsonc-parser "^3.2.0" + mlly "^1.2.0" + pathe "^1.1.0" -postcss@^8.4.18: - version "8.4.24" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.24.tgz#f714dba9b2284be3cc07dbd2fc57ee4dc972d2df" - integrity sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg== +postcss@^8.4.27: + version "8.4.28" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.28.tgz#c6cc681ed00109072816e1557f889ef51cf950a5" + integrity sha512-Z7V5j0cq8oEKyejIKfpD8b4eBy9cwW2JWPk0+fB1HOAMsfHbnAXLLS+PfVWlzMSLQaWttKDt607I0XHmpE67Vw== dependencies: nanoid "^3.3.6" picocolors "^1.0.0" @@ -857,24 +990,15 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -resolve@^1.22.1: - version "1.22.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - reusify@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rollup@^2.79.1: - version "2.79.1" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.79.1.tgz#bedee8faef7c9f93a2647ac0108748f497f081c7" - integrity sha512-uKxbd0IhMZOhjAiD5oAFp7BqvkA4Dv47qpOCtaNvng4HBwdbWtdOh8f5nZNuk2rp51PMGk3bzfWu5oayNEuYnw== +rollup@^3.27.1: + version "3.28.1" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.28.1.tgz#fb44aa6d5e65c7e13fd5bcfff266d0c4ea9ba433" + integrity sha512-R9OMQmIHJm9znrU3m3cpE8uhN0fGdXiawME7aZIpQqvpS/85+Vt1Hq1/yVIcYfOmaQiHjvXkQAoJukvLpau6Yw== optionalDependencies: fsevents "~2.3.2" @@ -903,20 +1027,15 @@ signal-exit@^3.0.3: integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== sirv@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.2.tgz#128b9a628d77568139cff85703ad5497c46a4760" - integrity sha512-4Qog6aE29nIjAOKe/wowFTxOdmbEZKb+3tsLljaBRzJwtqto0BChD2zzH0LhgCSXiI+V7X+Y45v14wBZQ1TK3w== + version "2.0.3" + resolved "https://registry.yarnpkg.com/sirv/-/sirv-2.0.3.tgz#ca5868b87205a74bef62a469ed0296abceccd446" + integrity sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA== dependencies: "@polka/url" "^1.0.0-next.20" mrmime "^1.0.0" totalist "^3.0.0" -source-map-js@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.1.tgz#a1741c131e3c77d048252adfa24e23b908670caf" - integrity sha512-4+TN2b3tqOCd/kaGRJ/sTYA0tR0mdXx26ipdolxcwtJVqEnqNYvlCAt1q3ypy4QMlYus+Zh34RNtYLoq2oQ4IA== - -source-map-js@^1.0.2: +source-map-js@^1.0.1, source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== @@ -936,20 +1055,29 @@ strip-final-newline@^2.0.0: resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -svelte-hmr@^0.14.12: - version "0.14.12" - resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.14.12.tgz#a127aec02f1896500b10148b2d4d21ddde39973f" - integrity sha512-4QSW/VvXuqVcFZ+RhxiR8/newmwOCTlbYIezvkeN6302YFRE8cXy0naamHcjz8Y9Ce3ITTZtrHrIL0AGfyo61w== +svelte-hmr@^0.15.3: + version "0.15.3" + resolved "https://registry.yarnpkg.com/svelte-hmr/-/svelte-hmr-0.15.3.tgz#df54ccde9be3f091bf5f18fc4ef7b8eb6405fbe6" + integrity sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ== -svelte@^3.49.0: - version "3.49.0" - resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.49.0.tgz#5baee3c672306de1070c3b7888fc2204e36a4029" - integrity sha512-+lmjic1pApJWDfPCpUUTc1m8azDqYCG1JN9YEngrx/hUyIcFJo6VZhj0A1Ai0wqoHcEIuQy+e9tk+4uDgdtsFA== +svelte@^4.0.5: + version "4.2.0" + resolved "https://registry.yarnpkg.com/svelte/-/svelte-4.2.0.tgz#0e4304c15524450b22fba02516eb72efbd8847b6" + integrity sha512-kVsdPjDbLrv74SmLSUzAsBGquMs4MPgWGkGLpH+PjOYnFOziAvENVzgJmyOCV2gntxE32aNm8/sqNKD6LbIpeQ== + dependencies: + "@ampproject/remapping" "^2.2.1" + "@jridgewell/sourcemap-codec" "^1.4.15" + "@jridgewell/trace-mapping" "^0.3.18" + acorn "^8.9.0" + aria-query "^5.3.0" + axobject-query "^3.2.1" + code-red "^1.0.3" + css-tree "^2.3.1" + estree-walker "^3.0.3" + is-reference "^3.0.1" + locate-character "^3.0.0" + magic-string "^0.30.0" + periscopic "^3.1.0" to-regex-range@^5.0.1: version "5.0.1" @@ -959,28 +1087,34 @@ to-regex-range@^5.0.1: is-number "^7.0.0" totalist@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.0.tgz#4ef9c58c5f095255cdc3ff2a0a55091c57a3a1bd" - integrity sha512-eM+pCBxXO/njtF7vdFsHuqb+ElbxqtI4r5EAvk6grfAFyJ6IvWlSkfZ5T9ozC6xWw3Fj1fGoSmrl0gUs46JVIw== + version "3.0.1" + resolved "https://registry.yarnpkg.com/totalist/-/totalist-3.0.1.tgz#ba3a3d600c915b1a97872348f79c127475f6acf8" + integrity sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ== -ufo@^0.8.4: - version "0.8.4" - resolved "https://registry.yarnpkg.com/ufo/-/ufo-0.8.4.tgz#23e9ed82398d2116dcb378e8fba5ced8eca2ee40" - integrity sha512-/+BmBDe8GvlB2nIflWasLLAInjYG0bC9HRnfEpNi4sw77J2AJNnEVnTDReVrehoh825+Q/evF3THXTAweyam2g== +ufo@^0.8.6: + version "0.8.6" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-0.8.6.tgz#c0ec89bc0e0c9fa59a683680feb0f28b55ec323b" + integrity sha512-fk6CmUgwKCfX79EzcDQQpSCMxrHstvbLswFChHS0Vump+kFkw7nJBfTZoC1j0bOGoY9I7R3n2DGek5ajbcYnOw== + +ufo@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ufo/-/ufo-1.3.0.tgz#c92f8ac209daff607c57bbd75029e190930a0019" + integrity sha512-bRn3CsoojyNStCZe0BG0Mt4Nr/4KF+rhFlnNXybgqt5pXHNFRlqinSoQaTrGyzE4X8aHplSb+TorH+COin9Yxw== unconfig@^0.3.4: - version "0.3.4" - resolved "https://registry.yarnpkg.com/unconfig/-/unconfig-0.3.4.tgz#f0c85584a088a434dde2215d8a3b272427d6056c" - integrity sha512-cf39F1brwQuLSuMLTYXOdWJH0O1CJee6a4QW1nYtO7SoBUfVvQCvEel6ssTNXtPfi17kop1ADmVtmC49NlFkIQ== + version "0.3.10" + resolved "https://registry.yarnpkg.com/unconfig/-/unconfig-0.3.10.tgz#2439cfc4303c8e12f7333d7cb7286917a3eb9b63" + integrity sha512-tj317lhIq2iZF/NXrJnU1t2UaGUKKz1eL1sK2t63Oq66V9BxqvZV12m55fp/fpQJ+DDmVlLgo7cnLVOZkhlO/A== dependencies: - "@antfu/utils" "^0.5.1" - defu "^6.0.0" - jiti "^1.13.0" + "@antfu/utils" "^0.7.5" + defu "^6.1.2" + jiti "^1.19.1" + mlly "^1.4.0" -undici@^5.2.0: - version "5.19.1" - resolved "https://registry.yarnpkg.com/undici/-/undici-5.19.1.tgz#92b1fd3ab2c089b5a6bd3e579dcda8f1934ebf6d" - integrity sha512-YiZ61LPIgY73E7syxCDxxa3LV2yl3sN8spnIuTct60boiiRaE1J8mNWHO8Im2Zi/sFrPusjLlmRPrsyraSqX6A== +undici@^5.12.0: + version "5.23.0" + resolved "https://registry.yarnpkg.com/undici/-/undici-5.23.0.tgz#e7bdb0ed42cebe7b7aca87ced53e6eaafb8f8ca0" + integrity sha512-1D7w+fvRsqlQ9GscLBwcAJinqcZGHUKjbOmXdlE/v8BvEGXjeWAax+341q44EuTcHXXnfyKNbKRq4Lg7OzhMmg== dependencies: busboy "^1.6.0" @@ -1005,18 +1139,22 @@ unocss@^0.39.3: "@unocss/transformer-variant-group" "0.39.3" "@unocss/vite" "0.39.3" -vite@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/vite/-/vite-3.2.7.tgz#35a62826bd4d6b778ae5db8766d023bcd4e7bef3" - integrity sha512-29pdXjk49xAP0QBr0xXqu2s5jiQIXNvE/xwd0vUizYT2Hzqe4BksNNoWllFVXJf4eLZ+UlVQmXfB4lWrc+t18g== +vite@^4.4.5: + version "4.4.9" + resolved "https://registry.yarnpkg.com/vite/-/vite-4.4.9.tgz#1402423f1a2f8d66fd8d15e351127c7236d29d3d" + integrity sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA== dependencies: - esbuild "^0.15.9" - postcss "^8.4.18" - resolve "^1.22.1" - rollup "^2.79.1" + esbuild "^0.18.10" + postcss "^8.4.27" + rollup "^3.27.1" optionalDependencies: fsevents "~2.3.2" +vitefu@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/vitefu/-/vitefu-0.2.4.tgz#212dc1a9d0254afe65e579351bed4e25d81e0b35" + integrity sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g== + which@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" From f918bdb8f2ca1b56459dee4ff6a6b171b50a1801 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 00:36:36 +0300 Subject: [PATCH 06/64] fix ipc protocol for empty args --- core/tauri/src/ipc/protocol.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tauri/src/ipc/protocol.rs b/core/tauri/src/ipc/protocol.rs index 60883c5c88e..990645c6b1b 100644 --- a/core/tauri/src/ipc/protocol.rs +++ b/core/tauri/src/ipc/protocol.rs @@ -247,7 +247,7 @@ fn handle_ipc_request( let body = if content_type == mime::APPLICATION_OCTET_STREAM { body.into() } else if content_type == mime::APPLICATION_JSON { - if cfg!(ipc_custom_protocol) { + if cfg!(ipc_custom_protocol) && !body.is_empty() { serde_json::from_slice::(&body) .map_err(|e| e.to_string())? .into() From 4f2cdb65a411452583200d7097d772f36e7ab18d Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 00:37:07 +0300 Subject: [PATCH 07/64] add anyhow error variant --- core/tauri/src/error.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/tauri/src/error.rs b/core/tauri/src/error.rs index 34232e9e1b0..846ab5155e7 100644 --- a/core/tauri/src/error.rs +++ b/core/tauri/src/error.rs @@ -113,4 +113,7 @@ pub enum Error { /// The resource id is invalid. #[error("The resource id {0} is invalid.")] BadResourceId(crate::resources::ResourceId), + /// The anyhow crate error. + #[error(transparent)] + Anyhow(#[from] anyhow::Error), } From 3daf2ecd4963a8dca27bdd5185aa4bec00ff38ba Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 17:05:52 +0300 Subject: [PATCH 08/64] fix menu js implementation --- core/tauri/scripts/bundle.global.js | 2 +- core/tauri/src/menu/menu.rs | 2 +- core/tauri/src/menu/mod.rs | 4 +- core/tauri/src/menu/plugin.rs | 25 +++--- core/tauri/src/window.rs | 7 +- tooling/api/src/menu.ts | 131 +++++++++++++++------------- 6 files changed, 93 insertions(+), 78 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index fe22996ec5c..36e2ea2040b 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var x=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var h=(r,e)=>{for(var n in e)x(r,n,{get:e[n],enumerable:!0})},ee=(r,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of N(e))!B.call(r,u)&&u!==n&&x(r,u,{get:()=>e[u],enumerable:!(i=X(e,u))||i.enumerable});return r};var ne=r=>ee(x({},"__esModule",{value:!0}),r);var Q=(r,e,n)=>{if(!e.has(r))throw TypeError("Cannot "+n)};var l=(r,e,n)=>(Q(r,e,"read from private field"),n?n.call(r):e.get(r)),c=(r,e,n)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,n)},p=(r,e,n,i)=>(Q(r,e,"write to private field"),i?i.call(r,n):e.set(r,n),n);var Ge={};h(Ge,{event:()=>H,invoke:()=>Ve,menu:()=>$,path:()=>V,tauri:()=>L,tray:()=>G});var H={};h(H,{TauriEvent:()=>S,emit:()=>se,listen:()=>m,once:()=>W});var L={};h(L,{Channel:()=>E,PluginListener:()=>v,addPluginListener:()=>te,convertFileSrc:()=>ie,invoke:()=>t,transformCallback:()=>f});function re(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function f(r,e=!1){let n=re(),i=`_${n}`;return Object.defineProperty(window,i,{value:u=>(e&&Reflect.deleteProperty(window,i),r?.(u)),writable:!1,configurable:!0}),n}var y,E=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;c(this,y,()=>{});this.id=f(e=>{l(this,y).call(this,e)})}set onmessage(e){p(this,y,e)}get onmessage(){return l(this,y)}toJSON(){return`__CHANNEL__:${this.id}`}};y=new WeakMap;var v=class{constructor(e,n,i){this.plugin=e,this.event=n,this.channelId=i}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function te(r,e,n){let i=new E;return i.onmessage=n,t(`plugin:${r}|register_listener`,{event:e,handler:i}).then(()=>new v(r,e,i.id))}async function t(r,e={},n){return new Promise((i,u)=>{let P=f(D=>{i(D),Reflect.deleteProperty(window,`_${z}`)},!0),z=f(D=>{u(D),Reflect.deleteProperty(window,`_${P}`)},!0);window.__TAURI_IPC__({cmd:r,callback:P,error:z,payload:e,options:n})})}function ie(r,e="asset"){return window.__TAURI__.convertFileSrc(r,e)}var S=(a=>(a.WINDOW_RESIZED="tauri://resize",a.WINDOW_MOVED="tauri://move",a.WINDOW_CLOSE_REQUESTED="tauri://close-requested",a.WINDOW_CREATED="tauri://window-created",a.WINDOW_DESTROYED="tauri://destroyed",a.WINDOW_FOCUS="tauri://focus",a.WINDOW_BLUR="tauri://blur",a.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",a.WINDOW_THEME_CHANGED="tauri://theme-changed",a.WINDOW_FILE_DROP="tauri://file-drop",a.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",a.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",a.MENU="tauri://menu",a.TRAY="tauri://tray",a))(S||{});async function Y(r,e){await t("plugin:event|unlisten",{event:r,eventId:e})}async function m(r,e,n){return t("plugin:event|listen",{event:r,windowLabel:n?.target,handler:f(e)}).then(i=>async()=>Y(r,i))}async function W(r,e,n){return m(r,i=>{e(i),Y(r,i.id).catch(()=>{})},n)}async function se(r,e,n){await t("plugin:event|emit",{event:r,windowLabel:n?.target,payload:e})}var V={};h(V,{BaseDirectory:()=>q,appCacheDir:()=>le,appConfigDir:()=>oe,appDataDir:()=>ue,appLocalDataDir:()=>ae,appLogDir:()=>Ee,audioDir:()=>de,basename:()=>Le,cacheDir:()=>ce,configDir:()=>pe,dataDir:()=>me,delimiter:()=>Re,desktopDir:()=>ge,dirname:()=>De,documentDir:()=>_e,downloadDir:()=>he,executableDir:()=>ye,extname:()=>xe,fontDir:()=>fe,homeDir:()=>be,isAbsolute:()=>We,join:()=>Fe,localDataDir:()=>we,normalize:()=>Ue,pictureDir:()=>ke,publicDir:()=>Pe,resolve:()=>Ce,resolveResource:()=>Me,resourceDir:()=>Ae,runtimeDir:()=>Ie,sep:()=>Se,tempDir:()=>ve,templateDir:()=>Te,videoDir:()=>Oe});var q=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(q||{});async function oe(){return t("plugin:path|resolve_directory",{directory:13})}async function ue(){return t("plugin:path|resolve_directory",{directory:14})}async function ae(){return t("plugin:path|resolve_directory",{directory:15})}async function le(){return t("plugin:path|resolve_directory",{directory:16})}async function de(){return t("plugin:path|resolve_directory",{directory:1})}async function ce(){return t("plugin:path|resolve_directory",{directory:2})}async function pe(){return t("plugin:path|resolve_directory",{directory:3})}async function me(){return t("plugin:path|resolve_directory",{directory:4})}async function ge(){return t("plugin:path|resolve_directory",{directory:18})}async function _e(){return t("plugin:path|resolve_directory",{directory:6})}async function he(){return t("plugin:path|resolve_directory",{directory:7})}async function ye(){return t("plugin:path|resolve_directory",{directory:19})}async function fe(){return t("plugin:path|resolve_directory",{directory:20})}async function be(){return t("plugin:path|resolve_directory",{directory:21})}async function we(){return t("plugin:path|resolve_directory",{directory:5})}async function ke(){return t("plugin:path|resolve_directory",{directory:8})}async function Pe(){return t("plugin:path|resolve_directory",{directory:9})}async function Ae(){return t("plugin:path|resolve_directory",{directory:11})}async function Me(r){return t("plugin:path|resolve_directory",{directory:11,path:r})}async function Ie(){return t("plugin:path|resolve_directory",{directory:22})}async function Te(){return t("plugin:path|resolve_directory",{directory:23})}async function Oe(){return t("plugin:path|resolve_directory",{directory:10})}async function Ee(){return t("plugin:path|resolve_directory",{directory:17})}async function ve(r){return t("plugin:path|resolve_directory",{directory:12})}function Se(){return window.__TAURI__.path.__sep}function Re(){return window.__TAURI__.path.__delimiter}async function Ce(...r){return t("plugin:path|resolve",{paths:r})}async function Ue(r){return t("plugin:path|normalize",{path:r})}async function Fe(...r){return t("plugin:path|join",{paths:r})}async function De(r){return t("plugin:path|dirname",{path:r})}async function xe(r){return t("plugin:path|extname",{path:r})}async function Le(r,e){return t("plugin:path|basename",{path:r,ext:e})}async function We(r){return t("plugin:path|isAbsolute",{path:r})}var G={};h(G,{TrayIcon:()=>M});var A,b=class{constructor(e){c(this,A,void 0);p(this,A,e)}get rid(){return l(this,A)}async close(){return t("plugin:resources|close",{rid:this.rid})}};A=new WeakMap;function J(r,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i)||Object.create(null))})})}var M=class extends b{constructor(n,i){super(n);this.id=i}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),t("plugin:tray|new",{options:n??{}}).then(([i,u])=>new M(i,u))}async setIcon(n){return t("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),t("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return t("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return t("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return t("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return t("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return t("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return t("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async listen(n,i){return m(n,i,{target:window.__TAURI_METADATA__.__currentWindow.label})}async once(n,i){return W(n,i,{target:window.__TAURI_METADATA__.__currentWindow.label})}async on(n){return m("tauri://tray",i=>{i.payload.id==this.id&&n(i.payload)},{target:window.__TAURI_METADATA__.__currentWindow.label})}};var $={};h($,{CheckMenuItem:()=>w,IconMenuItem:()=>k,Menu:()=>d,MenuItem:()=>g,NativeIcon:()=>Z,Submenu:()=>_});async function He(r,e){if(!window.__TAURI_MENU__.handlers){window.__TAURI_MENU__.handlers={};let n=await m("tauri://menu",i=>{let u=window.__TAURI_MENU__.handlers?.[i.payload.id];if(u)for(e of u)e()},{target:window.__TAURI_METADATA__.__currentWindow.label});window.addEventListener("unload",()=>n())}window.__TAURI_MENU__.handlers[r]||(window.__TAURI_MENU__.handlers[r]=[]),window.__TAURI_MENU__.handlers[r].push(e)}var Z=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(Z||{});function K([r,e,n]){switch(n){case"Submenu":return new _(r,e);case"Predefined":return new j(r,e);case"Check":return new w(r,e);case"Icon":return new k(r,e);case"MenuItem":default:return new g(r,e)}}var T,O,R=class extends b{constructor(n,i,u){super(n);c(this,T,void 0);c(this,O,void 0);p(this,T,i),p(this,O,u)}get id(){return l(this,T)}get kind(){return l(this,O)}static async _new(n,i){let u;return"action"in i&&(u=i.action,delete i.action),t("plugin:menu|new",{kind:n,opts:i}).then(P=>(u&&He(P[1],u),P))}};T=new WeakMap,O=new WeakMap;var C=class extends R{constructor(e,n,i){super(e,n,i)}async append(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.kind,n.rid])})}async prepend(e){return t("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.kind,n.rid])})}async insert(e,n){return t("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(i=>[i.kind,i.rid]),position:n})}async remove(e){return t("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.kind,e.rid]})}async removeAt(e){return t("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(K)}async items(){return t("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(K))}async get(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?K(n):null)}async popup(e,n){return t("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},d=class extends C{constructor(e,n){super(e,n,"Menu")}static async new(e){return super._new("Menu",e).then(([n,i])=>new d(n,i))}static async default(){return t("plugin:menu|default").then(([e,n])=>new d(e,n))}async setAsAppMenu(){return t("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new d(e[0],e[1]):null)}async setAsWindowMenu(e){return t("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new d(n[0],n[1]):null)}},U=class extends R{async text(){return t("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return t("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},F=class extends U{async isEnabled(){return t("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return t("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},I=class extends F{async setAccelerator(e){return t("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},g=class extends I{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return super._new("MenuItem",e).then(([n,i])=>new g(n,i))}},_=class extends C{constructor(e,n){super(e,n,"Submenu")}static async new(e){return super._new("Submenu",e).then(([n,i])=>new _(n,i))}async setAsWindowsMenuForNSApp(){return t("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return t("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};J(_,F);var j=class extends U{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return super._new("MenuItem",e).then(([n,i])=>new g(n,i))}},w=class extends I{constructor(e,n){super(e,n,"Check")}static async new(e){return super._new("Check",e).then(([n,i])=>new w(n,i))}async isChecked(){return t("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return t("plugin:menu|set_checked",{rid:this.rid,checked:e})}},k=class extends I{constructor(e,n){super(e,n,"Icon")}static async new(e){return super._new("Icon",e).then(([n,i])=>new k(n,i))}async setIcon(e){return t("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return t("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};var Ve=t;return ne(Ge);})(); +"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var h=(r,e)=>{for(var n in e)L(r,n,{get:e[n],enumerable:!0})},ee=(r,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of N(e))!B.call(r,u)&&u!==n&&L(r,u,{get:()=>e[u],enumerable:!(i=X(e,u))||i.enumerable});return r};var ne=r=>ee(L({},"__esModule",{value:!0}),r);var Q=(r,e,n)=>{if(!e.has(r))throw TypeError("Cannot "+n)};var l=(r,e,n)=>(Q(r,e,"read from private field"),n?n.call(r):e.get(r)),c=(r,e,n)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,n)},p=(r,e,n,i)=>(Q(r,e,"write to private field"),i?i.call(r,n):e.set(r,n),n);var Ke={};h(Ke,{event:()=>H,invoke:()=>Ge,menu:()=>j,path:()=>V,tauri:()=>W,tray:()=>G});var H={};h(H,{TauriEvent:()=>E,emit:()=>oe,listen:()=>f,once:()=>se});var W={};h(W,{Channel:()=>S,PluginListener:()=>v,addPluginListener:()=>te,convertFileSrc:()=>ie,invoke:()=>t,transformCallback:()=>_});function re(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function _(r,e=!1){let n=re(),i=`_${n}`;return Object.defineProperty(window,i,{value:u=>(e&&Reflect.deleteProperty(window,i),r?.(u)),writable:!1,configurable:!0}),n}var y,S=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;c(this,y,()=>{});this.id=_(e=>{l(this,y).call(this,e)})}set onmessage(e){p(this,y,e)}get onmessage(){return l(this,y)}toJSON(){return`__CHANNEL__:${this.id}`}};y=new WeakMap;var v=class{constructor(e,n,i){this.plugin=e,this.event=n,this.channelId=i}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function te(r,e,n){let i=new S;return i.onmessage=n,t(`plugin:${r}|register_listener`,{event:e,handler:i}).then(()=>new v(r,e,i.id))}async function t(r,e={},n){return new Promise((i,u)=>{let $=_(x=>{i(x),Reflect.deleteProperty(window,`_${z}`)},!0),z=_(x=>{u(x),Reflect.deleteProperty(window,`_${$}`)},!0);window.__TAURI_IPC__({cmd:r,callback:$,error:z,payload:e,options:n})})}function ie(r,e="asset"){return window.__TAURI__.convertFileSrc(r,e)}var E=(a=>(a.WINDOW_RESIZED="tauri://resize",a.WINDOW_MOVED="tauri://move",a.WINDOW_CLOSE_REQUESTED="tauri://close-requested",a.WINDOW_CREATED="tauri://window-created",a.WINDOW_DESTROYED="tauri://destroyed",a.WINDOW_FOCUS="tauri://focus",a.WINDOW_BLUR="tauri://blur",a.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",a.WINDOW_THEME_CHANGED="tauri://theme-changed",a.WINDOW_FILE_DROP="tauri://file-drop",a.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",a.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",a.MENU="tauri://menu",a.TRAY="tauri://tray",a))(E||{});async function Y(r,e){await t("plugin:event|unlisten",{event:r,eventId:e})}async function f(r,e,n){return t("plugin:event|listen",{event:r,windowLabel:n?.target,handler:_(e)}).then(i=>async()=>Y(r,i))}async function se(r,e,n){return f(r,i=>{e(i),Y(r,i.id).catch(()=>{})},n)}async function oe(r,e,n){await t("plugin:event|emit",{event:r,windowLabel:n?.target,payload:e})}var V={};h(V,{BaseDirectory:()=>q,appCacheDir:()=>de,appConfigDir:()=>ue,appDataDir:()=>ae,appLocalDataDir:()=>le,appLogDir:()=>ve,audioDir:()=>ce,basename:()=>We,cacheDir:()=>pe,configDir:()=>me,dataDir:()=>ge,delimiter:()=>Ce,desktopDir:()=>he,dirname:()=>xe,documentDir:()=>ye,downloadDir:()=>_e,executableDir:()=>fe,extname:()=>Le,fontDir:()=>be,homeDir:()=>we,isAbsolute:()=>He,join:()=>De,localDataDir:()=>ke,normalize:()=>Fe,pictureDir:()=>Pe,publicDir:()=>Me,resolve:()=>Ue,resolveResource:()=>Ie,resourceDir:()=>Ae,runtimeDir:()=>Te,sep:()=>Re,tempDir:()=>Ee,templateDir:()=>Oe,videoDir:()=>Se});var q=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(q||{});async function ue(){return t("plugin:path|resolve_directory",{directory:13})}async function ae(){return t("plugin:path|resolve_directory",{directory:14})}async function le(){return t("plugin:path|resolve_directory",{directory:15})}async function de(){return t("plugin:path|resolve_directory",{directory:16})}async function ce(){return t("plugin:path|resolve_directory",{directory:1})}async function pe(){return t("plugin:path|resolve_directory",{directory:2})}async function me(){return t("plugin:path|resolve_directory",{directory:3})}async function ge(){return t("plugin:path|resolve_directory",{directory:4})}async function he(){return t("plugin:path|resolve_directory",{directory:18})}async function ye(){return t("plugin:path|resolve_directory",{directory:6})}async function _e(){return t("plugin:path|resolve_directory",{directory:7})}async function fe(){return t("plugin:path|resolve_directory",{directory:19})}async function be(){return t("plugin:path|resolve_directory",{directory:20})}async function we(){return t("plugin:path|resolve_directory",{directory:21})}async function ke(){return t("plugin:path|resolve_directory",{directory:5})}async function Pe(){return t("plugin:path|resolve_directory",{directory:8})}async function Me(){return t("plugin:path|resolve_directory",{directory:9})}async function Ae(){return t("plugin:path|resolve_directory",{directory:11})}async function Ie(r){return t("plugin:path|resolve_directory",{directory:11,path:r})}async function Te(){return t("plugin:path|resolve_directory",{directory:22})}async function Oe(){return t("plugin:path|resolve_directory",{directory:23})}async function Se(){return t("plugin:path|resolve_directory",{directory:10})}async function ve(){return t("plugin:path|resolve_directory",{directory:17})}async function Ee(r){return t("plugin:path|resolve_directory",{directory:12})}function Re(){return window.__TAURI__.path.__sep}function Ce(){return window.__TAURI__.path.__delimiter}async function Ue(...r){return t("plugin:path|resolve",{paths:r})}async function Fe(r){return t("plugin:path|normalize",{path:r})}async function De(...r){return t("plugin:path|join",{paths:r})}async function xe(r){return t("plugin:path|dirname",{path:r})}async function Le(r){return t("plugin:path|extname",{path:r})}async function We(r,e){return t("plugin:path|basename",{path:r,ext:e})}async function He(r){return t("plugin:path|isAbsolute",{path:r})}var G={};h(G,{TrayIcon:()=>A});var M,b=class{constructor(e){c(this,M,void 0);p(this,M,e)}get rid(){return l(this,M)}async close(){return t("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function J(r,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i)||Object.create(null))})})}var A=class extends b{constructor(n,i){super(n);this.id=i}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),t("plugin:tray|new",{options:n??{}}).then(([i,u])=>new A(i,u))}async setIcon(n){return t("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),t("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return t("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return t("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return t("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return t("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return t("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return t("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async on(n){return f("tauri://tray",i=>{i.payload.id==this.id&&n(i.payload)},{target:window.__TAURI_METADATA__.__currentWindow.label})}};var j={};h(j,{CheckMenuItem:()=>w,IconMenuItem:()=>k,Menu:()=>d,MenuItem:()=>m,NativeIcon:()=>Z,PredefinedMenuItem:()=>D,Submenu:()=>g});async function Ve(r,e){if(!window.__TAURI_MENU__){window.__TAURI_MENU__={handlers:{}};let n=await f("tauri://menu",i=>{console.log(i);let u=window.__TAURI_MENU__?.handlers[i.payload.id];if(u)for(e of u)e()},{target:window.__TAURI_METADATA__.__currentWindow.label});window.addEventListener("unload",()=>n())}window.__TAURI_MENU__.handlers[r]||(window.__TAURI_MENU__.handlers[r]=[]),window.__TAURI_MENU__.handlers[r].push(e)}var Z=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(Z||{});function K([r,e,n]){switch(n){case"Submenu":return new g(r,e);case"Predefined":return new D(r,e);case"Check":return new w(r,e);case"Icon":return new k(r,e);case"MenuItem":default:return new m(r,e)}}async function P(r,e){let n=null,i=null;return e&&("action"in e&&(n=e.action),"items"in e&&(i=e.items.map(u=>[u.rid,u.kind]))),t("plugin:menu|new",{kind:r,options:e?{...e,items:i}:void 0}).then(u=>(n&&Ve(u[1],n),u))}var T,O,R=class extends b{constructor(n,i,u){super(n);c(this,T,void 0);c(this,O,void 0);p(this,T,i),p(this,O,u)}get id(){return l(this,T)}get kind(){return l(this,O)}async close(){return t("plugin:resources|close",{rid:this.rid})}};T=new WeakMap,O=new WeakMap;var C=class extends R{constructor(e,n,i){super(e,n,i)}async append(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return t("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return t("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(i=>[i.rid,i.kind]),position:n})}async remove(e){return t("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return t("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(K)}async items(){return t("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(K))}async get(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?K(n):null)}async popup(e,n){return t("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},d=class extends C{constructor(e,n){super(e,n,"Menu")}static async new(e){return P("Menu",e).then(([n,i])=>new d(n,i))}static async default(){return t("plugin:menu|default").then(([e,n])=>new d(e,n))}async setAsAppMenu(){return t("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new d(e[0],e[1]):null)}async setAsWindowMenu(e){return t("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new d(n[0],n[1]):null)}},U=class extends R{async text(){return t("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return t("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},F=class extends U{async isEnabled(){return t("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return t("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},I=class extends F{async setAccelerator(e){return t("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},m=class extends I{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return P("MenuItem",e).then(([n,i])=>new m(n,i))}},g=class extends C{constructor(e,n){super(e,n,"Submenu")}static async new(e){return P("Submenu",e).then(([n,i])=>new g(n,i))}async setAsWindowsMenuForNSApp(){return t("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return t("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};J(g,F);var D=class extends U{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return P("MenuItem",e).then(([n,i])=>new m(n,i))}},w=class extends I{constructor(e,n){super(e,n,"Check")}static async new(e){return P("Check",e).then(([n,i])=>new w(n,i))}async isChecked(){return t("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return t("plugin:menu|set_checked",{rid:this.rid,checked:e})}},k=class extends I{constructor(e,n){super(e,n,"Icon")}static async new(e){return P("Icon",e).then(([n,i])=>new k(n,i))}async setIcon(e){return t("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return t("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};var Ge=t;return ne(Ke);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/menu/menu.rs b/core/tauri/src/menu/menu.rs index 094baf30356..12aae7dbfbc 100644 --- a/core/tauri/src/menu/menu.rs +++ b/core/tauri/src/menu/menu.rs @@ -90,7 +90,7 @@ impl ContextMenuBase for Menu { } fn inner_context_owned(&self) -> Box { - Box::new(self.clone().inner) + Box::new(self.inner.clone()) } } diff --git a/core/tauri/src/menu/mod.rs b/core/tauri/src/menu/mod.rs index af59df3d3d8..679fd1cfc08 100644 --- a/core/tauri/src/menu/mod.rs +++ b/core/tauri/src/menu/mod.rs @@ -23,14 +23,14 @@ pub use icon::IconMenuItem; pub use menu::{Menu, HELP_SUBMENU_ID, WINDOW_SUBMENU_ID}; pub use normal::MenuItem; pub use predefined::PredefinedMenuItem; -use serde::Deserialize; +use serde::{Deserialize, Serialize}; pub use submenu::Submenu; use crate::{AppHandle, Icon, Runtime}; pub use muda::MenuId; /// Describes a menu event emitted when a menu item is activated -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Serialize)] pub struct MenuEvent { /// Id of the menu item which triggered this event pub id: MenuId, diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index 67eb8dbfb79..5158064b6ea 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -4,12 +4,12 @@ use serde::{Deserialize, Serialize}; -use super::*; +use super::{sealed::ContextMenuBase, *}; use crate::{ command, plugin::{Builder, TauriPlugin}, resources::ResourceId, - AppHandle, IconDto, Manager, Runtime, + AppHandle, IconDto, Manager, RunEvent, Runtime, }; use tauri_macros::do_menu_item; @@ -101,7 +101,7 @@ fn new( let options = options.unwrap_or_default(); let mut resources_table = app.manager.resources_table(); - match kind { + let ret = match kind { ItemKind::Menu => { let mut builder = MenuBuilder::new(&app); if let Some(id) = options.id { @@ -214,7 +214,7 @@ fn new( } }; - Ok((0, "".into())) + ret.ok_or_else(|| anyhow::anyhow!("Unkown menu item kind").into()) } #[command(root = "crate")] @@ -420,19 +420,19 @@ fn popup( rid: ResourceId, kind: ItemKind, window: String, - position: (u32, u32), + position: Option<(u32, u32)>, ) -> crate::Result<()> { if let Some(window) = app.get_window(&window) { - let position = crate::Position::Logical(position.into()); + let position = position.map(|p| crate::Position::Logical(p.into())); let resources_table = app.manager.resources_table(); match kind { ItemKind::Menu => { let menu = resources_table.get::>(rid)?; - menu.popup_at(window, position)?; + menu.popup_inner(window, position)?; } ItemKind::Submenu => { let submenu = resources_table.get::>(rid)?; - submenu.popup_at(window, position)?; + submenu.popup_inner(window, position)?; } _ => unreachable!(), }; @@ -451,7 +451,7 @@ fn default(app: AppHandle) -> crate::Result<(ResourceId, MenuId)> } #[command(root = "crate")] -fn set_as_app_menu( +async fn set_as_app_menu( app: AppHandle, rid: ResourceId, ) -> crate::Result> { @@ -466,7 +466,7 @@ fn set_as_app_menu( } #[command(root = "crate")] -fn set_as_window_menu( +async fn set_as_window_menu( app: AppHandle, rid: ResourceId, window: String, @@ -602,6 +602,11 @@ fn set_native_icon( pub(crate) fn init() -> TauriPlugin { Builder::new("menu") + .on_event(|app, e| { + if let RunEvent::MenuEvent(e) = e { + let _ = app.emit_all("tauri://menu", e); + } + }) .invoke_handler(crate::generate_handler![ new, append, diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 55a91154d4b..a4067085b52 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -1312,12 +1312,13 @@ impl Window { /// - **macOS:** Unsupported. The menu on macOS is app-wide and not specific to one /// window, if you need to remove it, use [`AppHandle::remove_menu`] instead. pub fn remove_menu(&self) -> crate::Result>> { - let current_menu = self.menu_lock().as_ref().map(|m| m.menu.clone()); + let prev_menu = self.menu_lock().take().map(|m| m.menu); // remove from the window #[cfg_attr(target_os = "macos", allow(unused_variables))] - if let Some(menu) = current_menu { + if let Some(menu) = &prev_menu { let window = self.clone(); + let menu = menu.clone(); self.run_on_main_thread(move || { #[cfg(windows)] if let Ok(hwnd) = window.hwnd() { @@ -1336,8 +1337,6 @@ impl Window { })?; } - let prev_menu = self.menu_lock().take().map(|m| m.menu); - self .manager .remove_menu_from_stash_by_id(prev_menu.as_ref().map(|m| m.id())); diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index b574576f645..499e89af7e5 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -6,8 +6,7 @@ import { TauriEvent, listen } from './event' import { Resource, applyMixins } from './internal' import { invoke } from './tauri' -// TODO: menu builders -// TODO: events or callbacks +// TODO menu builders /** * Menu types and utilities. @@ -22,19 +21,21 @@ interface MenuEvent { declare global { interface Window { - __TAURI_MENU__: { - handlers?: { [key: string]: (() => void)[] } + __TAURI_MENU__?: { + handlers: { [key: string]: (() => void)[] } } } } async function addEventListener(id: string, handler: () => void) { - if (!window.__TAURI_MENU__.handlers) { - window.__TAURI_MENU__.handlers = {} + if (!window.__TAURI_MENU__) { + window.__TAURI_MENU__ = { handlers: {} } const unlisten = await listen( TauriEvent.MENU, (e) => { - const handlers = window.__TAURI_MENU__.handlers?.[e.payload.id] + console.log(e) + + const handlers = window.__TAURI_MENU__?.handlers[e.payload.id] if (handlers) { for (handler of handlers) { handler() @@ -200,6 +201,31 @@ function itemFromKind([rid, id, kind]: [number, string, ItemKind]): } } +async function newMenu(kind: ItemKind, opts?: any): Promise<[number, string]> { + let handler: null | (() => void) = null + let items: null | [number, string][] = null + if (opts) { + if ('action' in opts) { + handler = opts.action as () => void + } + + if ('items' in opts) { + // @ts-expect-error + items = opts.items.map((i) => [i.rid, i.kind]) + } + } + + return invoke<[number, string]>('plugin:menu|new', { + kind, + options: opts ? { ...opts, items } : undefined + }).then((ret) => { + if (handler) { + addEventListener(ret[1], handler) + } + return ret + }) +} + class MenuItemBase extends Resource { #id: string #kind: ItemKind @@ -218,25 +244,10 @@ class MenuItemBase extends Resource { this.#kind = kind } - protected static async _new( - kind: ItemKind, - opts?: unknown - ): Promise<[number, string]> { - let handler: null | (() => void) - // @ts-expect-error - if ('action' in opts) { - handler = opts.action as () => void - delete opts.action - } - - return invoke<[number, string]>('plugin:menu|new', { kind, opts }).then( - (ret) => { - if (handler) { - addEventListener(ret[1], handler) - } - return ret - } - ) + async close() { + return invoke('plugin:resources|close', { + rid: this.rid + }) } } @@ -257,8 +268,8 @@ class MenuBase extends MenuItemBase { rid: this.rid, kind: this.kind, items: (Array.isArray(items) ? items : [items]).map((i) => [ - i.kind, - i.rid + i.rid, + i.kind ]) }) } @@ -275,8 +286,8 @@ class MenuBase extends MenuItemBase { rid: this.rid, kind: this.kind, items: (Array.isArray(items) ? items : [items]).map((i) => [ - i.kind, - i.rid + i.rid, + i.kind ]) }) } @@ -293,8 +304,8 @@ class MenuBase extends MenuItemBase { rid: this.rid, kind: this.kind, items: (Array.isArray(items) ? items : [items]).map((i) => [ - i.kind, - i.rid + i.rid, + i.kind ]), position }) @@ -306,7 +317,7 @@ class MenuBase extends MenuItemBase { return invoke('plugin:menu|remove', { rid: this.rid, kind: this.kind, - item: [item.kind, item.rid] + item: [item.rid, item.kind] }) } @@ -353,7 +364,7 @@ class MenuBase extends MenuItemBase { }).then((r) => (r ? itemFromKind(r) : null)) } - // TODO: change to logical position + // TODO change to logical position // TODO use window type after migrating window back to core async popup(window: string, position?: [number, number]) { return invoke('plugin:menu|popup', { @@ -367,7 +378,7 @@ class MenuBase extends MenuItemBase { interface MenuOptions { id?: string - items: ( + items?: ( | Submenu | MenuItem | PredefinedMenuItem @@ -381,8 +392,8 @@ class Menu extends MenuBase { super(rid, id, 'Menu') } - static async new(opts: MenuOptions) { - return super._new('Menu', opts).then(([rid, id]) => new Menu(rid, id)) + static async new(opts?: MenuOptions) { + return newMenu('Menu', opts).then(([rid, id]) => new Menu(rid, id)) } static async default() { @@ -446,7 +457,7 @@ class MenuItemBase4 extends MenuItemBase3 { interface MenuItemOptions { id?: string - text?: string + text: string enabled?: boolean accelerator?: string action?: () => void @@ -457,10 +468,8 @@ class MenuItem extends MenuItemBase4 { super(rid, id, 'MenuItem') } - static async new(opts?: MenuItemOptions) { - return super - ._new('MenuItem', opts) - .then(([rid, id]) => new MenuItem(rid, id)) + static async new(opts: MenuItemOptions) { + return newMenu('MenuItem', opts).then(([rid, id]) => new MenuItem(rid, id)) } } @@ -473,8 +482,8 @@ class Submenu extends MenuBase { super(rid, id, 'Submenu') } - static async new(opts?: SubmenuOptions) { - return super._new('Submenu', opts).then(([rid, id]) => new Submenu(rid, id)) + static async new(opts: SubmenuOptions) { + return newMenu('Submenu', opts).then(([rid, id]) => new Submenu(rid, id)) } async setAsWindowsMenuForNSApp() { @@ -492,10 +501,8 @@ class Submenu extends MenuBase { applyMixins(Submenu, MenuItemBase3) -type PredefinedMenuItemOptions = Omit< - MenuItemOptions, - 'enabled' | 'accelerator' | 'id' | 'action' -> & { +type PredefinedMenuItemOptions = { + text?: string item: | 'Separator' | 'Copy' @@ -536,9 +543,7 @@ class PredefinedMenuItem extends MenuItemBase2 { } static async new(opts?: PredefinedMenuItemOptions) { - return super - ._new('MenuItem', opts) - .then(([rid, id]) => new MenuItem(rid, id)) + return newMenu('MenuItem', opts).then(([rid, id]) => new MenuItem(rid, id)) } } @@ -551,10 +556,10 @@ class CheckMenuItem extends MenuItemBase4 { super(rid, id, 'Check') } - static async new(opts?: MenuItemOptions) { - return super - ._new('Check', opts) - .then(([rid, id]) => new CheckMenuItem(rid, id)) + static async new(opts: MenuItemOptions) { + return newMenu('Check', opts).then( + ([rid, id]) => new CheckMenuItem(rid, id) + ) } async isChecked(): Promise { @@ -578,10 +583,8 @@ class IconMenuItem extends MenuItemBase4 { super(rid, id, 'Icon') } - static async new(opts?: IconMenuItemOptions) { - return super - ._new('Icon', opts) - .then(([rid, id]) => new IconMenuItem(rid, id)) + static async new(opts: IconMenuItemOptions) { + return newMenu('Icon', opts).then(([rid, id]) => new IconMenuItem(rid, id)) } async setIcon(icon: string | Uint8Array | null) { @@ -602,4 +605,12 @@ export type { CheckMenuItemOptions, IconMenuItemOptions } -export { NativeIcon, MenuItem, CheckMenuItem, IconMenuItem, Submenu, Menu } +export { + NativeIcon, + MenuItem, + CheckMenuItem, + PredefinedMenuItem, + IconMenuItem, + Submenu, + Menu +} From 2bd395e45e793baf397d355e192b5937e6221163 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 17:20:54 +0300 Subject: [PATCH 09/64] remove console.log --- core/tauri/scripts/bundle.global.js | 2 +- tooling/api/src/menu.ts | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 36e2ea2040b..0306aa20f49 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var h=(r,e)=>{for(var n in e)L(r,n,{get:e[n],enumerable:!0})},ee=(r,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of N(e))!B.call(r,u)&&u!==n&&L(r,u,{get:()=>e[u],enumerable:!(i=X(e,u))||i.enumerable});return r};var ne=r=>ee(L({},"__esModule",{value:!0}),r);var Q=(r,e,n)=>{if(!e.has(r))throw TypeError("Cannot "+n)};var l=(r,e,n)=>(Q(r,e,"read from private field"),n?n.call(r):e.get(r)),c=(r,e,n)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,n)},p=(r,e,n,i)=>(Q(r,e,"write to private field"),i?i.call(r,n):e.set(r,n),n);var Ke={};h(Ke,{event:()=>H,invoke:()=>Ge,menu:()=>j,path:()=>V,tauri:()=>W,tray:()=>G});var H={};h(H,{TauriEvent:()=>E,emit:()=>oe,listen:()=>f,once:()=>se});var W={};h(W,{Channel:()=>S,PluginListener:()=>v,addPluginListener:()=>te,convertFileSrc:()=>ie,invoke:()=>t,transformCallback:()=>_});function re(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function _(r,e=!1){let n=re(),i=`_${n}`;return Object.defineProperty(window,i,{value:u=>(e&&Reflect.deleteProperty(window,i),r?.(u)),writable:!1,configurable:!0}),n}var y,S=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;c(this,y,()=>{});this.id=_(e=>{l(this,y).call(this,e)})}set onmessage(e){p(this,y,e)}get onmessage(){return l(this,y)}toJSON(){return`__CHANNEL__:${this.id}`}};y=new WeakMap;var v=class{constructor(e,n,i){this.plugin=e,this.event=n,this.channelId=i}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function te(r,e,n){let i=new S;return i.onmessage=n,t(`plugin:${r}|register_listener`,{event:e,handler:i}).then(()=>new v(r,e,i.id))}async function t(r,e={},n){return new Promise((i,u)=>{let $=_(x=>{i(x),Reflect.deleteProperty(window,`_${z}`)},!0),z=_(x=>{u(x),Reflect.deleteProperty(window,`_${$}`)},!0);window.__TAURI_IPC__({cmd:r,callback:$,error:z,payload:e,options:n})})}function ie(r,e="asset"){return window.__TAURI__.convertFileSrc(r,e)}var E=(a=>(a.WINDOW_RESIZED="tauri://resize",a.WINDOW_MOVED="tauri://move",a.WINDOW_CLOSE_REQUESTED="tauri://close-requested",a.WINDOW_CREATED="tauri://window-created",a.WINDOW_DESTROYED="tauri://destroyed",a.WINDOW_FOCUS="tauri://focus",a.WINDOW_BLUR="tauri://blur",a.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",a.WINDOW_THEME_CHANGED="tauri://theme-changed",a.WINDOW_FILE_DROP="tauri://file-drop",a.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",a.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",a.MENU="tauri://menu",a.TRAY="tauri://tray",a))(E||{});async function Y(r,e){await t("plugin:event|unlisten",{event:r,eventId:e})}async function f(r,e,n){return t("plugin:event|listen",{event:r,windowLabel:n?.target,handler:_(e)}).then(i=>async()=>Y(r,i))}async function se(r,e,n){return f(r,i=>{e(i),Y(r,i.id).catch(()=>{})},n)}async function oe(r,e,n){await t("plugin:event|emit",{event:r,windowLabel:n?.target,payload:e})}var V={};h(V,{BaseDirectory:()=>q,appCacheDir:()=>de,appConfigDir:()=>ue,appDataDir:()=>ae,appLocalDataDir:()=>le,appLogDir:()=>ve,audioDir:()=>ce,basename:()=>We,cacheDir:()=>pe,configDir:()=>me,dataDir:()=>ge,delimiter:()=>Ce,desktopDir:()=>he,dirname:()=>xe,documentDir:()=>ye,downloadDir:()=>_e,executableDir:()=>fe,extname:()=>Le,fontDir:()=>be,homeDir:()=>we,isAbsolute:()=>He,join:()=>De,localDataDir:()=>ke,normalize:()=>Fe,pictureDir:()=>Pe,publicDir:()=>Me,resolve:()=>Ue,resolveResource:()=>Ie,resourceDir:()=>Ae,runtimeDir:()=>Te,sep:()=>Re,tempDir:()=>Ee,templateDir:()=>Oe,videoDir:()=>Se});var q=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(q||{});async function ue(){return t("plugin:path|resolve_directory",{directory:13})}async function ae(){return t("plugin:path|resolve_directory",{directory:14})}async function le(){return t("plugin:path|resolve_directory",{directory:15})}async function de(){return t("plugin:path|resolve_directory",{directory:16})}async function ce(){return t("plugin:path|resolve_directory",{directory:1})}async function pe(){return t("plugin:path|resolve_directory",{directory:2})}async function me(){return t("plugin:path|resolve_directory",{directory:3})}async function ge(){return t("plugin:path|resolve_directory",{directory:4})}async function he(){return t("plugin:path|resolve_directory",{directory:18})}async function ye(){return t("plugin:path|resolve_directory",{directory:6})}async function _e(){return t("plugin:path|resolve_directory",{directory:7})}async function fe(){return t("plugin:path|resolve_directory",{directory:19})}async function be(){return t("plugin:path|resolve_directory",{directory:20})}async function we(){return t("plugin:path|resolve_directory",{directory:21})}async function ke(){return t("plugin:path|resolve_directory",{directory:5})}async function Pe(){return t("plugin:path|resolve_directory",{directory:8})}async function Me(){return t("plugin:path|resolve_directory",{directory:9})}async function Ae(){return t("plugin:path|resolve_directory",{directory:11})}async function Ie(r){return t("plugin:path|resolve_directory",{directory:11,path:r})}async function Te(){return t("plugin:path|resolve_directory",{directory:22})}async function Oe(){return t("plugin:path|resolve_directory",{directory:23})}async function Se(){return t("plugin:path|resolve_directory",{directory:10})}async function ve(){return t("plugin:path|resolve_directory",{directory:17})}async function Ee(r){return t("plugin:path|resolve_directory",{directory:12})}function Re(){return window.__TAURI__.path.__sep}function Ce(){return window.__TAURI__.path.__delimiter}async function Ue(...r){return t("plugin:path|resolve",{paths:r})}async function Fe(r){return t("plugin:path|normalize",{path:r})}async function De(...r){return t("plugin:path|join",{paths:r})}async function xe(r){return t("plugin:path|dirname",{path:r})}async function Le(r){return t("plugin:path|extname",{path:r})}async function We(r,e){return t("plugin:path|basename",{path:r,ext:e})}async function He(r){return t("plugin:path|isAbsolute",{path:r})}var G={};h(G,{TrayIcon:()=>A});var M,b=class{constructor(e){c(this,M,void 0);p(this,M,e)}get rid(){return l(this,M)}async close(){return t("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function J(r,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{Object.defineProperty(r.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i)||Object.create(null))})})}var A=class extends b{constructor(n,i){super(n);this.id=i}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),t("plugin:tray|new",{options:n??{}}).then(([i,u])=>new A(i,u))}async setIcon(n){return t("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),t("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return t("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return t("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return t("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return t("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return t("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return t("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async on(n){return f("tauri://tray",i=>{i.payload.id==this.id&&n(i.payload)},{target:window.__TAURI_METADATA__.__currentWindow.label})}};var j={};h(j,{CheckMenuItem:()=>w,IconMenuItem:()=>k,Menu:()=>d,MenuItem:()=>m,NativeIcon:()=>Z,PredefinedMenuItem:()=>D,Submenu:()=>g});async function Ve(r,e){if(!window.__TAURI_MENU__){window.__TAURI_MENU__={handlers:{}};let n=await f("tauri://menu",i=>{console.log(i);let u=window.__TAURI_MENU__?.handlers[i.payload.id];if(u)for(e of u)e()},{target:window.__TAURI_METADATA__.__currentWindow.label});window.addEventListener("unload",()=>n())}window.__TAURI_MENU__.handlers[r]||(window.__TAURI_MENU__.handlers[r]=[]),window.__TAURI_MENU__.handlers[r].push(e)}var Z=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(Z||{});function K([r,e,n]){switch(n){case"Submenu":return new g(r,e);case"Predefined":return new D(r,e);case"Check":return new w(r,e);case"Icon":return new k(r,e);case"MenuItem":default:return new m(r,e)}}async function P(r,e){let n=null,i=null;return e&&("action"in e&&(n=e.action),"items"in e&&(i=e.items.map(u=>[u.rid,u.kind]))),t("plugin:menu|new",{kind:r,options:e?{...e,items:i}:void 0}).then(u=>(n&&Ve(u[1],n),u))}var T,O,R=class extends b{constructor(n,i,u){super(n);c(this,T,void 0);c(this,O,void 0);p(this,T,i),p(this,O,u)}get id(){return l(this,T)}get kind(){return l(this,O)}async close(){return t("plugin:resources|close",{rid:this.rid})}};T=new WeakMap,O=new WeakMap;var C=class extends R{constructor(e,n,i){super(e,n,i)}async append(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return t("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return t("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(i=>[i.rid,i.kind]),position:n})}async remove(e){return t("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return t("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(K)}async items(){return t("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(K))}async get(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?K(n):null)}async popup(e,n){return t("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},d=class extends C{constructor(e,n){super(e,n,"Menu")}static async new(e){return P("Menu",e).then(([n,i])=>new d(n,i))}static async default(){return t("plugin:menu|default").then(([e,n])=>new d(e,n))}async setAsAppMenu(){return t("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new d(e[0],e[1]):null)}async setAsWindowMenu(e){return t("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new d(n[0],n[1]):null)}},U=class extends R{async text(){return t("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return t("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},F=class extends U{async isEnabled(){return t("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return t("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},I=class extends F{async setAccelerator(e){return t("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},m=class extends I{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return P("MenuItem",e).then(([n,i])=>new m(n,i))}},g=class extends C{constructor(e,n){super(e,n,"Submenu")}static async new(e){return P("Submenu",e).then(([n,i])=>new g(n,i))}async setAsWindowsMenuForNSApp(){return t("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return t("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};J(g,F);var D=class extends U{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return P("MenuItem",e).then(([n,i])=>new m(n,i))}},w=class extends I{constructor(e,n){super(e,n,"Check")}static async new(e){return P("Check",e).then(([n,i])=>new w(n,i))}async isChecked(){return t("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return t("plugin:menu|set_checked",{rid:this.rid,checked:e})}},k=class extends I{constructor(e,n){super(e,n,"Icon")}static async new(e){return P("Icon",e).then(([n,i])=>new k(n,i))}async setIcon(e){return t("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return t("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};var Ge=t;return ne(Ke);})(); +"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var h=(r,e)=>{for(var n in e)L(r,n,{get:e[n],enumerable:!0})},ee=(r,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of N(e))!B.call(r,u)&&u!==n&&L(r,u,{get:()=>e[u],enumerable:!(s=X(e,u))||s.enumerable});return r};var ne=r=>ee(L({},"__esModule",{value:!0}),r);var Q=(r,e,n)=>{if(!e.has(r))throw TypeError("Cannot "+n)};var l=(r,e,n)=>(Q(r,e,"read from private field"),n?n.call(r):e.get(r)),c=(r,e,n)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,n)},p=(r,e,n,s)=>(Q(r,e,"write to private field"),s?s.call(r,n):e.set(r,n),n);var Ke={};h(Ke,{event:()=>H,invoke:()=>Ge,menu:()=>j,path:()=>V,tauri:()=>W,tray:()=>G});var H={};h(H,{TauriEvent:()=>E,emit:()=>oe,listen:()=>f,once:()=>se});var W={};h(W,{Channel:()=>S,PluginListener:()=>v,addPluginListener:()=>te,convertFileSrc:()=>ie,invoke:()=>t,transformCallback:()=>_});function re(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function _(r,e=!1){let n=re(),s=`_${n}`;return Object.defineProperty(window,s,{value:u=>(e&&Reflect.deleteProperty(window,s),r?.(u)),writable:!1,configurable:!0}),n}var y,S=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;c(this,y,()=>{});this.id=_(e=>{l(this,y).call(this,e)})}set onmessage(e){p(this,y,e)}get onmessage(){return l(this,y)}toJSON(){return`__CHANNEL__:${this.id}`}};y=new WeakMap;var v=class{constructor(e,n,s){this.plugin=e,this.event=n,this.channelId=s}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function te(r,e,n){let s=new S;return s.onmessage=n,t(`plugin:${r}|register_listener`,{event:e,handler:s}).then(()=>new v(r,e,s.id))}async function t(r,e={},n){return new Promise((s,u)=>{let $=_(x=>{s(x),Reflect.deleteProperty(window,`_${z}`)},!0),z=_(x=>{u(x),Reflect.deleteProperty(window,`_${$}`)},!0);window.__TAURI_IPC__({cmd:r,callback:$,error:z,payload:e,options:n})})}function ie(r,e="asset"){return window.__TAURI__.convertFileSrc(r,e)}var E=(a=>(a.WINDOW_RESIZED="tauri://resize",a.WINDOW_MOVED="tauri://move",a.WINDOW_CLOSE_REQUESTED="tauri://close-requested",a.WINDOW_CREATED="tauri://window-created",a.WINDOW_DESTROYED="tauri://destroyed",a.WINDOW_FOCUS="tauri://focus",a.WINDOW_BLUR="tauri://blur",a.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",a.WINDOW_THEME_CHANGED="tauri://theme-changed",a.WINDOW_FILE_DROP="tauri://file-drop",a.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",a.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",a.MENU="tauri://menu",a.TRAY="tauri://tray",a))(E||{});async function Y(r,e){await t("plugin:event|unlisten",{event:r,eventId:e})}async function f(r,e,n){return t("plugin:event|listen",{event:r,windowLabel:n?.target,handler:_(e)}).then(s=>async()=>Y(r,s))}async function se(r,e,n){return f(r,s=>{e(s),Y(r,s.id).catch(()=>{})},n)}async function oe(r,e,n){await t("plugin:event|emit",{event:r,windowLabel:n?.target,payload:e})}var V={};h(V,{BaseDirectory:()=>q,appCacheDir:()=>de,appConfigDir:()=>ue,appDataDir:()=>ae,appLocalDataDir:()=>le,appLogDir:()=>ve,audioDir:()=>ce,basename:()=>We,cacheDir:()=>pe,configDir:()=>me,dataDir:()=>ge,delimiter:()=>Ce,desktopDir:()=>he,dirname:()=>xe,documentDir:()=>ye,downloadDir:()=>_e,executableDir:()=>fe,extname:()=>Le,fontDir:()=>be,homeDir:()=>we,isAbsolute:()=>He,join:()=>De,localDataDir:()=>ke,normalize:()=>Fe,pictureDir:()=>Pe,publicDir:()=>Me,resolve:()=>Ue,resolveResource:()=>Ie,resourceDir:()=>Ae,runtimeDir:()=>Te,sep:()=>Re,tempDir:()=>Ee,templateDir:()=>Oe,videoDir:()=>Se});var q=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(q||{});async function ue(){return t("plugin:path|resolve_directory",{directory:13})}async function ae(){return t("plugin:path|resolve_directory",{directory:14})}async function le(){return t("plugin:path|resolve_directory",{directory:15})}async function de(){return t("plugin:path|resolve_directory",{directory:16})}async function ce(){return t("plugin:path|resolve_directory",{directory:1})}async function pe(){return t("plugin:path|resolve_directory",{directory:2})}async function me(){return t("plugin:path|resolve_directory",{directory:3})}async function ge(){return t("plugin:path|resolve_directory",{directory:4})}async function he(){return t("plugin:path|resolve_directory",{directory:18})}async function ye(){return t("plugin:path|resolve_directory",{directory:6})}async function _e(){return t("plugin:path|resolve_directory",{directory:7})}async function fe(){return t("plugin:path|resolve_directory",{directory:19})}async function be(){return t("plugin:path|resolve_directory",{directory:20})}async function we(){return t("plugin:path|resolve_directory",{directory:21})}async function ke(){return t("plugin:path|resolve_directory",{directory:5})}async function Pe(){return t("plugin:path|resolve_directory",{directory:8})}async function Me(){return t("plugin:path|resolve_directory",{directory:9})}async function Ae(){return t("plugin:path|resolve_directory",{directory:11})}async function Ie(r){return t("plugin:path|resolve_directory",{directory:11,path:r})}async function Te(){return t("plugin:path|resolve_directory",{directory:22})}async function Oe(){return t("plugin:path|resolve_directory",{directory:23})}async function Se(){return t("plugin:path|resolve_directory",{directory:10})}async function ve(){return t("plugin:path|resolve_directory",{directory:17})}async function Ee(r){return t("plugin:path|resolve_directory",{directory:12})}function Re(){return window.__TAURI__.path.__sep}function Ce(){return window.__TAURI__.path.__delimiter}async function Ue(...r){return t("plugin:path|resolve",{paths:r})}async function Fe(r){return t("plugin:path|normalize",{path:r})}async function De(...r){return t("plugin:path|join",{paths:r})}async function xe(r){return t("plugin:path|dirname",{path:r})}async function Le(r){return t("plugin:path|extname",{path:r})}async function We(r,e){return t("plugin:path|basename",{path:r,ext:e})}async function He(r){return t("plugin:path|isAbsolute",{path:r})}var G={};h(G,{TrayIcon:()=>A});var M,b=class{constructor(e){c(this,M,void 0);p(this,M,e)}get rid(){return l(this,M)}async close(){return t("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function J(r,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(s=>{Object.defineProperty(r.prototype,s,Object.getOwnPropertyDescriptor(n.prototype,s)||Object.create(null))})})}var A=class extends b{constructor(n,s){super(n);this.id=s}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),t("plugin:tray|new",{options:n??{}}).then(([s,u])=>new A(s,u))}async setIcon(n){return t("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),t("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return t("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return t("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return t("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return t("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return t("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return t("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async on(n){return f("tauri://tray",s=>{s.payload.id==this.id&&n(s.payload)},{target:window.__TAURI_METADATA__.__currentWindow.label})}};var j={};h(j,{CheckMenuItem:()=>w,IconMenuItem:()=>k,Menu:()=>d,MenuItem:()=>m,NativeIcon:()=>Z,PredefinedMenuItem:()=>D,Submenu:()=>g});async function Ve(r,e){if(!window.__TAURI_MENU__){window.__TAURI_MENU__={handlers:{}};let n=await f("tauri://menu",s=>{let u=window.__TAURI_MENU__?.handlers[s.payload.id];if(u)for(e of u)e()},{target:window.__TAURI_METADATA__.__currentWindow.label});window.addEventListener("unload",()=>n())}window.__TAURI_MENU__.handlers[r]||(window.__TAURI_MENU__.handlers[r]=[]),window.__TAURI_MENU__.handlers[r].push(e)}var Z=(i=>(i.Add="Add",i.Advanced="Advanced",i.Bluetooth="Bluetooth",i.Bookmarks="Bookmarks",i.Caution="Caution",i.ColorPanel="ColorPanel",i.ColumnView="ColumnView",i.Computer="Computer",i.EnterFullScreen="EnterFullScreen",i.Everyone="Everyone",i.ExitFullScreen="ExitFullScreen",i.FlowView="FlowView",i.Folder="Folder",i.FolderBurnable="FolderBurnable",i.FolderSmart="FolderSmart",i.FollowLinkFreestanding="FollowLinkFreestanding",i.FontPanel="FontPanel",i.GoLeft="GoLeft",i.GoRight="GoRight",i.Home="Home",i.IChatTheater="IChatTheater",i.IconView="IconView",i.Info="Info",i.InvalidDataFreestanding="InvalidDataFreestanding",i.LeftFacingTriangle="LeftFacingTriangle",i.ListView="ListView",i.LockLocked="LockLocked",i.LockUnlocked="LockUnlocked",i.MenuMixedState="MenuMixedState",i.MenuOnState="MenuOnState",i.MobileMe="MobileMe",i.MultipleDocuments="MultipleDocuments",i.Network="Network",i.Path="Path",i.PreferencesGeneral="PreferencesGeneral",i.QuickLook="QuickLook",i.RefreshFreestanding="RefreshFreestanding",i.Refresh="Refresh",i.Remove="Remove",i.RevealFreestanding="RevealFreestanding",i.RightFacingTriangle="RightFacingTriangle",i.Share="Share",i.Slideshow="Slideshow",i.SmartBadge="SmartBadge",i.StatusAvailable="StatusAvailable",i.StatusNone="StatusNone",i.StatusPartiallyAvailable="StatusPartiallyAvailable",i.StatusUnavailable="StatusUnavailable",i.StopProgressFreestanding="StopProgressFreestanding",i.StopProgress="StopProgress",i.TrashEmpty="TrashEmpty",i.TrashFull="TrashFull",i.User="User",i.UserAccounts="UserAccounts",i.UserGroup="UserGroup",i.UserGuest="UserGuest",i))(Z||{});function K([r,e,n]){switch(n){case"Submenu":return new g(r,e);case"Predefined":return new D(r,e);case"Check":return new w(r,e);case"Icon":return new k(r,e);case"MenuItem":default:return new m(r,e)}}async function P(r,e){let n=null,s=null;return e&&("action"in e&&(n=e.action),"items"in e&&(s=e.items.map(u=>[u.rid,u.kind]))),t("plugin:menu|new",{kind:r,options:e?{...e,items:s}:void 0}).then(u=>(n&&Ve(u[1],n),u))}var T,O,R=class extends b{constructor(n,s,u){super(n);c(this,T,void 0);c(this,O,void 0);p(this,T,s),p(this,O,u)}get id(){return l(this,T)}get kind(){return l(this,O)}async close(){return t("plugin:resources|close",{rid:this.rid})}};T=new WeakMap,O=new WeakMap;var C=class extends R{constructor(e,n,s){super(e,n,s)}async append(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return t("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return t("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(s=>[s.rid,s.kind]),position:n})}async remove(e){return t("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return t("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(K)}async items(){return t("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(K))}async get(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?K(n):null)}async popup(e,n){return t("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},d=class extends C{constructor(e,n){super(e,n,"Menu")}static async new(e){return P("Menu",e).then(([n,s])=>new d(n,s))}static async default(){return t("plugin:menu|default").then(([e,n])=>new d(e,n))}async setAsAppMenu(){return t("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new d(e[0],e[1]):null)}async setAsWindowMenu(e){return t("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new d(n[0],n[1]):null)}},U=class extends R{async text(){return t("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return t("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},F=class extends U{async isEnabled(){return t("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return t("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},I=class extends F{async setAccelerator(e){return t("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},m=class extends I{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return P("MenuItem",e).then(([n,s])=>new m(n,s))}},g=class extends C{constructor(e,n){super(e,n,"Submenu")}static async new(e){return P("Submenu",e).then(([n,s])=>new g(n,s))}async setAsWindowsMenuForNSApp(){return t("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return t("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};J(g,F);var D=class extends U{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return P("MenuItem",e).then(([n,s])=>new m(n,s))}},w=class extends I{constructor(e,n){super(e,n,"Check")}static async new(e){return P("Check",e).then(([n,s])=>new w(n,s))}async isChecked(){return t("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return t("plugin:menu|set_checked",{rid:this.rid,checked:e})}},k=class extends I{constructor(e,n){super(e,n,"Icon")}static async new(e){return P("Icon",e).then(([n,s])=>new k(n,s))}async setIcon(e){return t("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return t("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};var Ge=t;return ne(Ke);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 499e89af7e5..a830aab45bb 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -33,8 +33,6 @@ async function addEventListener(id: string, handler: () => void) { const unlisten = await listen( TauriEvent.MENU, (e) => { - console.log(e) - const handlers = window.__TAURI_MENU__?.handlers[e.payload.id] if (handlers) { for (handler of handlers) { From cff777db642a6ae1396bc6c72a6155b2459177ba Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 18:10:11 +0300 Subject: [PATCH 10/64] lint and clippy --- core/tauri-macros/src/menu.rs | 4 ++ core/tauri-runtime-wry/src/lib.rs | 19 +++--- core/tauri/Cargo.toml | 4 +- core/tauri/src/lib.rs | 1 + core/tauri/src/menu/plugin.rs | 3 +- core/tauri/src/resources/plugin.rs | 4 ++ examples/api/src/vite-env.d.ts | 4 ++ examples/api/svelte.config.js | 6 +- tooling/api/src/internal/index.ts | 16 +++-- tooling/api/src/menu.ts | 96 +++++++++++++++--------------- tooling/api/src/tray.ts | 23 ++++--- 11 files changed, 103 insertions(+), 77 deletions(-) diff --git a/core/tauri-macros/src/menu.rs b/core/tauri-macros/src/menu.rs index 7e93da475bb..4f947b83d87 100644 --- a/core/tauri-macros/src/menu.rs +++ b/core/tauri-macros/src/menu.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use proc_macro2::{Ident, Span, TokenStream}; use quote::quote; use syn::{ diff --git a/core/tauri-runtime-wry/src/lib.rs b/core/tauri-runtime-wry/src/lib.rs index f19c7435af2..2e9752c9e68 100644 --- a/core/tauri-runtime-wry/src/lib.rs +++ b/core/tauri-runtime-wry/src/lib.rs @@ -94,6 +94,7 @@ use std::{ fmt, ops::Deref, path::PathBuf, + rc::Rc, sync::{ mpsc::{channel, Sender}, Arc, Mutex, Weak, @@ -227,7 +228,7 @@ impl Context { pub struct DispatcherMainThreadContext { pub window_target: EventLoopWindowTarget>, pub web_context: WebContextStore, - pub windows: Arc>>, + pub windows: Rc>>, } impl std::fmt::Debug for DispatcherMainThreadContext { @@ -1544,7 +1545,7 @@ impl Dispatch for WryDispatcher { #[derive(Clone)] enum WindowHandle { Webview { - inner: Arc, + inner: Rc, context_store: WebContextStore, // the key of the WebContext if it's not shared context_key: Option, @@ -1560,7 +1561,7 @@ impl Drop for WindowHandle { context_key, } = self { - if Arc::get_mut(inner).is_some() { + if Rc::get_mut(inner).is_some() { context_store.lock().unwrap().remove(context_key); } } @@ -1816,7 +1817,7 @@ impl Wry { let main_thread_id = current_thread().id(); let web_context = WebContextStore::default(); - let windows = Arc::new(RefCell::new(HashMap::default())); + let windows = Rc::new(RefCell::new(HashMap::default())); let webview_id_map = WebviewIdStore::default(); let context = Context { @@ -2056,11 +2057,11 @@ impl Runtime for Wry { pub struct EventLoopIterationContext<'a, T: UserEvent> { pub callback: &'a mut (dyn FnMut(RunEvent) + 'static), pub webview_id_map: WebviewIdStore, - pub windows: Arc>>, + pub windows: Rc>>, } struct UserMessageContext { - windows: Arc>>, + windows: Rc>>, webview_id_map: WebviewIdStore, } @@ -2529,7 +2530,7 @@ fn handle_event_loop( fn on_close_requested<'a, T: UserEvent>( callback: &'a mut (dyn FnMut(RunEvent) + 'static), window_id: WebviewId, - windows: Arc>>, + windows: Rc>>, ) { let (tx, rx) = channel(); let windows_ref = windows.borrow(); @@ -2557,7 +2558,7 @@ fn on_close_requested<'a, T: UserEvent>( } } -fn on_window_close(window_id: WebviewId, windows: Arc>>) { +fn on_window_close(window_id: WebviewId, windows: Rc>>) { if let Some(window_wrapper) = windows.borrow_mut().get_mut(&window_id) { window_wrapper.inner = None; } @@ -2803,7 +2804,7 @@ fn create_webview( Ok(WindowWrapper { label, inner: Some(WindowHandle::Webview { - inner: Arc::new(webview), + inner: Rc::new(webview), context_store: web_context_store.clone(), context_key: if automation_enabled { None diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index e1710215141..95cfe0f81fe 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -69,8 +69,8 @@ png = { version = "0.17", optional = true } ico = { version = "0.3.0", optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies] -muda = { version = "0.8", default-features = false, features = [ "serde" ]} -tray-icon = { version = "0.8", default-features = false, features = [ "serde" ], optional = true } +muda = { path = "../../../muda", default-features = false, features = [ "serde" ]} +tray-icon = { path = "../../../tray-icon", default-features = false, features = [ "serde" ], optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] gtk = { version = "0.16", features = [ "v3_24" ] } diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 513b3d34c98..7f507b5ad3c 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -954,6 +954,7 @@ macro_rules! run_main_thread { let (tx, rx) = channel(); let self_ = $self.clone(); let task = move || { + #[allow(clippy::redundant_closure_call)] let _ = tx.send($ex(self_)); }; $self.app_handle.run_on_main_thread(Box::new(task))?; diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index 5158064b6ea..fb798756ecc 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -56,6 +56,7 @@ impl From for super::AboutMetadata { } } +#[allow(clippy::large_enum_variant)] #[derive(Deserialize)] enum Predefined { Separator, @@ -202,7 +203,7 @@ fn new( builder = builder.enabled(enabled); } if let Some(native_icon) = options.native_icon { - builder = builder.native_icon(native_icon.into()); + builder = builder.native_icon(native_icon); } if let Some(icon) = options.icon { builder = builder.icon(icon.into()); diff --git a/core/tauri/src/resources/plugin.rs b/core/tauri/src/resources/plugin.rs index 3103034b0d5..1b8932e2197 100644 --- a/core/tauri/src/resources/plugin.rs +++ b/core/tauri/src/resources/plugin.rs @@ -1,3 +1,7 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + use crate::{ command, plugin::{Builder, TauriPlugin}, diff --git a/examples/api/src/vite-env.d.ts b/examples/api/src/vite-env.d.ts index 4078e7476a2..c4b24aee8df 100644 --- a/examples/api/src/vite-env.d.ts +++ b/examples/api/src/vite-env.d.ts @@ -1,2 +1,6 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + /// /// diff --git a/examples/api/svelte.config.js b/examples/api/svelte.config.js index b0683fd24d7..15df6c2154c 100644 --- a/examples/api/svelte.config.js +++ b/examples/api/svelte.config.js @@ -1,7 +1,11 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' export default { // Consult https://svelte.dev/docs#compile-time-svelte-preprocess // for more information about preprocessors - preprocess: vitePreprocess(), + preprocess: vitePreprocess() } diff --git a/tooling/api/src/internal/index.ts b/tooling/api/src/internal/index.ts index cdb967d6645..d0639fc1a03 100644 --- a/tooling/api/src/internal/index.ts +++ b/tooling/api/src/internal/index.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { invoke } from '../tauri' /** @@ -22,7 +26,7 @@ export class Resource { * Destroys and cleans up this resource from memory. * **You should not call any method on this object anymore and should drop any reference to it.** */ - async close() { + async close(): Promise { return invoke('plugin:resources|close', { rid: this.rid }) @@ -30,16 +34,20 @@ export class Resource { } /** Extends a base class by other specifed classes */ -export function applyMixins(baseClass: any, extendedClasses: any | any[]) { +export function applyMixins( + baseClass: { prototype: any }, + extendedClasses: any | any[] +): void { ;(Array.isArray(extendedClasses) ? extendedClasses : [extendedClasses] - ).forEach((extendedClass) => { + ).forEach((extendedClass: { prototype: any }) => { Object.getOwnPropertyNames(extendedClass.prototype).forEach((name) => { Object.defineProperty( baseClass.prototype, name, - Object.getOwnPropertyDescriptor(extendedClass.prototype, name) || + // eslint-disable-next-line + Object.getOwnPropertyDescriptor(extendedClass.prototype, name) ?? Object.create(null) ) }) diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index a830aab45bb..6ca2cce7404 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -22,12 +22,15 @@ interface MenuEvent { declare global { interface Window { __TAURI_MENU__?: { - handlers: { [key: string]: (() => void)[] } + handlers: Record void>> } } } -async function addEventListener(id: string, handler: () => void) { +async function addEventListener( + id: string, + handler: () => void +): Promise { if (!window.__TAURI_MENU__) { window.__TAURI_MENU__ = { handlers: {} } const unlisten = await listen( @@ -45,13 +48,16 @@ async function addEventListener(id: string, handler: () => void) { } ) - window.addEventListener('unload', () => unlisten()) + window.addEventListener('unload', unlisten) } + // eslint-disable-next-line if (!window.__TAURI_MENU__.handlers[id]) { + // eslint-disable-next-line window.__TAURI_MENU__.handlers[id] = [] } + // eslint-disable-next-line window.__TAURI_MENU__.handlers[id].push(handler) } @@ -201,14 +207,16 @@ function itemFromKind([rid, id, kind]: [number, string, ItemKind]): async function newMenu(kind: ItemKind, opts?: any): Promise<[number, string]> { let handler: null | (() => void) = null - let items: null | [number, string][] = null + let items: null | Array<[number, string]> = null if (opts) { if ('action' in opts) { - handler = opts.action as () => void + // eslint-disable-next-line + handler = opts.action } if ('items' in opts) { - // @ts-expect-error + // @ts-expect-error items should all have rid and kind accessors + // eslint-disable-next-line items = opts.items.map((i) => [i.rid, i.kind]) } } @@ -218,7 +226,7 @@ async function newMenu(kind: ItemKind, opts?: any): Promise<[number, string]> { options: opts ? { ...opts, items } : undefined }).then((ret) => { if (handler) { - addEventListener(ret[1], handler) + void addEventListener(ret[1], handler) } return ret }) @@ -241,19 +249,9 @@ class MenuItemBase extends Resource { this.#id = id this.#kind = kind } - - async close() { - return invoke('plugin:resources|close', { - rid: this.rid - }) - } } class MenuBase extends MenuItemBase { - constructor(rid: number, id: string, kind: ItemKind) { - super(rid, id, kind) - } - async append< T extends | Submenu @@ -261,7 +259,7 @@ class MenuBase extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - >(items: T | T[]) { + >(items: T | T[]): Promise { return invoke('plugin:menu|append', { rid: this.rid, kind: this.kind, @@ -279,7 +277,7 @@ class MenuBase extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - >(items: T | T[]) { + >(items: T | T[]): Promise { return invoke('plugin:menu|prepend', { rid: this.rid, kind: this.kind, @@ -297,7 +295,7 @@ class MenuBase extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - >(items: T | T[], position: number) { + >(items: T | T[], position: number): Promise { return invoke('plugin:menu|insert', { rid: this.rid, kind: this.kind, @@ -311,7 +309,7 @@ class MenuBase extends MenuItemBase { async remove( item: Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem - ) { + ): Promise { return invoke('plugin:menu|remove', { rid: this.rid, kind: this.kind, @@ -337,9 +335,11 @@ class MenuBase extends MenuItemBase { } async items(): Promise< - (Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem)[] + Array< + Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem + > > { - return invoke<[number, string, ItemKind][]>('plugin:menu|append', { + return invoke>('plugin:menu|append', { rid: this.rid, kind: this.kind }).then((i) => i.map(itemFromKind)) @@ -364,7 +364,7 @@ class MenuBase extends MenuItemBase { // TODO change to logical position // TODO use window type after migrating window back to core - async popup(window: string, position?: [number, number]) { + async popup(window: string, position?: [number, number]): Promise { return invoke('plugin:menu|popup', { rid: this.rid, kind: this.kind, @@ -376,13 +376,9 @@ class MenuBase extends MenuItemBase { interface MenuOptions { id?: string - items?: ( - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem - )[] + items?: Array< + Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem + > } class Menu extends MenuBase { @@ -390,11 +386,11 @@ class Menu extends MenuBase { super(rid, id, 'Menu') } - static async new(opts?: MenuOptions) { + static async new(opts?: MenuOptions): Promise { return newMenu('Menu', opts).then(([rid, id]) => new Menu(rid, id)) } - static async default() { + static async default(): Promise { return invoke<[number, string]>('plugin:menu|default').then( ([rid, id]) => new Menu(rid, id) ) @@ -420,7 +416,7 @@ class MenuItemBase2 extends MenuItemBase { return invoke('plugin:menu|text', { rid: this.rid, kind: this.kind }) } - async setText(text: string) { + async setText(text: string): Promise { return invoke('plugin:menu|set_text', { rid: this.rid, kind: this.kind, @@ -434,7 +430,7 @@ class MenuItemBase3 extends MenuItemBase2 { return invoke('plugin:menu|is_enabled', { rid: this.rid, kind: this.kind }) } - async setEnabled(enabled: boolean) { + async setEnabled(enabled: boolean): Promise { return invoke('plugin:menu|set_enabled', { rid: this.rid, kind: this.kind, @@ -444,7 +440,7 @@ class MenuItemBase3 extends MenuItemBase2 { } class MenuItemBase4 extends MenuItemBase3 { - async setAccelerator(accelerator: string | null) { + async setAccelerator(accelerator: string | null): Promise { return invoke('plugin:menu|set_accelerator', { rid: this.rid, kind: this.kind, @@ -466,7 +462,7 @@ class MenuItem extends MenuItemBase4 { super(rid, id, 'MenuItem') } - static async new(opts: MenuItemOptions) { + static async new(opts: MenuItemOptions): Promise { return newMenu('MenuItem', opts).then(([rid, id]) => new MenuItem(rid, id)) } } @@ -480,17 +476,17 @@ class Submenu extends MenuBase { super(rid, id, 'Submenu') } - static async new(opts: SubmenuOptions) { + static async new(opts: SubmenuOptions): Promise { return newMenu('Submenu', opts).then(([rid, id]) => new Submenu(rid, id)) } - async setAsWindowsMenuForNSApp() { + async setAsWindowsMenuForNSApp(): Promise { return invoke('plugin:menu|set_as_windows_menu_for_nsapp', { rid: this.rid }) } - async setAsHelpMenuForNSApp() { + async setAsHelpMenuForNSApp(): Promise { return invoke('plugin:menu|set_as_help_menu_for_nsapp', { rid: this.rid }) @@ -499,7 +495,7 @@ class Submenu extends MenuBase { applyMixins(Submenu, MenuItemBase3) -type PredefinedMenuItemOptions = { +interface PredefinedMenuItemOptions { text?: string item: | 'Separator' @@ -540,8 +536,12 @@ class PredefinedMenuItem extends MenuItemBase2 { super(rid, id, 'MenuItem') } - static async new(opts?: PredefinedMenuItemOptions) { - return newMenu('MenuItem', opts).then(([rid, id]) => new MenuItem(rid, id)) + static async new( + opts?: PredefinedMenuItemOptions + ): Promise { + return newMenu('MenuItem', opts).then( + ([rid, id]) => new PredefinedMenuItem(rid, id) + ) } } @@ -554,7 +554,7 @@ class CheckMenuItem extends MenuItemBase4 { super(rid, id, 'Check') } - static async new(opts: MenuItemOptions) { + static async new(opts: MenuItemOptions): Promise { return newMenu('Check', opts).then( ([rid, id]) => new CheckMenuItem(rid, id) ) @@ -564,7 +564,7 @@ class CheckMenuItem extends MenuItemBase4 { return invoke('plugin:menu|is_checked', { rid: this.rid }) } - async setChecked(checked: boolean) { + async setChecked(checked: boolean): Promise { return invoke('plugin:menu|set_checked', { rid: this.rid, checked @@ -581,15 +581,15 @@ class IconMenuItem extends MenuItemBase4 { super(rid, id, 'Icon') } - static async new(opts: IconMenuItemOptions) { + static async new(opts: IconMenuItemOptions): Promise { return newMenu('Icon', opts).then(([rid, id]) => new IconMenuItem(rid, id)) } - async setIcon(icon: string | Uint8Array | null) { + async setIcon(icon: string | Uint8Array | null): Promise { return invoke('plugin:menu|set_icon', { rid: this.rid, icon }) } - async setNativeIcon(icon: NativeIcon | null) { + async setNativeIcon(icon: NativeIcon | null): Promise { return invoke('plugin:menu|set_native_icon', { rid: this.rid, icon }) } } diff --git a/tooling/api/src/tray.ts b/tooling/api/src/tray.ts index 0b86d1fc5ab..1f354690820 100644 --- a/tooling/api/src/tray.ts +++ b/tooling/api/src/tray.ts @@ -2,10 +2,9 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -import { Menu } from './menu' -import { TauriEvent, UnlistenFn, listen } from './event' +import type { Menu, Submenu } from './menu' +import { TauriEvent, listen, type UnlistenFn } from './event' import { Resource } from './internal' -import { Submenu } from './menu' import { invoke } from './tauri' /** @@ -138,7 +137,7 @@ export class TrayIcon extends Resource { } /** Sets a new tray icon. If `null` is provided, it will remove the icon. */ - async setIcon(icon: string | Uint8Array | null) { + async setIcon(icon: string | Uint8Array | null): Promise { return invoke('plugin:tray|set_icon', { rid: this.rid, icon }) } @@ -149,7 +148,7 @@ export class TrayIcon extends Resource { * * - **Linux**: once a menu is set it cannot be removed so `null` has no effect */ - async setMenu(menu: Menu | Submenu | null) { + async setMenu(menu: Menu | Submenu | null): Promise { if (menu) { // @ts-expect-error we only need the rid and kind menu = [menu.rid, menu.kind] @@ -164,7 +163,7 @@ export class TrayIcon extends Resource { * * - **Linux:** Unsupported */ - async setTooltip(tooltip: string | null) { + async setTooltip(tooltip: string | null): Promise { return invoke('plugin:tray|set_tooltip', { rid: this.rid, tooltip }) } @@ -180,12 +179,12 @@ export class TrayIcon extends Resource { * on the user's panel. This may not be shown in all visualizations. * - **Windows:** Unsupported */ - async setTitle(title: string | null) { + async setTitle(title: string | null): Promise { return invoke('plugin:tray|set_title', { rid: this.rid, title }) } /** Show or hide this tray icon. */ - async setVisible(visible: boolean) { + async setVisible(visible: boolean): Promise { return invoke('plugin:tray|set_visible', { rid: this.rid, visible }) } @@ -195,12 +194,12 @@ export class TrayIcon extends Resource { * On Linux, we need to write the icon to the disk and usually it will * be `$XDG_RUNTIME_DIR/tray-icon` or `$TEMP/tray-icon`. */ - async setTempDirPath(path: string | null) { + async setTempDirPath(path: string | null): Promise { return invoke('plugin:tray|set_temp_dir_path', { rid: this.rid, path }) } /** Sets the current icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only** */ - async setIconAsTemplate(asTemplate: boolean) { + async setIconAsTemplate(asTemplate: boolean): Promise { return invoke('plugin:tray|set_icon_as_template', { rid: this.rid, asTemplate @@ -208,7 +207,7 @@ export class TrayIcon extends Resource { } /** Disable or enable showing the tray menu on left click. **macOS only**. */ - async setMenuOnLeftClick(onLeft: boolean) { + async setMenuOnLeftClick(onLeft: boolean): Promise { return invoke('plugin:tray|set_show_menu_on_left_click', { rid: this.rid, onLeft @@ -240,7 +239,7 @@ export class TrayIcon extends Resource { return listen( TauriEvent.TRAY, (e) => { - if (e.payload.id == this.id) { + if (e.payload.id === this.id) { handler(e.payload) } }, From d24a48a1f5afd353a14098175ef08f9f9a22da44 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 18:44:10 +0300 Subject: [PATCH 11/64] docs --- core/tauri/src/menu/check.rs | 4 +- core/tauri/src/menu/icon.rs | 3 +- tooling/api/src/menu.ts | 228 ++++++++++++++++++++++++++++++++--- 3 files changed, 217 insertions(+), 18 deletions(-) diff --git a/core/tauri/src/menu/check.rs b/core/tauri/src/menu/check.rs index 7898214f72c..97fa639601e 100644 --- a/core/tauri/src/menu/check.rs +++ b/core/tauri/src/menu/check.rs @@ -4,7 +4,9 @@ use crate::{menu::MenuId, resources::Resource, run_main_thread, AppHandle, Manager, Runtime}; -/// A menu item inside a [`Menu`] or [`Submenu`] and contains only text. +/// A menu item inside a [`Menu`] or [`Submenu`] +/// and usually contains a text and a check mark or a similar toggle +/// that corresponds to a checked and unchecked states. /// /// [`Menu`]: super::Menu /// [`Submenu`]: super::Submenu diff --git a/core/tauri/src/menu/icon.rs b/core/tauri/src/menu/icon.rs index 82ceec09e88..e2dd547e095 100644 --- a/core/tauri/src/menu/icon.rs +++ b/core/tauri/src/menu/icon.rs @@ -7,7 +7,8 @@ use crate::{ menu::MenuId, resources::Resource, run_main_thread, AppHandle, Icon, Manager, Runtime, }; -/// A menu item inside a [`Menu`] or [`Submenu`] and contains only text. +/// A menu item inside a [`Menu`] or [`Submenu`] +/// and usually contains an icon and a text. /// /// [`Menu`]: super::Menu /// [`Submenu`]: super::Submenu diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 6ca2cce7404..a7df24ef440 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -6,8 +6,6 @@ import { TauriEvent, listen } from './event' import { Resource, applyMixins } from './internal' import { invoke } from './tauri' -// TODO menu builders - /** * Menu types and utilities. * @@ -15,7 +13,9 @@ import { invoke } from './tauri' * @module */ +/** Describes a menu event emitted when a menu item is activated */ interface MenuEvent { + /** Id of the menu item that triggered this event */ id: string } @@ -61,6 +61,13 @@ async function addEventListener( window.__TAURI_MENU__.handlers[id].push(handler) } +/** + * A native Icon to be used for the menu item + * + * #### Platform-specific: + * + * - **Windows / Linux**: Unsupported. + */ enum NativeIcon { /** An add item template image. */ Add = 'Add', @@ -236,10 +243,12 @@ class MenuItemBase extends Resource { #id: string #kind: ItemKind + /// The id of this item. get id(): string { return this.#id } + /** @ignore */ get kind(): string { return this.#kind } @@ -252,6 +261,13 @@ class MenuItemBase extends Resource { } class MenuBase extends MenuItemBase { + /** + * Add a menu item to the end of this menu. + * + * ## Platform-spcific: + * + * - **macOS:** Only {@linkcode Submenu}s can be added to a {@linkcode Menu}. + */ async append< T extends | Submenu @@ -270,6 +286,13 @@ class MenuBase extends MenuItemBase { }) } + /** + * Add a menu item to the beginning of this menu. + * + * ## Platform-spcific: + * + * - **macOS:** Only {@linkcode Submenu}s can be added to a {@linkcode Menu}. + */ async prepend< T extends | Submenu @@ -288,6 +311,13 @@ class MenuBase extends MenuItemBase { }) } + /** + * Add a menu item to the specified position in this menu. + * + * ## Platform-spcific: + * + * - **macOS:** Only {@linkcode Submenu}s can be added to a {@linkcode Menu}. + */ async insert< T extends | Submenu @@ -307,6 +337,7 @@ class MenuBase extends MenuItemBase { }) } + /** Remove a menu item from this menu. */ async remove( item: Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem ): Promise { @@ -317,6 +348,7 @@ class MenuBase extends MenuItemBase { }) } + /** Remove a menu item from this menu at the specified position. */ async removeAt( position: number ): Promise< @@ -334,6 +366,7 @@ class MenuBase extends MenuItemBase { }).then(itemFromKind) } + /** Returns a list of menu items that has been added to this menu. */ async items(): Promise< Array< Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem @@ -345,6 +378,7 @@ class MenuBase extends MenuItemBase { }).then((i) => i.map(itemFromKind)) } + /** Retrieves the menu item matching the given identifier. */ async get( id: string ): Promise< @@ -364,6 +398,11 @@ class MenuBase extends MenuItemBase { // TODO change to logical position // TODO use window type after migrating window back to core + /** + * Popup this menu as a context menu on the specified window. + * + * If the position, is provided, it is relative to the window's top-left corner. + */ async popup(window: string, position?: [number, number]): Promise { return invoke('plugin:menu|popup', { rid: this.rid, @@ -374,28 +413,42 @@ class MenuBase extends MenuItemBase { } } +/** Options for creating a new menu. */ interface MenuOptions { + /** Specify an id to use for the new menu. */ id?: string + /** List of items to add to the new menu. */ items?: Array< Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem > } +/** A type that is either a menu bar on the window + * on Windows and Linux or as a global menu in the menubar on macOS. + */ class Menu extends MenuBase { constructor(rid: number, id: string) { super(rid, id, 'Menu') } + /** Create a new menu. */ static async new(opts?: MenuOptions): Promise { return newMenu('Menu', opts).then(([rid, id]) => new Menu(rid, id)) } + /** Create a default menu. */ static async default(): Promise { return invoke<[number, string]>('plugin:menu|default').then( ([rid, id]) => new Menu(rid, id) ) } + /** + * Sets the app-wide menu and returns the previous one. + * + * If a window was not created with an explicit menu or had one set explicitly, + * this menu will be assigned to it. + */ async setAsAppMenu(): Promise { return invoke<[number, string] | null>('plugin:menu|set_as_app_menu', { rid: this.rid @@ -403,6 +456,14 @@ class Menu extends MenuBase { } // TODO use window type after migrating window back to core + /** + * Sets the window menu and returns the previous one. + * + * #### Platform-specific: + * + * - **macOS:** Unsupported. The menu on macOS is app-wide and not specific to one + * window, if you need to set it, use {@linkcode Menu.setAsAppMenu} instead. + */ async setAsWindowMenu(window: string): Promise { return invoke<[number, string] | null>('plugin:menu|set_as_window_menu', { rid: this.rid, @@ -412,10 +473,12 @@ class Menu extends MenuBase { } class MenuItemBase2 extends MenuItemBase { + /** Returns the text of this item. */ async text(): Promise { return invoke('plugin:menu|text', { rid: this.rid, kind: this.kind }) } + /** Sets the text for this item. */ async setText(text: string): Promise { return invoke('plugin:menu|set_text', { rid: this.rid, @@ -426,10 +489,12 @@ class MenuItemBase2 extends MenuItemBase { } class MenuItemBase3 extends MenuItemBase2 { + /** Returns whether this item is enabled or not. */ async isEnabled(): Promise { return invoke('plugin:menu|is_enabled', { rid: this.rid, kind: this.kind }) } + /** Sets whether this item is enabled or not. */ async setEnabled(enabled: boolean): Promise { return invoke('plugin:menu|set_enabled', { rid: this.rid, @@ -440,6 +505,7 @@ class MenuItemBase3 extends MenuItemBase2 { } class MenuItemBase4 extends MenuItemBase3 { + /** Sets the accelerator for this menu item. */ async setAccelerator(accelerator: string | null): Promise { return invoke('plugin:menu|set_accelerator', { rid: this.rid, @@ -449,19 +515,27 @@ class MenuItemBase4 extends MenuItemBase3 { } } +/** Options for creating a new menu item. */ interface MenuItemOptions { + /** Specify an id to use for the new menu item. */ id?: string + /** The text of the new menu item. */ text: string + /** Whether the new menu item is enabled or not. */ enabled?: boolean + /** Specify an accelerator for the new menu item. */ accelerator?: string + /** Specify a handler to be called when this menu item is activated. */ action?: () => void } +/** A menu item inside a {@linkcode Menu} or {@linkcode Submenu} and contains only text. */ class MenuItem extends MenuItemBase4 { constructor(rid: number, id: string) { super(rid, id, 'MenuItem') } + /** Create a new menu item. */ static async new(opts: MenuItemOptions): Promise { return newMenu('MenuItem', opts).then(([rid, id]) => new MenuItem(rid, id)) } @@ -471,21 +545,46 @@ type SubmenuOptions = Omit & MenuOptions interface Submenu extends MenuItemBase3 {} + +/** A type that is a submenu inside a {@linkcode Menu} or {@linkcode Submenu}. */ class Submenu extends MenuBase { constructor(rid: number, id: string) { super(rid, id, 'Submenu') } + /** Create a new submenu. */ static async new(opts: SubmenuOptions): Promise { return newMenu('Submenu', opts).then(([rid, id]) => new Submenu(rid, id)) } + /** + * Set this submenu as the Window menu for the application on macOS. + * + * This will cause macOS to automatically add window-switching items and + * certain other items to the menu. + * + * #### Platform-specific: + * + * - **Windows / Linux**: Unsupported. + */ async setAsWindowsMenuForNSApp(): Promise { return invoke('plugin:menu|set_as_windows_menu_for_nsapp', { rid: this.rid }) } + /** + * Set this submenu as the Help menu for the application on macOS. + * + * This will cause macOS to automatically add a search box to the menu. + * + * If no menu is set as the Help menu, macOS will automatically use any menu + * which has a title matching the localized word "Help". + * + * #### Platform-specific: + * + * - **Windows / Linux**: Unsupported. + */ async setAsHelpMenuForNSApp(): Promise { return invoke('plugin:menu|set_as_help_menu_for_nsapp', { rid: this.rid @@ -495,8 +594,85 @@ class Submenu extends MenuBase { applyMixins(Submenu, MenuItemBase3) +/** A metadata for the about predefined menu item. */ +interface AboutMetadata { + /** Sets the application name. */ + name?: string + /** The application version. */ + version?: string + /** + * The short version, e.g. "1.0". + * + * #### Platform-specific + * + * - **Windows / Linux:** Appended to the end of `version` in parentheses. + */ + short_version?: string + /** + * The authors of the application. + * + * #### Platform-specific + * + * - **macOS:** Unsupported. + */ + authors?: string[] + /** + * Application comments. + * + * #### Platform-specific + * + * - **macOS:** Unsupported. + */ + comments?: string + /** The copyright of the application. */ + copyright?: string + /** + * The license of the application. + * + * #### Platform-specific + * + * - **macOS:** Unsupported. + */ + license?: string + /** + * The application website. + * + * #### Platform-specific + * + * - **macOS:** Unsupported. + */ + website?: string + /** + * The website label. + * + * #### Platform-specific + * + * - **macOS:** Unsupported. + */ + website_label?: string + /** + * The credits. + * + * #### Platform-specific + * + * - **Windows / Linux:** Unsupported. + */ + credits?: string + /** + * The application icon. + * + * #### Platform-specific + * + * - **Windows:** Unsupported. + */ + icon?: string | Uint8Array +} + +/** Options for creating a new predefined menu item. */ interface PredefinedMenuItemOptions { + /** The text of the new predefined menu item. */ text?: string + /** The predefined item type */ item: | 'Separator' | 'Copy' @@ -515,27 +691,17 @@ interface PredefinedMenuItemOptions { | 'Quit' | 'Services' | { - About: { - name?: string - version?: string - short_version?: string - authors?: string[] - comments?: string - copyright?: string - license?: string - website?: string - website_label?: string - credits?: string - icon?: string | Uint8Array - } + About: AboutMetadata | null } } +/** A predefined (native) menu item which has a predfined behavior by the OS or by tauri. */ class PredefinedMenuItem extends MenuItemBase2 { constructor(rid: number, id: string) { super(rid, id, 'MenuItem') } + /** Create a new predefined menu item. */ static async new( opts?: PredefinedMenuItemOptions ): Promise { @@ -545,25 +711,35 @@ class PredefinedMenuItem extends MenuItemBase2 { } } +/** Options for creating a new check menu item. */ interface CheckMenuItemOptions extends MenuItemOptions { + /** Whether the new check menu item is enabled or not. */ checked?: boolean } +/** + * A chcek menu item inside a {@linkcode Menu} or {@linkcode Submenu} + * and usually contains a text and a check mark or a similar toggle + * that corresponds to a checked and unchecked states. + */ class CheckMenuItem extends MenuItemBase4 { constructor(rid: number, id: string) { super(rid, id, 'Check') } + /** Create a new check menu item. */ static async new(opts: MenuItemOptions): Promise { return newMenu('Check', opts).then( ([rid, id]) => new CheckMenuItem(rid, id) ) } + /** Returns whether this item is checked or not. */ async isChecked(): Promise { return invoke('plugin:menu|is_checked', { rid: this.rid }) } + /** Sets whether this item is checked or not. */ async setChecked(checked: boolean): Promise { return invoke('plugin:menu|set_checked', { rid: this.rid, @@ -572,23 +748,42 @@ class CheckMenuItem extends MenuItemBase4 { } } +/** Options for creating a new icon menu item. */ interface IconMenuItemOptions extends MenuItemOptions { + /** + * Icon to be used for the new icon menu item. + * + * if both {@linkcode IconMenuItemOptions.icon|icon} and {@linkcode IconMenuItemOptions.nativeIcon|nativeIcon} are specified, only {@linkcode IconMenuItemOptions.icon|icon} is used. + */ icon?: string | Uint8Array + /** + * NativeIcon to be used for the new icon menu item. + * + * if both {@linkcode IconMenuItemOptions.icon|icon} and {@linkcode IconMenuItemOptions.nativeIcon|nativeIcon} are specified, only {@linkcode IconMenuItemOptions.icon|icon} is used. + */ nativeIcon?: NativeIcon } + +/** + * An icon menu item inside a {@linkcode Menu} or {@linkcode Submenu} + * and usually contains an icon and a text. + */ class IconMenuItem extends MenuItemBase4 { constructor(rid: number, id: string) { super(rid, id, 'Icon') } + /** Create a new icon menu item. */ static async new(opts: IconMenuItemOptions): Promise { return newMenu('Icon', opts).then(([rid, id]) => new IconMenuItem(rid, id)) } + /** Sets an icon for this icon menu item */ async setIcon(icon: string | Uint8Array | null): Promise { return invoke('plugin:menu|set_icon', { rid: this.rid, icon }) } + /** Sets a native icon for this icon menu item */ async setNativeIcon(icon: NativeIcon | null): Promise { return invoke('plugin:menu|set_native_icon', { rid: this.rid, icon }) } @@ -601,7 +796,8 @@ export type { SubmenuOptions, PredefinedMenuItemOptions, CheckMenuItemOptions, - IconMenuItemOptions + IconMenuItemOptions, + AboutMetadata } export { NativeIcon, From 4cdf9d24017214c73206203bcc9a6e276dfb0f96 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 18:45:24 +0300 Subject: [PATCH 12/64] fix cargo.toml --- core/tauri/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index 95cfe0f81fe..e1710215141 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -69,8 +69,8 @@ png = { version = "0.17", optional = true } ico = { version = "0.3.0", optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\", target_os = \"windows\", target_os = \"macos\"))".dependencies] -muda = { path = "../../../muda", default-features = false, features = [ "serde" ]} -tray-icon = { path = "../../../tray-icon", default-features = false, features = [ "serde" ], optional = true } +muda = { version = "0.8", default-features = false, features = [ "serde" ]} +tray-icon = { version = "0.8", default-features = false, features = [ "serde" ], optional = true } [target."cfg(any(target_os = \"linux\", target_os = \"dragonfly\", target_os = \"freebsd\", target_os = \"openbsd\", target_os = \"netbsd\"))".dependencies] gtk = { version = "0.16", features = [ "v3_24" ] } From b4f8ce6c33a0bd3f3e1c9b3e2b34d2f7147e68c1 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 18:46:34 +0300 Subject: [PATCH 13/64] generated files --- core/tauri/scripts/bundle.global.js | 2 +- tooling/api/docs/js-api.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 0306aa20f49..c41dc22a59b 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var h=(r,e)=>{for(var n in e)L(r,n,{get:e[n],enumerable:!0})},ee=(r,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of N(e))!B.call(r,u)&&u!==n&&L(r,u,{get:()=>e[u],enumerable:!(s=X(e,u))||s.enumerable});return r};var ne=r=>ee(L({},"__esModule",{value:!0}),r);var Q=(r,e,n)=>{if(!e.has(r))throw TypeError("Cannot "+n)};var l=(r,e,n)=>(Q(r,e,"read from private field"),n?n.call(r):e.get(r)),c=(r,e,n)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,n)},p=(r,e,n,s)=>(Q(r,e,"write to private field"),s?s.call(r,n):e.set(r,n),n);var Ke={};h(Ke,{event:()=>H,invoke:()=>Ge,menu:()=>j,path:()=>V,tauri:()=>W,tray:()=>G});var H={};h(H,{TauriEvent:()=>E,emit:()=>oe,listen:()=>f,once:()=>se});var W={};h(W,{Channel:()=>S,PluginListener:()=>v,addPluginListener:()=>te,convertFileSrc:()=>ie,invoke:()=>t,transformCallback:()=>_});function re(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function _(r,e=!1){let n=re(),s=`_${n}`;return Object.defineProperty(window,s,{value:u=>(e&&Reflect.deleteProperty(window,s),r?.(u)),writable:!1,configurable:!0}),n}var y,S=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;c(this,y,()=>{});this.id=_(e=>{l(this,y).call(this,e)})}set onmessage(e){p(this,y,e)}get onmessage(){return l(this,y)}toJSON(){return`__CHANNEL__:${this.id}`}};y=new WeakMap;var v=class{constructor(e,n,s){this.plugin=e,this.event=n,this.channelId=s}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function te(r,e,n){let s=new S;return s.onmessage=n,t(`plugin:${r}|register_listener`,{event:e,handler:s}).then(()=>new v(r,e,s.id))}async function t(r,e={},n){return new Promise((s,u)=>{let $=_(x=>{s(x),Reflect.deleteProperty(window,`_${z}`)},!0),z=_(x=>{u(x),Reflect.deleteProperty(window,`_${$}`)},!0);window.__TAURI_IPC__({cmd:r,callback:$,error:z,payload:e,options:n})})}function ie(r,e="asset"){return window.__TAURI__.convertFileSrc(r,e)}var E=(a=>(a.WINDOW_RESIZED="tauri://resize",a.WINDOW_MOVED="tauri://move",a.WINDOW_CLOSE_REQUESTED="tauri://close-requested",a.WINDOW_CREATED="tauri://window-created",a.WINDOW_DESTROYED="tauri://destroyed",a.WINDOW_FOCUS="tauri://focus",a.WINDOW_BLUR="tauri://blur",a.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",a.WINDOW_THEME_CHANGED="tauri://theme-changed",a.WINDOW_FILE_DROP="tauri://file-drop",a.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",a.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",a.MENU="tauri://menu",a.TRAY="tauri://tray",a))(E||{});async function Y(r,e){await t("plugin:event|unlisten",{event:r,eventId:e})}async function f(r,e,n){return t("plugin:event|listen",{event:r,windowLabel:n?.target,handler:_(e)}).then(s=>async()=>Y(r,s))}async function se(r,e,n){return f(r,s=>{e(s),Y(r,s.id).catch(()=>{})},n)}async function oe(r,e,n){await t("plugin:event|emit",{event:r,windowLabel:n?.target,payload:e})}var V={};h(V,{BaseDirectory:()=>q,appCacheDir:()=>de,appConfigDir:()=>ue,appDataDir:()=>ae,appLocalDataDir:()=>le,appLogDir:()=>ve,audioDir:()=>ce,basename:()=>We,cacheDir:()=>pe,configDir:()=>me,dataDir:()=>ge,delimiter:()=>Ce,desktopDir:()=>he,dirname:()=>xe,documentDir:()=>ye,downloadDir:()=>_e,executableDir:()=>fe,extname:()=>Le,fontDir:()=>be,homeDir:()=>we,isAbsolute:()=>He,join:()=>De,localDataDir:()=>ke,normalize:()=>Fe,pictureDir:()=>Pe,publicDir:()=>Me,resolve:()=>Ue,resolveResource:()=>Ie,resourceDir:()=>Ae,runtimeDir:()=>Te,sep:()=>Re,tempDir:()=>Ee,templateDir:()=>Oe,videoDir:()=>Se});var q=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(q||{});async function ue(){return t("plugin:path|resolve_directory",{directory:13})}async function ae(){return t("plugin:path|resolve_directory",{directory:14})}async function le(){return t("plugin:path|resolve_directory",{directory:15})}async function de(){return t("plugin:path|resolve_directory",{directory:16})}async function ce(){return t("plugin:path|resolve_directory",{directory:1})}async function pe(){return t("plugin:path|resolve_directory",{directory:2})}async function me(){return t("plugin:path|resolve_directory",{directory:3})}async function ge(){return t("plugin:path|resolve_directory",{directory:4})}async function he(){return t("plugin:path|resolve_directory",{directory:18})}async function ye(){return t("plugin:path|resolve_directory",{directory:6})}async function _e(){return t("plugin:path|resolve_directory",{directory:7})}async function fe(){return t("plugin:path|resolve_directory",{directory:19})}async function be(){return t("plugin:path|resolve_directory",{directory:20})}async function we(){return t("plugin:path|resolve_directory",{directory:21})}async function ke(){return t("plugin:path|resolve_directory",{directory:5})}async function Pe(){return t("plugin:path|resolve_directory",{directory:8})}async function Me(){return t("plugin:path|resolve_directory",{directory:9})}async function Ae(){return t("plugin:path|resolve_directory",{directory:11})}async function Ie(r){return t("plugin:path|resolve_directory",{directory:11,path:r})}async function Te(){return t("plugin:path|resolve_directory",{directory:22})}async function Oe(){return t("plugin:path|resolve_directory",{directory:23})}async function Se(){return t("plugin:path|resolve_directory",{directory:10})}async function ve(){return t("plugin:path|resolve_directory",{directory:17})}async function Ee(r){return t("plugin:path|resolve_directory",{directory:12})}function Re(){return window.__TAURI__.path.__sep}function Ce(){return window.__TAURI__.path.__delimiter}async function Ue(...r){return t("plugin:path|resolve",{paths:r})}async function Fe(r){return t("plugin:path|normalize",{path:r})}async function De(...r){return t("plugin:path|join",{paths:r})}async function xe(r){return t("plugin:path|dirname",{path:r})}async function Le(r){return t("plugin:path|extname",{path:r})}async function We(r,e){return t("plugin:path|basename",{path:r,ext:e})}async function He(r){return t("plugin:path|isAbsolute",{path:r})}var G={};h(G,{TrayIcon:()=>A});var M,b=class{constructor(e){c(this,M,void 0);p(this,M,e)}get rid(){return l(this,M)}async close(){return t("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function J(r,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(s=>{Object.defineProperty(r.prototype,s,Object.getOwnPropertyDescriptor(n.prototype,s)||Object.create(null))})})}var A=class extends b{constructor(n,s){super(n);this.id=s}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),t("plugin:tray|new",{options:n??{}}).then(([s,u])=>new A(s,u))}async setIcon(n){return t("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),t("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return t("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return t("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return t("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return t("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return t("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return t("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async on(n){return f("tauri://tray",s=>{s.payload.id==this.id&&n(s.payload)},{target:window.__TAURI_METADATA__.__currentWindow.label})}};var j={};h(j,{CheckMenuItem:()=>w,IconMenuItem:()=>k,Menu:()=>d,MenuItem:()=>m,NativeIcon:()=>Z,PredefinedMenuItem:()=>D,Submenu:()=>g});async function Ve(r,e){if(!window.__TAURI_MENU__){window.__TAURI_MENU__={handlers:{}};let n=await f("tauri://menu",s=>{let u=window.__TAURI_MENU__?.handlers[s.payload.id];if(u)for(e of u)e()},{target:window.__TAURI_METADATA__.__currentWindow.label});window.addEventListener("unload",()=>n())}window.__TAURI_MENU__.handlers[r]||(window.__TAURI_MENU__.handlers[r]=[]),window.__TAURI_MENU__.handlers[r].push(e)}var Z=(i=>(i.Add="Add",i.Advanced="Advanced",i.Bluetooth="Bluetooth",i.Bookmarks="Bookmarks",i.Caution="Caution",i.ColorPanel="ColorPanel",i.ColumnView="ColumnView",i.Computer="Computer",i.EnterFullScreen="EnterFullScreen",i.Everyone="Everyone",i.ExitFullScreen="ExitFullScreen",i.FlowView="FlowView",i.Folder="Folder",i.FolderBurnable="FolderBurnable",i.FolderSmart="FolderSmart",i.FollowLinkFreestanding="FollowLinkFreestanding",i.FontPanel="FontPanel",i.GoLeft="GoLeft",i.GoRight="GoRight",i.Home="Home",i.IChatTheater="IChatTheater",i.IconView="IconView",i.Info="Info",i.InvalidDataFreestanding="InvalidDataFreestanding",i.LeftFacingTriangle="LeftFacingTriangle",i.ListView="ListView",i.LockLocked="LockLocked",i.LockUnlocked="LockUnlocked",i.MenuMixedState="MenuMixedState",i.MenuOnState="MenuOnState",i.MobileMe="MobileMe",i.MultipleDocuments="MultipleDocuments",i.Network="Network",i.Path="Path",i.PreferencesGeneral="PreferencesGeneral",i.QuickLook="QuickLook",i.RefreshFreestanding="RefreshFreestanding",i.Refresh="Refresh",i.Remove="Remove",i.RevealFreestanding="RevealFreestanding",i.RightFacingTriangle="RightFacingTriangle",i.Share="Share",i.Slideshow="Slideshow",i.SmartBadge="SmartBadge",i.StatusAvailable="StatusAvailable",i.StatusNone="StatusNone",i.StatusPartiallyAvailable="StatusPartiallyAvailable",i.StatusUnavailable="StatusUnavailable",i.StopProgressFreestanding="StopProgressFreestanding",i.StopProgress="StopProgress",i.TrashEmpty="TrashEmpty",i.TrashFull="TrashFull",i.User="User",i.UserAccounts="UserAccounts",i.UserGroup="UserGroup",i.UserGuest="UserGuest",i))(Z||{});function K([r,e,n]){switch(n){case"Submenu":return new g(r,e);case"Predefined":return new D(r,e);case"Check":return new w(r,e);case"Icon":return new k(r,e);case"MenuItem":default:return new m(r,e)}}async function P(r,e){let n=null,s=null;return e&&("action"in e&&(n=e.action),"items"in e&&(s=e.items.map(u=>[u.rid,u.kind]))),t("plugin:menu|new",{kind:r,options:e?{...e,items:s}:void 0}).then(u=>(n&&Ve(u[1],n),u))}var T,O,R=class extends b{constructor(n,s,u){super(n);c(this,T,void 0);c(this,O,void 0);p(this,T,s),p(this,O,u)}get id(){return l(this,T)}get kind(){return l(this,O)}async close(){return t("plugin:resources|close",{rid:this.rid})}};T=new WeakMap,O=new WeakMap;var C=class extends R{constructor(e,n,s){super(e,n,s)}async append(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return t("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return t("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(s=>[s.rid,s.kind]),position:n})}async remove(e){return t("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return t("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(K)}async items(){return t("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(K))}async get(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?K(n):null)}async popup(e,n){return t("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},d=class extends C{constructor(e,n){super(e,n,"Menu")}static async new(e){return P("Menu",e).then(([n,s])=>new d(n,s))}static async default(){return t("plugin:menu|default").then(([e,n])=>new d(e,n))}async setAsAppMenu(){return t("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new d(e[0],e[1]):null)}async setAsWindowMenu(e){return t("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new d(n[0],n[1]):null)}},U=class extends R{async text(){return t("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return t("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},F=class extends U{async isEnabled(){return t("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return t("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},I=class extends F{async setAccelerator(e){return t("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},m=class extends I{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return P("MenuItem",e).then(([n,s])=>new m(n,s))}},g=class extends C{constructor(e,n){super(e,n,"Submenu")}static async new(e){return P("Submenu",e).then(([n,s])=>new g(n,s))}async setAsWindowsMenuForNSApp(){return t("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return t("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};J(g,F);var D=class extends U{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return P("MenuItem",e).then(([n,s])=>new m(n,s))}},w=class extends I{constructor(e,n){super(e,n,"Check")}static async new(e){return P("Check",e).then(([n,s])=>new w(n,s))}async isChecked(){return t("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return t("plugin:menu|set_checked",{rid:this.rid,checked:e})}},k=class extends I{constructor(e,n){super(e,n,"Icon")}static async new(e){return P("Icon",e).then(([n,s])=>new k(n,s))}async setIcon(e){return t("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return t("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};var Ge=t;return ne(Ke);})(); +"use strict";var __TAURI_IIFE__=(()=>{var L=Object.defineProperty;var X=Object.getOwnPropertyDescriptor;var N=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var g=(r,e)=>{for(var n in e)L(r,n,{get:e[n],enumerable:!0})},ee=(r,e,n,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let u of N(e))!B.call(r,u)&&u!==n&&L(r,u,{get:()=>e[u],enumerable:!(s=X(e,u))||s.enumerable});return r};var ne=r=>ee(L({},"__esModule",{value:!0}),r);var Q=(r,e,n)=>{if(!e.has(r))throw TypeError("Cannot "+n)};var d=(r,e,n)=>(Q(r,e,"read from private field"),n?n.call(r):e.get(r)),c=(r,e,n)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,n)},m=(r,e,n,s)=>(Q(r,e,"write to private field"),s?s.call(r,n):e.set(r,n),n);var Ke={};g(Ke,{event:()=>H,invoke:()=>Ge,menu:()=>j,path:()=>V,tauri:()=>W,tray:()=>G});var H={};g(H,{TauriEvent:()=>E,emit:()=>oe,listen:()=>_,once:()=>se});var W={};g(W,{Channel:()=>S,PluginListener:()=>R,addPluginListener:()=>te,convertFileSrc:()=>ie,invoke:()=>t,transformCallback:()=>y});function re(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function y(r,e=!1){let n=re(),s=`_${n}`;return Object.defineProperty(window,s,{value:u=>(e&&Reflect.deleteProperty(window,s),r?.(u)),writable:!1,configurable:!0}),n}var h,S=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;c(this,h,()=>{});this.id=y(e=>{d(this,h).call(this,e)})}set onmessage(e){m(this,h,e)}get onmessage(){return d(this,h)}toJSON(){return`__CHANNEL__:${this.id}`}};h=new WeakMap;var R=class{constructor(e,n,s){this.plugin=e,this.event=n,this.channelId=s}async unregister(){return t(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function te(r,e,n){let s=new S;return s.onmessage=n,t(`plugin:${r}|register_listener`,{event:e,handler:s}).then(()=>new R(r,e,s.id))}async function t(r,e={},n){return new Promise((s,u)=>{let $=y(x=>{s(x),Reflect.deleteProperty(window,`_${z}`)},!0),z=y(x=>{u(x),Reflect.deleteProperty(window,`_${$}`)},!0);window.__TAURI_IPC__({cmd:r,callback:$,error:z,payload:e,options:n})})}function ie(r,e="asset"){return window.__TAURI__.convertFileSrc(r,e)}var E=(a=>(a.WINDOW_RESIZED="tauri://resize",a.WINDOW_MOVED="tauri://move",a.WINDOW_CLOSE_REQUESTED="tauri://close-requested",a.WINDOW_CREATED="tauri://window-created",a.WINDOW_DESTROYED="tauri://destroyed",a.WINDOW_FOCUS="tauri://focus",a.WINDOW_BLUR="tauri://blur",a.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",a.WINDOW_THEME_CHANGED="tauri://theme-changed",a.WINDOW_FILE_DROP="tauri://file-drop",a.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",a.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",a.MENU="tauri://menu",a.TRAY="tauri://tray",a))(E||{});async function Y(r,e){await t("plugin:event|unlisten",{event:r,eventId:e})}async function _(r,e,n){return t("plugin:event|listen",{event:r,windowLabel:n?.target,handler:y(e)}).then(s=>async()=>Y(r,s))}async function se(r,e,n){return _(r,s=>{e(s),Y(r,s.id).catch(()=>{})},n)}async function oe(r,e,n){await t("plugin:event|emit",{event:r,windowLabel:n?.target,payload:e})}var V={};g(V,{BaseDirectory:()=>q,appCacheDir:()=>le,appConfigDir:()=>ue,appDataDir:()=>ae,appLocalDataDir:()=>de,appLogDir:()=>Se,audioDir:()=>ce,basename:()=>We,cacheDir:()=>me,configDir:()=>pe,dataDir:()=>ge,delimiter:()=>Ce,desktopDir:()=>he,dirname:()=>xe,documentDir:()=>ye,downloadDir:()=>_e,executableDir:()=>fe,extname:()=>Le,fontDir:()=>be,homeDir:()=>Pe,isAbsolute:()=>He,join:()=>De,localDataDir:()=>we,normalize:()=>Fe,pictureDir:()=>ke,publicDir:()=>Me,resolve:()=>Ue,resolveResource:()=>ve,resourceDir:()=>Ae,runtimeDir:()=>Ie,sep:()=>Ee,tempDir:()=>Re,templateDir:()=>Te,videoDir:()=>Oe});var q=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(q||{});async function ue(){return t("plugin:path|resolve_directory",{directory:13})}async function ae(){return t("plugin:path|resolve_directory",{directory:14})}async function de(){return t("plugin:path|resolve_directory",{directory:15})}async function le(){return t("plugin:path|resolve_directory",{directory:16})}async function ce(){return t("plugin:path|resolve_directory",{directory:1})}async function me(){return t("plugin:path|resolve_directory",{directory:2})}async function pe(){return t("plugin:path|resolve_directory",{directory:3})}async function ge(){return t("plugin:path|resolve_directory",{directory:4})}async function he(){return t("plugin:path|resolve_directory",{directory:18})}async function ye(){return t("plugin:path|resolve_directory",{directory:6})}async function _e(){return t("plugin:path|resolve_directory",{directory:7})}async function fe(){return t("plugin:path|resolve_directory",{directory:19})}async function be(){return t("plugin:path|resolve_directory",{directory:20})}async function Pe(){return t("plugin:path|resolve_directory",{directory:21})}async function we(){return t("plugin:path|resolve_directory",{directory:5})}async function ke(){return t("plugin:path|resolve_directory",{directory:8})}async function Me(){return t("plugin:path|resolve_directory",{directory:9})}async function Ae(){return t("plugin:path|resolve_directory",{directory:11})}async function ve(r){return t("plugin:path|resolve_directory",{directory:11,path:r})}async function Ie(){return t("plugin:path|resolve_directory",{directory:22})}async function Te(){return t("plugin:path|resolve_directory",{directory:23})}async function Oe(){return t("plugin:path|resolve_directory",{directory:10})}async function Se(){return t("plugin:path|resolve_directory",{directory:17})}async function Re(r){return t("plugin:path|resolve_directory",{directory:12})}function Ee(){return window.__TAURI__.path.__sep}function Ce(){return window.__TAURI__.path.__delimiter}async function Ue(...r){return t("plugin:path|resolve",{paths:r})}async function Fe(r){return t("plugin:path|normalize",{path:r})}async function De(...r){return t("plugin:path|join",{paths:r})}async function xe(r){return t("plugin:path|dirname",{path:r})}async function Le(r){return t("plugin:path|extname",{path:r})}async function We(r,e){return t("plugin:path|basename",{path:r,ext:e})}async function He(r){return t("plugin:path|isAbsolute",{path:r})}var G={};g(G,{TrayIcon:()=>v});var A,f=class{constructor(e){c(this,A,void 0);m(this,A,e)}get rid(){return d(this,A)}async close(){return t("plugin:resources|close",{rid:this.rid})}};A=new WeakMap;function J(r,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(s=>{Object.defineProperty(r.prototype,s,Object.getOwnPropertyDescriptor(n.prototype,s)??Object.create(null))})})}var v=class extends f{constructor(n,s){super(n);this.id=s}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),t("plugin:tray|new",{options:n??{}}).then(([s,u])=>new v(s,u))}async setIcon(n){return t("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),t("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return t("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return t("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return t("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return t("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return t("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return t("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async on(n){return _("tauri://tray",s=>{s.payload.id===this.id&&n(s.payload)},{target:window.__TAURI_METADATA__.__currentWindow.label})}};var j={};g(j,{CheckMenuItem:()=>w,IconMenuItem:()=>k,Menu:()=>l,MenuItem:()=>b,NativeIcon:()=>Z,PredefinedMenuItem:()=>P,Submenu:()=>p});async function Ve(r,e){if(!window.__TAURI_MENU__){window.__TAURI_MENU__={handlers:{}};let n=await _("tauri://menu",s=>{let u=window.__TAURI_MENU__?.handlers[s.payload.id];if(u)for(e of u)e()},{target:window.__TAURI_METADATA__.__currentWindow.label});window.addEventListener("unload",n)}window.__TAURI_MENU__.handlers[r]||(window.__TAURI_MENU__.handlers[r]=[]),window.__TAURI_MENU__.handlers[r].push(e)}var Z=(i=>(i.Add="Add",i.Advanced="Advanced",i.Bluetooth="Bluetooth",i.Bookmarks="Bookmarks",i.Caution="Caution",i.ColorPanel="ColorPanel",i.ColumnView="ColumnView",i.Computer="Computer",i.EnterFullScreen="EnterFullScreen",i.Everyone="Everyone",i.ExitFullScreen="ExitFullScreen",i.FlowView="FlowView",i.Folder="Folder",i.FolderBurnable="FolderBurnable",i.FolderSmart="FolderSmart",i.FollowLinkFreestanding="FollowLinkFreestanding",i.FontPanel="FontPanel",i.GoLeft="GoLeft",i.GoRight="GoRight",i.Home="Home",i.IChatTheater="IChatTheater",i.IconView="IconView",i.Info="Info",i.InvalidDataFreestanding="InvalidDataFreestanding",i.LeftFacingTriangle="LeftFacingTriangle",i.ListView="ListView",i.LockLocked="LockLocked",i.LockUnlocked="LockUnlocked",i.MenuMixedState="MenuMixedState",i.MenuOnState="MenuOnState",i.MobileMe="MobileMe",i.MultipleDocuments="MultipleDocuments",i.Network="Network",i.Path="Path",i.PreferencesGeneral="PreferencesGeneral",i.QuickLook="QuickLook",i.RefreshFreestanding="RefreshFreestanding",i.Refresh="Refresh",i.Remove="Remove",i.RevealFreestanding="RevealFreestanding",i.RightFacingTriangle="RightFacingTriangle",i.Share="Share",i.Slideshow="Slideshow",i.SmartBadge="SmartBadge",i.StatusAvailable="StatusAvailable",i.StatusNone="StatusNone",i.StatusPartiallyAvailable="StatusPartiallyAvailable",i.StatusUnavailable="StatusUnavailable",i.StopProgressFreestanding="StopProgressFreestanding",i.StopProgress="StopProgress",i.TrashEmpty="TrashEmpty",i.TrashFull="TrashFull",i.User="User",i.UserAccounts="UserAccounts",i.UserGroup="UserGroup",i.UserGuest="UserGuest",i))(Z||{});function K([r,e,n]){switch(n){case"Submenu":return new p(r,e);case"Predefined":return new P(r,e);case"Check":return new w(r,e);case"Icon":return new k(r,e);case"MenuItem":default:return new b(r,e)}}async function M(r,e){let n=null,s=null;return e&&("action"in e&&(n=e.action),"items"in e&&(s=e.items.map(u=>[u.rid,u.kind]))),t("plugin:menu|new",{kind:r,options:e?{...e,items:s}:void 0}).then(u=>(n&&Ve(u[1],n),u))}var T,O,C=class extends f{constructor(n,s,u){super(n);c(this,T,void 0);c(this,O,void 0);m(this,T,s),m(this,O,u)}get id(){return d(this,T)}get kind(){return d(this,O)}};T=new WeakMap,O=new WeakMap;var U=class extends C{async append(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return t("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return t("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(s=>[s.rid,s.kind]),position:n})}async remove(e){return t("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return t("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(K)}async items(){return t("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(K))}async get(e){return t("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?K(n):null)}async popup(e,n){return t("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},l=class extends U{constructor(e,n){super(e,n,"Menu")}static async new(e){return M("Menu",e).then(([n,s])=>new l(n,s))}static async default(){return t("plugin:menu|default").then(([e,n])=>new l(e,n))}async setAsAppMenu(){return t("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new l(e[0],e[1]):null)}async setAsWindowMenu(e){return t("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new l(n[0],n[1]):null)}},F=class extends C{async text(){return t("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return t("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},D=class extends F{async isEnabled(){return t("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return t("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},I=class extends D{async setAccelerator(e){return t("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},b=class extends I{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return M("MenuItem",e).then(([n,s])=>new b(n,s))}},p=class extends U{constructor(e,n){super(e,n,"Submenu")}static async new(e){return M("Submenu",e).then(([n,s])=>new p(n,s))}async setAsWindowsMenuForNSApp(){return t("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return t("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};J(p,D);var P=class extends F{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return M("MenuItem",e).then(([n,s])=>new P(n,s))}},w=class extends I{constructor(e,n){super(e,n,"Check")}static async new(e){return M("Check",e).then(([n,s])=>new w(n,s))}async isChecked(){return t("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return t("plugin:menu|set_checked",{rid:this.rid,checked:e})}},k=class extends I{constructor(e,n){super(e,n,"Icon")}static async new(e){return M("Icon",e).then(([n,s])=>new k(n,s))}async setIcon(e){return t("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return t("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};var Ge=t;return ne(Ke);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/tooling/api/docs/js-api.json b/tooling/api/docs/js-api.json index 0b258746b1b..41f972b7c77 100644 --- a/tooling/api/docs/js-api.json +++ b/tooling/api/docs/js-api.json @@ -1 +1 @@ -{"id":0,"name":"@tauri-apps/api","variant":"project","kind":1,"flags":{},"children":[{"id":1,"name":"event","variant":"declaration","kind":2,"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":36,"name":"TauriEvent","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":49,"name":"MENU","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":59,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L59"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":50,"name":"TRAY","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":60,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L60"}],"type":{"type":"literal","value":"tauri://tray"}},{"id":43,"name":"WINDOW_BLUR","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L53"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":39,"name":"WINDOW_CLOSE_REQUESTED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L49"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":40,"name":"WINDOW_CREATED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":50,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L50"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":41,"name":"WINDOW_DESTROYED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L51"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":46,"name":"WINDOW_FILE_DROP","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L56"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":48,"name":"WINDOW_FILE_DROP_CANCELLED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":58,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L58"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":47,"name":"WINDOW_FILE_DROP_HOVER","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":57,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L57"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":42,"name":"WINDOW_FOCUS","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L52"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":38,"name":"WINDOW_MOVED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L48"}],"type":{"type":"literal","value":"tauri://move"}},{"id":37,"name":"WINDOW_RESIZED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L47"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":44,"name":"WINDOW_SCALE_FACTOR_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L54"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":45,"name":"WINDOW_THEME_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L55"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[49,50,43,39,40,41,46,48,47,42,38,37,44,45]}],"sources":[{"fileName":"event.ts","line":46,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L46"}]},{"id":2,"name":"Event","variant":"declaration","kind":256,"flags":{},"children":[{"id":3,"name":"event","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L16"}],"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":5,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"event.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L20"}],"type":{"type":"intrinsic","name":"number"}},{"id":6,"name":"payload","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L22"}],"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}},{"id":4,"name":"windowLabel","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"event.ts","line":18,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L18"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[3,5,6,4]}],"sources":[{"fileName":"event.ts","line":14,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L14"}],"typeParameters":[{"id":7,"name":"T","variant":"typeParam","kind":131072,"flags":{}}]},{"id":17,"name":"Options","variant":"declaration","kind":256,"flags":{},"children":[{"id":18,"name":"target","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Label of the window the function targets.\n\nWhen listening to events and using this value,\nonly events triggered by the window with the given label are received.\n\nWhen emitting events, only the window with the given label will receive it."}]},"sources":[{"fileName":"event.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L40"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[18]}],"sources":[{"fileName":"event.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L31"}]},{"id":8,"name":"EventCallback","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L25"}],"typeParameters":[{"id":12,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"type":{"type":"reflection","declaration":{"id":9,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":24,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L25"}],"signatures":[{"id":10,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":11,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":2,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Event","package":"@tauri-apps/api"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":16,"name":"EventName","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L29"}],"type":{"type":"union","types":[{"type":"templateLiteral","head":"","tail":[[{"type":"reference","target":36,"name":"TauriEvent","package":"@tauri-apps/api"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}]}]}},{"id":13,"name":"UnlistenFn","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L27"}],"type":{"type":"reflection","declaration":{"id":14,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":18,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L27"}],"signatures":[{"id":15,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":31,"name":"emit","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L165"}],"signatures":[{"id":32,"name":"emit","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend and all Tauri windows."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":165,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L165"}],"parameters":[{"id":33,"name":"event","variant":"param","kind":32768,"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":34,"name":"payload","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}},{"id":35,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":19,"name":"listen","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":100,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L100"}],"signatures":[{"id":20,"name":"listen","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event. The event can be either global or window-specific.\nSee "},{"kind":"inline-tag","tag":"@link","text":"windowLabel","target":4,"tsLinkText":""},{"kind":"text","text":" to check the event source."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":100,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L100"}],"typeParameter":[{"id":21,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":22,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":23,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":24,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":25,"name":"once","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":138,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L138"}],"signatures":[{"id":26,"name":"once","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event. See "},{"kind":"inline-tag","tag":"@link","text":"listen","target":19,"tsLinkText":""},{"kind":"text","text":" for more information."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":138,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L138"}],"typeParameter":[{"id":27,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":28,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":29,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":30,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[36]},{"title":"Interfaces","children":[2,17]},{"title":"Type Aliases","children":[8,16,13]},{"title":"Functions","children":[31,19,25]}],"sources":[{"fileName":"event.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/event.ts#L1"}]},{"id":65,"name":"menu","variant":"declaration","kind":2,"flags":{},"children":[{"id":116,"name":"NativeIcon","variant":"declaration","kind":8,"flags":{},"children":[{"id":117,"name":"Add","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An add item template image."}]},"sources":[{"fileName":"menu.ts","line":61,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L61"}],"type":{"type":"literal","value":"Add"}},{"id":118,"name":"Advanced","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Advanced preferences toolbar icon for the preferences window."}]},"sources":[{"fileName":"menu.ts","line":63,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L63"}],"type":{"type":"literal","value":"Advanced"}},{"id":119,"name":"Bluetooth","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A Bluetooth template image."}]},"sources":[{"fileName":"menu.ts","line":65,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L65"}],"type":{"type":"literal","value":"Bluetooth"}},{"id":120,"name":"Bookmarks","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Bookmarks image suitable for a template."}]},"sources":[{"fileName":"menu.ts","line":67,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L67"}],"type":{"type":"literal","value":"Bookmarks"}},{"id":121,"name":"Caution","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A caution image."}]},"sources":[{"fileName":"menu.ts","line":69,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L69"}],"type":{"type":"literal","value":"Caution"}},{"id":122,"name":"ColorPanel","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A color panel toolbar icon."}]},"sources":[{"fileName":"menu.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L71"}],"type":{"type":"literal","value":"ColorPanel"}},{"id":123,"name":"ColumnView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A column view mode template image."}]},"sources":[{"fileName":"menu.ts","line":73,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L73"}],"type":{"type":"literal","value":"ColumnView"}},{"id":124,"name":"Computer","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A computer icon."}]},"sources":[{"fileName":"menu.ts","line":75,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L75"}],"type":{"type":"literal","value":"Computer"}},{"id":125,"name":"EnterFullScreen","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An enter full-screen mode template image."}]},"sources":[{"fileName":"menu.ts","line":77,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L77"}],"type":{"type":"literal","value":"EnterFullScreen"}},{"id":126,"name":"Everyone","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for all users."}]},"sources":[{"fileName":"menu.ts","line":79,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L79"}],"type":{"type":"literal","value":"Everyone"}},{"id":127,"name":"ExitFullScreen","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An exit full-screen mode template image."}]},"sources":[{"fileName":"menu.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L81"}],"type":{"type":"literal","value":"ExitFullScreen"}},{"id":128,"name":"FlowView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A cover flow view mode template image."}]},"sources":[{"fileName":"menu.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L83"}],"type":{"type":"literal","value":"FlowView"}},{"id":129,"name":"Folder","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A folder image."}]},"sources":[{"fileName":"menu.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L85"}],"type":{"type":"literal","value":"Folder"}},{"id":130,"name":"FolderBurnable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A burnable folder icon."}]},"sources":[{"fileName":"menu.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L87"}],"type":{"type":"literal","value":"FolderBurnable"}},{"id":131,"name":"FolderSmart","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A smart folder icon."}]},"sources":[{"fileName":"menu.ts","line":89,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L89"}],"type":{"type":"literal","value":"FolderSmart"}},{"id":132,"name":"FollowLinkFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A link template image."}]},"sources":[{"fileName":"menu.ts","line":91,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L91"}],"type":{"type":"literal","value":"FollowLinkFreestanding"}},{"id":133,"name":"FontPanel","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A font panel toolbar icon."}]},"sources":[{"fileName":"menu.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L93"}],"type":{"type":"literal","value":"FontPanel"}},{"id":134,"name":"GoLeft","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A "},{"kind":"code","text":"`go back`"},{"kind":"text","text":" template image."}]},"sources":[{"fileName":"menu.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L95"}],"type":{"type":"literal","value":"GoLeft"}},{"id":135,"name":"GoRight","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A "},{"kind":"code","text":"`go forward`"},{"kind":"text","text":" template image."}]},"sources":[{"fileName":"menu.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L97"}],"type":{"type":"literal","value":"GoRight"}},{"id":136,"name":"Home","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Home image suitable for a template."}]},"sources":[{"fileName":"menu.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L99"}],"type":{"type":"literal","value":"Home"}},{"id":137,"name":"IChatTheater","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An iChat Theater template image."}]},"sources":[{"fileName":"menu.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L101"}],"type":{"type":"literal","value":"IChatTheater"}},{"id":138,"name":"IconView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An icon view mode template image."}]},"sources":[{"fileName":"menu.ts","line":103,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L103"}],"type":{"type":"literal","value":"IconView"}},{"id":139,"name":"Info","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An information toolbar icon."}]},"sources":[{"fileName":"menu.ts","line":105,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L105"}],"type":{"type":"literal","value":"Info"}},{"id":140,"name":"InvalidDataFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A template image used to denote invalid data."}]},"sources":[{"fileName":"menu.ts","line":107,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L107"}],"type":{"type":"literal","value":"InvalidDataFreestanding"}},{"id":141,"name":"LeftFacingTriangle","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A generic left-facing triangle template image."}]},"sources":[{"fileName":"menu.ts","line":109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L109"}],"type":{"type":"literal","value":"LeftFacingTriangle"}},{"id":142,"name":"ListView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A list view mode template image."}]},"sources":[{"fileName":"menu.ts","line":111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L111"}],"type":{"type":"literal","value":"ListView"}},{"id":143,"name":"LockLocked","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A locked padlock template image."}]},"sources":[{"fileName":"menu.ts","line":113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L113"}],"type":{"type":"literal","value":"LockLocked"}},{"id":144,"name":"LockUnlocked","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An unlocked padlock template image."}]},"sources":[{"fileName":"menu.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L115"}],"type":{"type":"literal","value":"LockUnlocked"}},{"id":145,"name":"MenuMixedState","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A horizontal dash, for use in menus."}]},"sources":[{"fileName":"menu.ts","line":117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L117"}],"type":{"type":"literal","value":"MenuMixedState"}},{"id":146,"name":"MenuOnState","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A check mark template image, for use in menus."}]},"sources":[{"fileName":"menu.ts","line":119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L119"}],"type":{"type":"literal","value":"MenuOnState"}},{"id":147,"name":"MobileMe","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A MobileMe icon."}]},"sources":[{"fileName":"menu.ts","line":121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L121"}],"type":{"type":"literal","value":"MobileMe"}},{"id":148,"name":"MultipleDocuments","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A drag image for multiple items."}]},"sources":[{"fileName":"menu.ts","line":123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L123"}],"type":{"type":"literal","value":"MultipleDocuments"}},{"id":149,"name":"Network","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A network icon."}]},"sources":[{"fileName":"menu.ts","line":125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L125"}],"type":{"type":"literal","value":"Network"}},{"id":150,"name":"Path","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A path button template image."}]},"sources":[{"fileName":"menu.ts","line":127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L127"}],"type":{"type":"literal","value":"Path"}},{"id":151,"name":"PreferencesGeneral","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"General preferences toolbar icon for the preferences window."}]},"sources":[{"fileName":"menu.ts","line":129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L129"}],"type":{"type":"literal","value":"PreferencesGeneral"}},{"id":152,"name":"QuickLook","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A Quick Look template image."}]},"sources":[{"fileName":"menu.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L131"}],"type":{"type":"literal","value":"QuickLook"}},{"id":154,"name":"Refresh","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A refresh template image."}]},"sources":[{"fileName":"menu.ts","line":135,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L135"}],"type":{"type":"literal","value":"Refresh"}},{"id":153,"name":"RefreshFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A refresh template image."}]},"sources":[{"fileName":"menu.ts","line":133,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L133"}],"type":{"type":"literal","value":"RefreshFreestanding"}},{"id":155,"name":"Remove","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A remove item template image."}]},"sources":[{"fileName":"menu.ts","line":137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L137"}],"type":{"type":"literal","value":"Remove"}},{"id":156,"name":"RevealFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A reveal contents template image."}]},"sources":[{"fileName":"menu.ts","line":139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L139"}],"type":{"type":"literal","value":"RevealFreestanding"}},{"id":157,"name":"RightFacingTriangle","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A generic right-facing triangle template image."}]},"sources":[{"fileName":"menu.ts","line":141,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L141"}],"type":{"type":"literal","value":"RightFacingTriangle"}},{"id":158,"name":"Share","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A share view template image."}]},"sources":[{"fileName":"menu.ts","line":143,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L143"}],"type":{"type":"literal","value":"Share"}},{"id":159,"name":"Slideshow","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A slideshow template image."}]},"sources":[{"fileName":"menu.ts","line":145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L145"}],"type":{"type":"literal","value":"Slideshow"}},{"id":160,"name":"SmartBadge","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A badge for a "},{"kind":"code","text":"`smart`"},{"kind":"text","text":" item."}]},"sources":[{"fileName":"menu.ts","line":147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L147"}],"type":{"type":"literal","value":"SmartBadge"}},{"id":161,"name":"StatusAvailable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small green indicator, similar to iChat’s available image."}]},"sources":[{"fileName":"menu.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L149"}],"type":{"type":"literal","value":"StatusAvailable"}},{"id":162,"name":"StatusNone","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small clear indicator."}]},"sources":[{"fileName":"menu.ts","line":151,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L151"}],"type":{"type":"literal","value":"StatusNone"}},{"id":163,"name":"StatusPartiallyAvailable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small yellow indicator, similar to iChat’s idle image."}]},"sources":[{"fileName":"menu.ts","line":153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L153"}],"type":{"type":"literal","value":"StatusPartiallyAvailable"}},{"id":164,"name":"StatusUnavailable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small red indicator, similar to iChat’s unavailable image."}]},"sources":[{"fileName":"menu.ts","line":155,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L155"}],"type":{"type":"literal","value":"StatusUnavailable"}},{"id":166,"name":"StopProgress","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A stop progress button template image."}]},"sources":[{"fileName":"menu.ts","line":159,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L159"}],"type":{"type":"literal","value":"StopProgress"}},{"id":165,"name":"StopProgressFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A stop progress template image."}]},"sources":[{"fileName":"menu.ts","line":157,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L157"}],"type":{"type":"literal","value":"StopProgressFreestanding"}},{"id":167,"name":"TrashEmpty","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An image of the empty trash can."}]},"sources":[{"fileName":"menu.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L161"}],"type":{"type":"literal","value":"TrashEmpty"}},{"id":168,"name":"TrashFull","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An image of the full trash can."}]},"sources":[{"fileName":"menu.ts","line":163,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L163"}],"type":{"type":"literal","value":"TrashFull"}},{"id":169,"name":"User","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for a single user."}]},"sources":[{"fileName":"menu.ts","line":165,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L165"}],"type":{"type":"literal","value":"User"}},{"id":170,"name":"UserAccounts","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"User account toolbar icon for the preferences window."}]},"sources":[{"fileName":"menu.ts","line":167,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L167"}],"type":{"type":"literal","value":"UserAccounts"}},{"id":171,"name":"UserGroup","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for a group of users."}]},"sources":[{"fileName":"menu.ts","line":169,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L169"}],"type":{"type":"literal","value":"UserGroup"}},{"id":172,"name":"UserGuest","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for guests."}]},"sources":[{"fileName":"menu.ts","line":171,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L171"}],"type":{"type":"literal","value":"UserGuest"}}],"groups":[{"title":"Enumeration Members","children":[117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,153,155,156,157,158,159,160,161,162,163,164,166,165,167,168,169,170,171,172]}],"sources":[{"fileName":"menu.ts","line":59,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L59"}]},{"id":209,"name":"CheckMenuItem","variant":"declaration","kind":128,"flags":{},"children":[{"id":217,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":550,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L550"}],"signatures":[{"id":218,"name":"new CheckMenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":550,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L550"}],"parameters":[{"id":219,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":220,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}},{"id":239,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#id"}},{"id":240,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#kind"}},{"id":245,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#rid"}},{"id":241,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":242,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},{"id":243,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":244,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},{"id":246,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":247,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},{"id":248,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":249,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}},{"id":221,"name":"isChecked","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":560,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L560"}],"signatures":[{"id":222,"name":"isChecked","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":560,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L560"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":229,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"signatures":[{"id":230,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}},{"id":226,"name":"setAccelerator","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"signatures":[{"id":227,"name":"setAccelerator","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"parameters":[{"id":228,"name":"accelerator","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}},{"id":223,"name":"setChecked","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":564,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L564"}],"signatures":[{"id":224,"name":"setChecked","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":564,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L564"}],"parameters":[{"id":225,"name":"checked","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":231,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"signatures":[{"id":232,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"parameters":[{"id":233,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}},{"id":236,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"signatures":[{"id":237,"name":"setText","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"parameters":[{"id":238,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}},{"id":234,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"signatures":[{"id":235,"name":"text","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}},{"id":213,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":214,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":215,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":216,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}},{"id":210,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":554,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L554"}],"signatures":[{"id":211,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":554,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L554"}],"parameters":[{"id":212,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[217]},{"title":"Properties","children":[239,240,245]},{"title":"Accessors","children":[241,243,246]},{"title":"Methods","children":[248,221,229,226,223,231,236,234,213,210]}],"sources":[{"fileName":"menu.ts","line":549,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L549"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4"},"name":"MenuItemBase4","package":"@tauri-apps/api"}]},{"id":250,"name":"IconMenuItem","variant":"declaration","kind":128,"flags":{},"children":[{"id":258,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":577,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L577"}],"signatures":[{"id":259,"name":"new IconMenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":577,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L577"}],"parameters":[{"id":260,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":261,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}},{"id":281,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#id"}},{"id":282,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#kind"}},{"id":287,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#rid"}},{"id":283,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":284,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},{"id":285,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":286,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},{"id":288,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":289,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},{"id":290,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":291,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}},{"id":271,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"signatures":[{"id":272,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}},{"id":268,"name":"setAccelerator","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"signatures":[{"id":269,"name":"setAccelerator","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"parameters":[{"id":270,"name":"accelerator","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}},{"id":273,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"signatures":[{"id":274,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"parameters":[{"id":275,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}},{"id":262,"name":"setIcon","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":587,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L587"}],"signatures":[{"id":263,"name":"setIcon","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":587,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L587"}],"parameters":[{"id":264,"name":"icon","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":265,"name":"setNativeIcon","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":591,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L591"}],"signatures":[{"id":266,"name":"setNativeIcon","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":591,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L591"}],"parameters":[{"id":267,"name":"icon","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":116,"name":"NativeIcon","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":278,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"signatures":[{"id":279,"name":"setText","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"parameters":[{"id":280,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}},{"id":276,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"signatures":[{"id":277,"name":"text","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}},{"id":254,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":255,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":256,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":257,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}},{"id":251,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":581,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L581"}],"signatures":[{"id":252,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":581,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L581"}],"parameters":[{"id":253,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":106,"name":"IconMenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[258]},{"title":"Properties","children":[281,282,287]},{"title":"Accessors","children":[283,285,288]},{"title":"Methods","children":[290,271,268,273,262,265,278,276,254,251]}],"sources":[{"fileName":"menu.ts","line":576,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L576"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4"},"name":"MenuItemBase4","package":"@tauri-apps/api"}]},{"id":357,"name":"Menu","variant":"declaration","kind":128,"flags":{},"children":[{"id":367,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":380,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L380"}],"signatures":[{"id":368,"name":"new Menu","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":380,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L380"}],"parameters":[{"id":369,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":370,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuBase.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuBase.constructor"}},{"id":404,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.#id"}},{"id":405,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.#kind"}},{"id":410,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.#rid"}},{"id":406,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":407,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.id"}},{"id":408,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":409,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.kind"}},{"id":411,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":412,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.rid"}},{"id":376,"name":"append","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":248,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L248"}],"signatures":[{"id":377,"name":"append","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":248,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L248"}],"typeParameter":[{"id":378,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":379,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.append"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.append"}},{"id":413,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":414,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.close"}},{"id":397,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":339,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L339"}],"signatures":[{"id":398,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":339,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L339"}],"parameters":[{"id":399,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.get"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.get"}},{"id":384,"name":"insert","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":284,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L284"}],"signatures":[{"id":385,"name":"insert","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":284,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L284"}],"typeParameter":[{"id":386,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":387,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}},{"id":388,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.insert"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.insert"}},{"id":395,"name":"items","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":330,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L330"}],"signatures":[{"id":396,"name":"items","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":330,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L330"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.items"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.items"}},{"id":400,"name":"popup","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":358,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L358"}],"signatures":[{"id":401,"name":"popup","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":358,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L358"}],"parameters":[{"id":402,"name":"window","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":403,"name":"position","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"number"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.popup"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.popup"}},{"id":380,"name":"prepend","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":266,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L266"}],"signatures":[{"id":381,"name":"prepend","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":266,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L266"}],"typeParameter":[{"id":382,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":383,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.prepend"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.prepend"}},{"id":389,"name":"remove","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":303,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L303"}],"signatures":[{"id":390,"name":"remove","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":303,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L303"}],"parameters":[{"id":391,"name":"item","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.remove"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.remove"}},{"id":392,"name":"removeAt","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":313,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L313"}],"signatures":[{"id":393,"name":"removeAt","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":313,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L313"}],"parameters":[{"id":394,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.removeAt"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.removeAt"}},{"id":371,"name":"setAsAppMenu","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":394,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L394"}],"signatures":[{"id":372,"name":"setAsAppMenu","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":394,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L394"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":373,"name":"setAsWindowMenu","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":401,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L401"}],"signatures":[{"id":374,"name":"setAsWindowMenu","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":401,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L401"}],"parameters":[{"id":375,"name":"window","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":363,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":364,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":365,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":366,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase._new"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase._new"}},{"id":361,"name":"default","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":388,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L388"}],"signatures":[{"id":362,"name":"default","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":388,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L388"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":358,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":384,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L384"}],"signatures":[{"id":359,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":384,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L384"}],"parameters":[{"id":360,"name":"opts","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":68,"name":"MenuOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[367]},{"title":"Properties","children":[404,405,410]},{"title":"Accessors","children":[406,408,411]},{"title":"Methods","children":[376,413,397,384,395,400,380,389,392,371,373,363,361,358]}],"sources":[{"fileName":"menu.ts","line":379,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L379"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase"},"name":"MenuBase","package":"@tauri-apps/api"}]},{"id":173,"name":"MenuItem","variant":"declaration","kind":128,"flags":{},"children":[{"id":181,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":456,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L456"}],"signatures":[{"id":182,"name":"new MenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":456,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L456"}],"parameters":[{"id":183,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":184,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}},{"id":198,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#id"}},{"id":199,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#kind"}},{"id":204,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#rid"}},{"id":200,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":201,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},{"id":202,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":203,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.kind"}},{"id":205,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":206,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},{"id":207,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":208,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}},{"id":188,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"signatures":[{"id":189,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}},{"id":185,"name":"setAccelerator","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"signatures":[{"id":186,"name":"setAccelerator","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":438,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L438"}],"parameters":[{"id":187,"name":"accelerator","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}},{"id":190,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"signatures":[{"id":191,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"parameters":[{"id":192,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}},{"id":195,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"signatures":[{"id":196,"name":"setText","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"parameters":[{"id":197,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}},{"id":193,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"signatures":[{"id":194,"name":"text","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}},{"id":177,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":178,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":179,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":180,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4._new"}},{"id":174,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":460,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L460"}],"signatures":[{"id":175,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":460,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L460"}],"parameters":[{"id":176,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[181]},{"title":"Properties","children":[198,199,204]},{"title":"Accessors","children":[200,202,205]},{"title":"Methods","children":[207,188,185,190,195,193,177,174]}],"sources":[{"fileName":"menu.ts","line":455,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L455"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4"},"name":"MenuItemBase4","package":"@tauri-apps/api"}]},{"id":292,"name":"Submenu","variant":"declaration","kind":128,"flags":{},"children":[{"id":300,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":472,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L472"}],"signatures":[{"id":301,"name":"new Submenu","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":472,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L472"}],"parameters":[{"id":302,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":303,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.constructor"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.constructor"}},{"id":336,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":204,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L204"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.#id"}},{"id":337,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L205"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.#kind"}},{"id":342,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.#rid"}},{"id":338,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"getSignature":{"id":339,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":207,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L207"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.id"}},{"id":340,"name":"kind","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"getSignature":{"id":341,"name":"kind","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":211,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L211"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.kind"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.kind"}},{"id":343,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":344,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.rid"}},{"id":308,"name":"append","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":248,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L248"}],"signatures":[{"id":309,"name":"append","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":248,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L248"}],"typeParameter":[{"id":310,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":311,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":345,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":346,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.close"}},{"id":329,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":339,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L339"}],"signatures":[{"id":330,"name":"get","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":339,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L339"}],"parameters":[{"id":331,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":316,"name":"insert","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":284,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L284"}],"signatures":[{"id":317,"name":"insert","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":284,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L284"}],"typeParameter":[{"id":318,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":319,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}},{"id":320,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":347,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"signatures":[{"id":348,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":424,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L424"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.isEnabled"}},{"id":327,"name":"items","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":330,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L330"}],"signatures":[{"id":328,"name":"items","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":330,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L330"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":332,"name":"popup","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":358,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L358"}],"signatures":[{"id":333,"name":"popup","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":358,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L358"}],"parameters":[{"id":334,"name":"window","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":335,"name":"position","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"number"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":312,"name":"prepend","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":266,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L266"}],"signatures":[{"id":313,"name":"prepend","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":266,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L266"}],"typeParameter":[{"id":314,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":315,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":321,"name":"remove","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":303,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L303"}],"signatures":[{"id":322,"name":"remove","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":303,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L303"}],"parameters":[{"id":323,"name":"item","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":324,"name":"removeAt","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":313,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L313"}],"signatures":[{"id":325,"name":"removeAt","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":313,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L313"}],"parameters":[{"id":326,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":306,"name":"setAsHelpMenuForNSApp","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":486,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L486"}],"signatures":[{"id":307,"name":"setAsHelpMenuForNSApp","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":486,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L486"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":304,"name":"setAsWindowsMenuForNSApp","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":480,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L480"}],"signatures":[{"id":305,"name":"setAsWindowsMenuForNSApp","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":480,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L480"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":349,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"signatures":[{"id":350,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":428,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L428"}],"parameters":[{"id":351,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setEnabled"}},{"id":354,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"signatures":[{"id":355,"name":"setText","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":414,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L414"}],"parameters":[{"id":356,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setText"}},{"id":352,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"signatures":[{"id":353,"name":"text","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":410,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L410"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.text"}},{"id":296,"name":"_new","variant":"declaration","kind":2048,"flags":{"isProtected":true,"isStatic":true},"sources":[{"fileName":"menu.ts","line":221,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"signatures":[{"id":297,"name":"_new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":221,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L221"}],"parameters":[{"id":298,"name":"kind","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"}},{"id":299,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"string"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":293,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":476,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L476"}],"signatures":[{"id":294,"name":"new","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":476,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L476"}],"parameters":[{"id":295,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":79,"name":"SubmenuOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[300]},{"title":"Properties","children":[336,337,342]},{"title":"Accessors","children":[338,340,343]},{"title":"Methods","children":[308,345,329,316,347,327,332,312,321,324,306,304,349,354,352,296,293]}],"sources":[{"fileName":"menu.ts","line":470,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L470"},{"fileName":"menu.ts","line":471,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L471"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3"},"name":"MenuItemBase3","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase"},"name":"MenuBase","package":"@tauri-apps/api"}]},{"id":97,"name":"CheckMenuItemOptions","variant":"declaration","kind":256,"flags":{},"children":[{"id":102,"name":"accelerator","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":451,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L451"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":75,"name":"MenuItemOptions.accelerator"}},{"id":103,"name":"action","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":452,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"reflection","declaration":{"id":104,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"signatures":[{"id":105,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"intrinsic","name":"void"}}]}},"inheritedFrom":{"type":"reference","target":76,"name":"MenuItemOptions.action"}},{"id":98,"name":"checked","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":546,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L546"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":101,"name":"enabled","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":450,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L450"}],"type":{"type":"intrinsic","name":"boolean"},"inheritedFrom":{"type":"reference","target":74,"name":"MenuItemOptions.enabled"}},{"id":99,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":448,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L448"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":72,"name":"MenuItemOptions.id"}},{"id":100,"name":"text","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":449,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L449"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":73,"name":"MenuItemOptions.text"}}],"groups":[{"title":"Properties","children":[102,103,98,101,99,100]}],"sources":[{"fileName":"menu.ts","line":545,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L545"}],"extendedTypes":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}]},{"id":106,"name":"IconMenuItemOptions","variant":"declaration","kind":256,"flags":{},"children":[{"id":112,"name":"accelerator","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":451,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L451"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":75,"name":"MenuItemOptions.accelerator"}},{"id":113,"name":"action","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":452,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"reflection","declaration":{"id":114,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"signatures":[{"id":115,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"intrinsic","name":"void"}}]}},"inheritedFrom":{"type":"reference","target":76,"name":"MenuItemOptions.action"}},{"id":111,"name":"enabled","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":450,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L450"}],"type":{"type":"intrinsic","name":"boolean"},"inheritedFrom":{"type":"reference","target":74,"name":"MenuItemOptions.enabled"}},{"id":107,"name":"icon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":573,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L573"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":109,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":448,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L448"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":72,"name":"MenuItemOptions.id"}},{"id":108,"name":"nativeIcon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":574,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L574"}],"type":{"type":"reference","target":116,"name":"NativeIcon","package":"@tauri-apps/api"}},{"id":110,"name":"text","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":449,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L449"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":73,"name":"MenuItemOptions.text"}}],"groups":[{"title":"Properties","children":[112,113,111,107,109,108,110]}],"sources":[{"fileName":"menu.ts","line":572,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L572"}],"extendedTypes":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}]},{"id":66,"name":"MenuEvent","variant":"declaration","kind":256,"flags":{},"children":[{"id":67,"name":"id","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"menu.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L20"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[67]}],"sources":[{"fileName":"menu.ts","line":19,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L19"}]},{"id":71,"name":"MenuItemOptions","variant":"declaration","kind":256,"flags":{},"children":[{"id":75,"name":"accelerator","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":451,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L451"}],"type":{"type":"intrinsic","name":"string"}},{"id":76,"name":"action","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":452,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"reflection","declaration":{"id":77,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"signatures":[{"id":78,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L452"}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":74,"name":"enabled","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":450,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L450"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":72,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":448,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L448"}],"type":{"type":"intrinsic","name":"string"}},{"id":73,"name":"text","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":449,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L449"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[75,76,74,72,73]}],"sources":[{"fileName":"menu.ts","line":447,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L447"}],"extendedBy":[{"type":"reference","target":97,"name":"CheckMenuItemOptions"},{"type":"reference","target":106,"name":"IconMenuItemOptions"}]},{"id":68,"name":"MenuOptions","variant":"declaration","kind":256,"flags":{},"children":[{"id":69,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":369,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L369"}],"type":{"type":"intrinsic","name":"string"}},{"id":70,"name":"items","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"menu.ts","line":370,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L370"}],"type":{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":209,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":250,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}}],"groups":[{"title":"Properties","children":[69,70]}],"sources":[{"fileName":"menu.ts","line":368,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L368"}]},{"id":80,"name":"PredefinedMenuItemOptions","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"menu.ts","line":495,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L495"}],"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Omit"},"typeArguments":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"},{"type":"union","types":[{"type":"literal","value":"enabled"},{"type":"literal","value":"accelerator"},{"type":"literal","value":"id"},{"type":"literal","value":"action"}]}],"name":"Omit","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys"},{"type":"reflection","declaration":{"id":81,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":82,"name":"item","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"menu.ts","line":499,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L499"}],"type":{"type":"union","types":[{"type":"literal","value":"Separator"},{"type":"literal","value":"Copy"},{"type":"literal","value":"Cut"},{"type":"literal","value":"Paste"},{"type":"literal","value":"SelectAll"},{"type":"literal","value":"Undo"},{"type":"literal","value":"Redo"},{"type":"literal","value":"Minimize"},{"type":"literal","value":"Maximize"},{"type":"literal","value":"Fullscreen"},{"type":"literal","value":"Hide"},{"type":"literal","value":"HideOthers"},{"type":"literal","value":"ShowAll"},{"type":"literal","value":"CloseWindow"},{"type":"literal","value":"Quit"},{"type":"literal","value":"Services"},{"type":"reflection","declaration":{"id":83,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":84,"name":"About","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"menu.ts","line":517,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L517"}],"type":{"type":"reflection","declaration":{"id":85,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":89,"name":"authors","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":521,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L521"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":90,"name":"comments","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":522,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L522"}],"type":{"type":"intrinsic","name":"string"}},{"id":91,"name":"copyright","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":523,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L523"}],"type":{"type":"intrinsic","name":"string"}},{"id":95,"name":"credits","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":527,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L527"}],"type":{"type":"intrinsic","name":"string"}},{"id":96,"name":"icon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":528,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L528"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":92,"name":"license","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":524,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L524"}],"type":{"type":"intrinsic","name":"string"}},{"id":86,"name":"name","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":518,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L518"}],"type":{"type":"intrinsic","name":"string"}},{"id":88,"name":"short_version","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":520,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L520"}],"type":{"type":"intrinsic","name":"string"}},{"id":87,"name":"version","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":519,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L519"}],"type":{"type":"intrinsic","name":"string"}},{"id":93,"name":"website","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":525,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L525"}],"type":{"type":"intrinsic","name":"string"}},{"id":94,"name":"website_label","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":526,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L526"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[89,90,91,95,96,92,86,88,87,93,94]}],"sources":[{"fileName":"menu.ts","line":517,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L517"}]}}}],"groups":[{"title":"Properties","children":[84]}],"sources":[{"fileName":"menu.ts","line":516,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L516"}]}}]}}],"groups":[{"title":"Properties","children":[82]}],"sources":[{"fileName":"menu.ts","line":498,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L498"}]}}]}},{"id":79,"name":"SubmenuOptions","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"menu.ts","line":467,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L467"}],"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Omit"},"typeArguments":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"},{"type":"union","types":[{"type":"literal","value":"accelerator"},{"type":"literal","value":"action"}]}],"name":"Omit","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys"},{"type":"reference","target":68,"name":"MenuOptions","package":"@tauri-apps/api"}]}}],"groups":[{"title":"Enumerations","children":[116]},{"title":"Classes","children":[209,250,357,173,292]},{"title":"Interfaces","children":[97,106,66,71,68]},{"title":"Type Aliases","children":[80,79]}],"sources":[{"fileName":"menu.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/menu.ts#L1"}]},{"id":51,"name":"mocks","variant":"declaration","kind":2,"flags":{},"children":[{"id":63,"name":"clearMocks","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":178,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L178"}],"signatures":[{"id":64,"name":"clearMocks","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"mocks.ts","line":178,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L178"}],"type":{"type":"intrinsic","name":"void"}}]},{"id":52,"name":"mockIPC","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":80,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L80"}],"signatures":[{"id":53,"name":"mockIPC","variant":"signature","kind":4096,"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, payload) => {\n switch (cmd) {\n case \"add\":\n return (payload.a as number) + (payload.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, payload) => {\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"}]}]},"sources":[{"fileName":"mocks.ts","line":80,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L80"}],"parameters":[{"id":54,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":55,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L81"}],"signatures":[{"id":56,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L81"}],"parameters":[{"id":57,"name":"cmd","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":58,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":59,"name":"mockWindows","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":142,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L142"}],"signatures":[{"id":60,"name":"mockWindows","variant":"signature","kind":4096,"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 === \"plugin:event|emit\") {\n console.log('emit event', args?.event, args?.payload);\n }\n});\n\nconst { emit } = await import(\"@tauri-apps/api/event\");\nawait emit('loaded'); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":142,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L142"}],"parameters":[{"id":61,"name":"current","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":62,"name":"additionalWindows","variant":"param","kind":32768,"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":[63,52,59]}],"sources":[{"fileName":"mocks.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/mocks.ts#L1"}]},{"id":415,"name":"path","variant":"declaration","kind":2,"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\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":416,"name":"BaseDirectory","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":432,"name":"AppCache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":16}},{"id":429,"name":"AppConfig","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L32"}],"type":{"type":"literal","value":13}},{"id":430,"name":"AppData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":14}},{"id":431,"name":"AppLocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":15}},{"id":433,"name":"AppLog","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":17}},{"id":417,"name":"Audio","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L20"}],"type":{"type":"literal","value":1}},{"id":418,"name":"Cache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L21"}],"type":{"type":"literal","value":2}},{"id":419,"name":"Config","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L22"}],"type":{"type":"literal","value":3}},{"id":420,"name":"Data","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L23"}],"type":{"type":"literal","value":4}},{"id":434,"name":"Desktop","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":18}},{"id":422,"name":"Document","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L25"}],"type":{"type":"literal","value":6}},{"id":423,"name":"Download","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L26"}],"type":{"type":"literal","value":7}},{"id":435,"name":"Executable","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":19}},{"id":436,"name":"Font","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":20}},{"id":437,"name":"Home","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":21}},{"id":421,"name":"LocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L24"}],"type":{"type":"literal","value":5}},{"id":424,"name":"Picture","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L27"}],"type":{"type":"literal","value":8}},{"id":425,"name":"Public","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L28"}],"type":{"type":"literal","value":9}},{"id":427,"name":"Resource","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L30"}],"type":{"type":"literal","value":11}},{"id":438,"name":"Runtime","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":22}},{"id":428,"name":"Temp","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L31"}],"type":{"type":"literal","value":12}},{"id":439,"name":"Template","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":23}},{"id":426,"name":"Video","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L29"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[432,429,430,431,433,417,418,419,420,434,422,423,435,436,437,421,424,425,427,438,428,439,426]}],"sources":[{"fileName":"path.ts","line":19,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L19"}]},{"id":446,"name":"appCacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":108,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L108"}],"signatures":[{"id":447,"name":"appCacheDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":108,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L108"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":440,"name":"appConfigDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":57,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L57"}],"signatures":[{"id":441,"name":"appConfigDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":57,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L57"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":442,"name":"appDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":74,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L74"}],"signatures":[{"id":443,"name":"appDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":74,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L74"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":444,"name":"appLocalDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":91,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L91"}],"signatures":[{"id":445,"name":"appLocalDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":91,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L91"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":448,"name":"appLogDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":520,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L520"}],"signatures":[{"id":449,"name":"appLogDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":520,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L520"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":450,"name":"audioDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":130,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L130"}],"signatures":[{"id":451,"name":"audioDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":130,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L130"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":506,"name":"basename","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":653,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L653"}],"signatures":[{"id":507,"name":"basename","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":653,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L653"}],"parameters":[{"id":508,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":509,"name":"ext","variant":"param","kind":32768,"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","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":452,"name":"cacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":152,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L152"}],"signatures":[{"id":453,"name":"cacheDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":152,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L152"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":454,"name":"configDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":174,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L174"}],"signatures":[{"id":455,"name":"configDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":174,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L174"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":456,"name":"dataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":196,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L196"}],"signatures":[{"id":457,"name":"dataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":196,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L196"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":489,"name":"delimiter","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":560,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L560"}],"signatures":[{"id":490,"name":"delimiter","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns 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":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":560,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L560"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":458,"name":"desktopDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":218,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L218"}],"signatures":[{"id":459,"name":"desktopDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":218,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L218"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":500,"name":"dirname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":619,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L619"}],"signatures":[{"id":501,"name":"dirname","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":619,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L619"}],"parameters":[{"id":502,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":460,"name":"documentDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":240,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L240"}],"signatures":[{"id":461,"name":"documentDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":240,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L240"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":462,"name":"downloadDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":262,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L262"}],"signatures":[{"id":463,"name":"downloadDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":262,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L262"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":464,"name":"executableDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":284,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L284"}],"signatures":[{"id":465,"name":"executableDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":284,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L284"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":503,"name":"extname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":635,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L635"}],"signatures":[{"id":504,"name":"extname","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":635,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L635"}],"parameters":[{"id":505,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":466,"name":"fontDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":306,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L306"}],"signatures":[{"id":467,"name":"fontDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":306,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L306"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":468,"name":"homeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":328,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L328"}],"signatures":[{"id":469,"name":"homeDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":328,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L328"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":510,"name":"isAbsolute","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":667,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L667"}],"signatures":[{"id":511,"name":"isAbsolute","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":667,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L667"}],"parameters":[{"id":512,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":497,"name":"join","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":604,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L604"}],"signatures":[{"id":498,"name":"join","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":604,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L604"}],"parameters":[{"id":499,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":470,"name":"localDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":350,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L350"}],"signatures":[{"id":471,"name":"localDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":350,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L350"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":494,"name":"normalize","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":589,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L589"}],"signatures":[{"id":495,"name":"normalize","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":589,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L589"}],"parameters":[{"id":496,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":472,"name":"pictureDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":372,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L372"}],"signatures":[{"id":473,"name":"pictureDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":372,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L372"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":474,"name":"publicDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":394,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L394"}],"signatures":[{"id":475,"name":"publicDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":394,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L394"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":491,"name":"resolve","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":574,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L574"}],"signatures":[{"id":492,"name":"resolve","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":574,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L574"}],"parameters":[{"id":493,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":478,"name":"resolveResource","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":431,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L431"}],"signatures":[{"id":479,"name":"resolveResource","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":431,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L431"}],"parameters":[{"id":480,"name":"resourcePath","variant":"param","kind":32768,"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","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":476,"name":"resourceDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":411,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L411"}],"signatures":[{"id":477,"name":"resourceDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":411,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L411"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":481,"name":"runtimeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":454,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L454"}],"signatures":[{"id":482,"name":"runtimeDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":454,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L454"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":487,"name":"sep","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":549,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L549"}],"signatures":[{"id":488,"name":"sep","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns 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":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":549,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L549"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":513,"name":"tempDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":536,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L536"}],"signatures":[{"id":514,"name":"tempDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a temporary directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { tempDir } from '@tauri-apps/api/path';\nconst temp = await tempDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":536,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L536"}],"parameters":[{"id":515,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":483,"name":"templateDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":476,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L476"}],"signatures":[{"id":484,"name":"templateDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":476,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L476"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":485,"name":"videoDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":498,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L498"}],"signatures":[{"id":486,"name":"videoDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":498,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L498"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[416]},{"title":"Functions","children":[446,440,442,444,448,450,506,452,454,456,489,458,500,460,462,464,503,466,468,510,497,470,494,472,474,491,478,476,481,487,513,483,485]}],"sources":[{"fileName":"path.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/path.ts#L1"}]},{"id":516,"name":"tauri","variant":"declaration","kind":2,"flags":{},"comment":{"summary":[{"kind":"text","text":"Invoke your custom commands.\n\nThis package is also accessible with "},{"kind":"code","text":"`window.__TAURI__.tauri`"},{"kind":"text","text":" when ["},{"kind":"code","text":"`build.withGlobalTauri`"},{"kind":"text","text":"](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in "},{"kind":"code","text":"`tauri.conf.json`"},{"kind":"text","text":" is set to "},{"kind":"code","text":"`true`"},{"kind":"text","text":"."}]},"children":[{"id":527,"name":"Channel","variant":"declaration","kind":128,"flags":{},"children":[{"id":528,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L71"}],"signatures":[{"id":529,"name":"new Channel","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L71"}],"typeParameter":[{"id":530,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":527,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Channel","package":"@tauri-apps/api"}}]},{"id":533,"name":"#onmessage","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":67,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L67"}],"type":{"type":"reflection","declaration":{"id":534,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":67,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L67"}],"signatures":[{"id":535,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":67,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L67"}],"parameters":[{"id":536,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":532,"name":"__TAURI_CHANNEL_MARKER__","variant":"declaration","kind":1024,"flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":66,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L66"}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":531,"name":"id","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L64"}],"type":{"type":"intrinsic","name":"number"}},{"id":537,"name":"onmessage","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L77"},{"fileName":"tauri.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L81"}],"getSignature":{"id":538,"name":"onmessage","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L81"}],"type":{"type":"reflection","declaration":{"id":539,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L81"}],"signatures":[{"id":540,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L81"}],"parameters":[{"id":541,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":542,"name":"onmessage","variant":"signature","kind":1048576,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L77"}],"parameters":[{"id":543,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":544,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L77"}],"signatures":[{"id":545,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L77"}],"parameters":[{"id":546,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":547,"name":"toJSON","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L85"}],"signatures":[{"id":548,"name":"toJSON","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L85"}],"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[528]},{"title":"Properties","children":[533,532,531]},{"title":"Accessors","children":[537]},{"title":"Methods","children":[547]}],"sources":[{"fileName":"tauri.ts","line":63,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L63"}],"typeParameters":[{"id":549,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":550,"name":"PluginListener","variant":"declaration","kind":128,"flags":{},"children":[{"id":551,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L95"}],"signatures":[{"id":552,"name":"new PluginListener","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L95"}],"parameters":[{"id":553,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":554,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":555,"name":"channelId","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":550,"name":"PluginListener","package":"@tauri-apps/api"}}]},{"id":558,"name":"channelId","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L93"}],"type":{"type":"intrinsic","name":"number"}},{"id":557,"name":"event","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":92,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L92"}],"type":{"type":"intrinsic","name":"string"}},{"id":556,"name":"plugin","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":91,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L91"}],"type":{"type":"intrinsic","name":"string"}},{"id":559,"name":"unregister","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":101,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L101"}],"signatures":[{"id":560,"name":"unregister","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L101"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[551]},{"title":"Properties","children":[558,557,556]},{"title":"Methods","children":[559]}],"sources":[{"fileName":"tauri.ts","line":90,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L90"}]},{"id":518,"name":"InvokeOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":519,"name":"headers","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L139"}],"type":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.dom.d.ts","qualifiedName":"Headers"},"name":"Headers","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/API/Headers"}]}}],"groups":[{"title":"Properties","children":[519]}],"sources":[{"fileName":"tauri.ts","line":138,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L138"}]},{"id":517,"name":"InvokeArgs","variant":"declaration","kind":4194304,"flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":133,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L133"}],"type":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"},{"type":"array","elementType":{"type":"intrinsic","name":"number"}},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"ArrayBuffer"},"name":"ArrayBuffer","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":561,"name":"addPluginListener","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":116,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L116"}],"signatures":[{"id":562,"name":"addPluginListener","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a listener to a plugin event."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The listener object to stop listening to the events."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":116,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L116"}],"typeParameter":[{"id":563,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":564,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":565,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":566,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":567,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":119,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L119"}],"signatures":[{"id":568,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":119,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L119"}],"parameters":[{"id":569,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":550,"name":"PluginListener","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":576,"name":"convertFileSrc","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":212,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L212"}],"signatures":[{"id":577,"name":"convertFileSrc","variant":"signature","kind":4096,"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' ipc: https://ipc.localhost; 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"}]}]},"sources":[{"fileName":"tauri.ts","line":212,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L212"}],"parameters":[{"id":578,"name":"filePath","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":579,"name":"protocol","variant":"param","kind":32768,"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":570,"name":"invoke","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":157,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L157"}],"signatures":[{"id":571,"name":"invoke","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"tauri.ts","line":157,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L157"}],"typeParameter":[{"id":572,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":573,"name":"cmd","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":574,"name":"args","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","target":517,"name":"InvokeArgs","package":"@tauri-apps/api"},"defaultValue":"{}"},{"id":575,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The request options."}]},"type":{"type":"reference","target":518,"name":"InvokeOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":520,"name":"transformCallback","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":41,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L41"}],"signatures":[{"id":521,"name":"transformCallback","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"tauri.ts","line":41,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L41"}],"parameters":[{"id":522,"name":"callback","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":523,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":42,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L42"}],"signatures":[{"id":524,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":42,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L42"}],"parameters":[{"id":525,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":526,"name":"once","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[527,550]},{"title":"Interfaces","children":[518]},{"title":"Type Aliases","children":[517]},{"title":"Functions","children":[561,576,570,520]}],"sources":[{"fileName":"tauri.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tauri.ts#L1"}]},{"id":580,"name":"tray","variant":"declaration","kind":2,"flags":{},"children":[{"id":601,"name":"TrayIcon","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Tray icon class and associated methods. This type constructor is private,\ninstead, you should use the static method "},{"kind":"inline-tag","tag":"@linkcode","text":"new","target":602,"tsLinkText":""},{"kind":"text","text":".\n\n#### Warning\n\nUnlike Rust, javascript does not have any way to run cleanup code\nwhen an object is being removed by garbage collection, but this tray icon\nwill be cleaned up when the tauri app exists, however if you want to cleanup\nthis object early, you need to call "},{"kind":"inline-tag","tag":"@linkcode","text":"close","target":207,"tsLinkText":""},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```ts\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new({ tooltip: 'awesome tray tooltip' });\ntray.set_tooltip('new tooltip');\n```"}]}]},"children":[{"id":605,"name":"constructor","variant":"declaration","kind":512,"flags":{"isPrivate":true},"sources":[{"fileName":"tray.ts","line":124,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L124"}],"signatures":[{"id":606,"name":"new TrayIcon","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tray.ts","line":124,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L124"}],"parameters":[{"id":607,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":608,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":601,"name":"TrayIcon","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"Resource.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"Resource.constructor"}},{"id":650,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":11,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L11"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.#rid"}},{"id":609,"name":"id","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The id associated with this tray icon."}]},"sources":[{"fileName":"tray.ts","line":122,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L122"}],"type":{"type":"intrinsic","name":"string"}},{"id":651,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"getSignature":{"id":652,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":13,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L13"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.rid"}},{"id":653,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":25,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"signatures":[{"id":654,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/internal/index.ts#L25"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.close"}},{"id":634,"name":"listen","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":247,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L247"}],"signatures":[{"id":635,"name":"listen","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event emitted by the backend that is tied to the current webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new();\nconst unlisten = await tray.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."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"tray.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L247"}],"typeParameter":[{"id":636,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":637,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":638,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":644,"name":"on","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":308,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L308"}],"signatures":[{"id":645,"name":"on","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to this tray icon events."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new();\nconst unlisten = await tray.on((event) => {\n console.log(event)\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":"2.0.0"}]}]},"sources":[{"fileName":"tray.ts","line":308,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L308"}],"parameters":[{"id":646,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reflection","declaration":{"id":647,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tray.ts","line":308,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L308"}],"signatures":[{"id":648,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tray.ts","line":308,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L308"}],"parameters":[{"id":649,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":581,"name":"TrayIconEvent","package":"@tauri-apps/api"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":639,"name":"once","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":278,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L278"}],"signatures":[{"id":640,"name":"once","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event emitted by the backend that is tied to the current webview window."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new();\nconst unlisten = await tray.once('state-initalized', (event) => {\n console.log(`State initalized`);\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":"2.0.0"}]}]},"sources":[{"fileName":"tray.ts","line":278,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L278"}],"typeParameter":[{"id":641,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":642,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":643,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":610,"name":"setIcon","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":148,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L148"}],"signatures":[{"id":611,"name":"setIcon","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets a new tray icon. If "},{"kind":"code","text":"`null`"},{"kind":"text","text":" is provided, it will remove the icon."}]},"sources":[{"fileName":"tray.ts","line":148,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L148"}],"parameters":[{"id":612,"name":"icon","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":628,"name":"setIconAsTemplate","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":210,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L210"}],"signatures":[{"id":629,"name":"setIconAsTemplate","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the current icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**"}]},"sources":[{"fileName":"tray.ts","line":210,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L210"}],"parameters":[{"id":630,"name":"asTemplate","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":613,"name":"setMenu","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":159,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L159"}],"signatures":[{"id":614,"name":"setMenu","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets a new tray menu.\n\n#### Platform-specific:\n\n- **Linux**: once a menu is set it cannot be removed so "},{"kind":"code","text":"`null`"},{"kind":"text","text":" has no effect"}]},"sources":[{"fileName":"tray.ts","line":159,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L159"}],"parameters":[{"id":615,"name":"menu","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":631,"name":"setMenuOnLeftClick","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":218,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L218"}],"signatures":[{"id":632,"name":"setMenuOnLeftClick","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Disable or enable showing the tray menu on left click. **macOS only**."}]},"sources":[{"fileName":"tray.ts","line":218,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L218"}],"parameters":[{"id":633,"name":"onLeft","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":625,"name":"setTempDirPath","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":205,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L205"}],"signatures":[{"id":626,"name":"setTempDirPath","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the tray icon temp dir path. **Linux only**.\n\nOn Linux, we need to write the icon to the disk and usually it will\nbe "},{"kind":"code","text":"`$XDG_RUNTIME_DIR/tray-icon`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$TEMP/tray-icon`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"tray.ts","line":205,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L205"}],"parameters":[{"id":627,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":619,"name":"setTitle","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":190,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L190"}],"signatures":[{"id":620,"name":"setTitle","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the tooltip for this tray icon.\n\n## Platform-specific:\n\n- **Linux:** The title will not be shown unless there is an icon\nas well. The title is useful for numerical and other frequently\nupdated information. In general, it shouldn't be shown unless a\nuser requests it as it can take up a significant amount of space\non the user's panel. This may not be shown in all visualizations.\n- **Windows:** Unsupported"}]},"sources":[{"fileName":"tray.ts","line":190,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L190"}],"parameters":[{"id":621,"name":"title","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":616,"name":"setTooltip","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":174,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L174"}],"signatures":[{"id":617,"name":"setTooltip","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the tooltip for this tray icon.\n\n## Platform-specific:\n\n- **Linux:** Unsupported"}]},"sources":[{"fileName":"tray.ts","line":174,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L174"}],"parameters":[{"id":618,"name":"tooltip","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":622,"name":"setVisible","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":195,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L195"}],"signatures":[{"id":623,"name":"setVisible","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Show or hide this tray icon."}]},"sources":[{"fileName":"tray.ts","line":195,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L195"}],"parameters":[{"id":624,"name":"visible","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"unknown"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":602,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"tray.ts","line":137,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L137"}],"signatures":[{"id":603,"name":"new","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new "},{"kind":"inline-tag","tag":"@linkcode","text":"TrayIcon","target":601,"tsLinkText":""},{"kind":"text","text":"\n\n#### Platform-specific:\n\n- **Linux:** Sometimes the icon won't be visible unless a menu is set.\nSetting an empty "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":357,"tsLinkText":""},{"kind":"text","text":" is enough."}]},"sources":[{"fileName":"tray.ts","line":137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L137"}],"parameters":[{"id":604,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":592,"name":"TrayIconOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":601,"name":"TrayIcon","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[605]},{"title":"Properties","children":[650,609]},{"title":"Accessors","children":[651]},{"title":"Methods","children":[653,634,644,639,610,628,613,631,625,619,616,622,602]}],"sources":[{"fileName":"tray.ts","line":120,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L120"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource"},"name":"Resource","package":"@tauri-apps/api"}]},{"id":581,"name":"TrayIconEvent","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Describes a tray event emitted when a tray icon is clicked\n\n#### Platform-specific:\n\n- **Linux**: Unsupported. The event is not emmited even though the icon is shown,\nthe icon will still show a context menu on right click."}]},"children":[{"id":591,"name":"clickType","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The click type that triggered this event."}]},"sources":[{"fileName":"tray.ts","line":45,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L45"}],"type":{"type":"union","types":[{"type":"literal","value":"Left"},{"type":"literal","value":"Right"},{"type":"literal","value":"Double"}]}},{"id":585,"name":"iconRect","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Position and size of the tray icon."}]},"sources":[{"fileName":"tray.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L34"}],"type":{"type":"reflection","declaration":{"id":586,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":590,"name":"bottom","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The y-coordinate of the lower-right corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":42,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L42"}],"type":{"type":"intrinsic","name":"number"}},{"id":587,"name":"left","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The x-coordinate of the upper-left corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":36,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L36"}],"type":{"type":"intrinsic","name":"number"}},{"id":589,"name":"right","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The x-coordinate of the lower-right corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":40,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L40"}],"type":{"type":"intrinsic","name":"number"}},{"id":588,"name":"top","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The y-coordinate of the upper-left corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":38,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L38"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[590,587,589,588]}],"sources":[{"fileName":"tray.ts","line":34,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L34"}]}}},{"id":582,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Id of the tray icon which triggered this event."}]},"sources":[{"fileName":"tray.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L28"}],"type":{"type":"intrinsic","name":"string"}},{"id":583,"name":"x","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Physical X Position of the click the triggered this event."}]},"sources":[{"fileName":"tray.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L30"}],"type":{"type":"intrinsic","name":"number"}},{"id":584,"name":"y","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Physical Y Position of the click the triggered this event."}]},"sources":[{"fileName":"tray.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L32"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[591,585,582,583,584]}],"sources":[{"fileName":"tray.ts","line":26,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L26"}]},{"id":592,"name":"TrayIconOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"inline-tag","tag":"@link","text":"`TrayIcon`","target":602,"tsLinkText":"`TrayIcon`"},{"kind":"text","text":" creation options"}]},"children":[{"id":595,"name":"icon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon which could be icon bytes or path to the icon file.\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```"}]},"sources":[{"fileName":"tray.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L71"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":599,"name":"iconAsTemplate","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Use the icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**."}]},"sources":[{"fileName":"tray.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L97"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":593,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon id. If undefined, a random one will be assigend"}]},"sources":[{"fileName":"tray.ts","line":58,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L58"}],"type":{"type":"intrinsic","name":"string"}},{"id":594,"name":"menu","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon menu"}]},"sources":[{"fileName":"tray.ts","line":60,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L60"}],"type":{"type":"union","types":[{"type":"reference","target":292,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":357,"name":"Menu","package":"@tauri-apps/api"}]}},{"id":600,"name":"menuOnLeftClieck","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether to show the tray menu on left click or not, default is "},{"kind":"code","text":"`true`"},{"kind":"text","text":". **macOS only**."}]},"sources":[{"fileName":"tray.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L99"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":598,"name":"tempDirPath","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon temp dir path. **Linux only**.\n\nOn Linux, we need to write the icon to the disk and usually it will\nbe "},{"kind":"code","text":"`$XDG_RUNTIME_DIR/tray-icon`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$TEMP/tray-icon`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"tray.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L93"}],"type":{"type":"intrinsic","name":"string"}},{"id":597,"name":"title","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tooltip text\n\n#### Platform-specific\n\n- **Linux:** The title will not be shown unless there is an icon\nas well. The title is useful for numerical and other frequently\nupdated information. In general, it shouldn't be shown unless a\nuser requests it as it can take up a significant amount of space\non the user's panel. This may not be shown in all visualizations.\n- **Windows:** Unsupported."}]},"sources":[{"fileName":"tray.ts","line":86,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L86"}],"type":{"type":"intrinsic","name":"string"}},{"id":596,"name":"tooltip","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon tooltip"}]},"sources":[{"fileName":"tray.ts","line":73,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L73"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[595,599,593,594,600,598,597,596]}],"sources":[{"fileName":"tray.ts","line":56,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L56"}]}],"groups":[{"title":"Classes","children":[601]},{"title":"Interfaces","children":[581,592]}],"sources":[{"fileName":"tray.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/ae721ce3/tooling/api/src/tray.ts#L1"}]}],"groups":[{"title":"Modules","children":[1,65,51,415,516,580]}],"packageName":"@tauri-apps/api","symbolIdMap":{"1":{"sourceFileName":"src/event.ts","qualifiedName":""},"2":{"sourceFileName":"src/event.ts","qualifiedName":"Event"},"3":{"sourceFileName":"src/event.ts","qualifiedName":"Event.event"},"4":{"sourceFileName":"src/event.ts","qualifiedName":"Event.windowLabel"},"5":{"sourceFileName":"src/event.ts","qualifiedName":"Event.id"},"6":{"sourceFileName":"src/event.ts","qualifiedName":"Event.payload"},"7":{"sourceFileName":"src/event.ts","qualifiedName":"Event.T"},"8":{"sourceFileName":"src/event.ts","qualifiedName":"EventCallback"},"9":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"10":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"11":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"12":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"13":{"sourceFileName":"src/event.ts","qualifiedName":"UnlistenFn"},"14":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"15":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"16":{"sourceFileName":"src/event.ts","qualifiedName":"EventName"},"17":{"sourceFileName":"src/event.ts","qualifiedName":"Options"},"18":{"sourceFileName":"src/event.ts","qualifiedName":"Options.target"},"19":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"20":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"21":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"22":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"23":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"24":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"25":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"26":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"27":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"28":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"29":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"30":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"31":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"32":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"33":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"34":{"sourceFileName":"src/event.ts","qualifiedName":"payload"},"35":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"36":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent"},"37":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_RESIZED"},"38":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_MOVED"},"39":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CLOSE_REQUESTED"},"40":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CREATED"},"41":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_DESTROYED"},"42":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FOCUS"},"43":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_BLUR"},"44":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_SCALE_FACTOR_CHANGED"},"45":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_THEME_CHANGED"},"46":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP"},"47":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_HOVER"},"48":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_CANCELLED"},"49":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.MENU"},"50":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.TRAY"},"51":{"sourceFileName":"src/mocks.ts","qualifiedName":""},"52":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"53":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"54":{"sourceFileName":"src/mocks.ts","qualifiedName":"cb"},"55":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"56":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"57":{"sourceFileName":"src/mocks.ts","qualifiedName":"cmd"},"58":{"sourceFileName":"src/mocks.ts","qualifiedName":"payload"},"59":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"60":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"61":{"sourceFileName":"src/mocks.ts","qualifiedName":"current"},"62":{"sourceFileName":"src/mocks.ts","qualifiedName":"additionalWindows"},"63":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"64":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"65":{"sourceFileName":"src/menu.ts","qualifiedName":""},"66":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuEvent"},"67":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuEvent.id"},"68":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuOptions"},"69":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuOptions.id"},"70":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuOptions.items"},"71":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions"},"72":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.id"},"73":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.text"},"74":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.enabled"},"75":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.accelerator"},"76":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.action"},"77":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"78":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"79":{"sourceFileName":"src/menu.ts","qualifiedName":"SubmenuOptions"},"80":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItemOptions"},"81":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"82":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.item"},"83":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"84":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.About"},"85":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"86":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.name"},"87":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.version"},"88":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.short_version"},"89":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.authors"},"90":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.comments"},"91":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.copyright"},"92":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.license"},"93":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.website"},"94":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.website_label"},"95":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.credits"},"96":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.icon"},"97":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItemOptions"},"98":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItemOptions.checked"},"99":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.id"},"100":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.text"},"101":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.enabled"},"102":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.accelerator"},"103":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.action"},"104":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"105":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"106":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItemOptions"},"107":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItemOptions.icon"},"108":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItemOptions.nativeIcon"},"109":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.id"},"110":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.text"},"111":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.enabled"},"112":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.accelerator"},"113":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.action"},"114":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"115":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"116":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon"},"117":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Add"},"118":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Advanced"},"119":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Bluetooth"},"120":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Bookmarks"},"121":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Caution"},"122":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ColorPanel"},"123":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ColumnView"},"124":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Computer"},"125":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.EnterFullScreen"},"126":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Everyone"},"127":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ExitFullScreen"},"128":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FlowView"},"129":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Folder"},"130":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FolderBurnable"},"131":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FolderSmart"},"132":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FollowLinkFreestanding"},"133":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FontPanel"},"134":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.GoLeft"},"135":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.GoRight"},"136":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Home"},"137":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.IChatTheater"},"138":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.IconView"},"139":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Info"},"140":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.InvalidDataFreestanding"},"141":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.LeftFacingTriangle"},"142":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ListView"},"143":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.LockLocked"},"144":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.LockUnlocked"},"145":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MenuMixedState"},"146":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MenuOnState"},"147":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MobileMe"},"148":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MultipleDocuments"},"149":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Network"},"150":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Path"},"151":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.PreferencesGeneral"},"152":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.QuickLook"},"153":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.RefreshFreestanding"},"154":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Refresh"},"155":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Remove"},"156":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.RevealFreestanding"},"157":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.RightFacingTriangle"},"158":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Share"},"159":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Slideshow"},"160":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.SmartBadge"},"161":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusAvailable"},"162":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusNone"},"163":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusPartiallyAvailable"},"164":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusUnavailable"},"165":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StopProgressFreestanding"},"166":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StopProgress"},"167":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.TrashEmpty"},"168":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.TrashFull"},"169":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.User"},"170":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.UserAccounts"},"171":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.UserGroup"},"172":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.UserGuest"},"173":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem"},"174":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem.new"},"175":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem.new"},"176":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"177":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"178":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"179":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"180":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"181":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem.__constructor"},"182":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem"},"183":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"184":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"185":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"186":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"187":{"sourceFileName":"src/menu.ts","qualifiedName":"accelerator"},"188":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"189":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"190":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"191":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"192":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"193":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"194":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"195":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"196":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"197":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"198":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"199":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"200":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"201":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"202":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"203":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"204":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"205":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"206":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"207":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"208":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"209":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem"},"210":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.new"},"211":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.new"},"212":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"213":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"214":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"215":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"216":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"217":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.__constructor"},"218":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem"},"219":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"220":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"221":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.isChecked"},"222":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.isChecked"},"223":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.setChecked"},"224":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.setChecked"},"225":{"sourceFileName":"src/menu.ts","qualifiedName":"checked"},"226":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"227":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"228":{"sourceFileName":"src/menu.ts","qualifiedName":"accelerator"},"229":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"230":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"231":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"232":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"233":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"234":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"235":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"236":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"237":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"238":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"239":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"240":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"241":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"242":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"243":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"244":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"245":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"246":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"247":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"248":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"249":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"250":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem"},"251":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.new"},"252":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.new"},"253":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"254":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"255":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"256":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"257":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"258":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.__constructor"},"259":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem"},"260":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"261":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"262":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setIcon"},"263":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setIcon"},"264":{"sourceFileName":"src/menu.ts","qualifiedName":"icon"},"265":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setNativeIcon"},"266":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setNativeIcon"},"267":{"sourceFileName":"src/menu.ts","qualifiedName":"icon"},"268":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"269":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"270":{"sourceFileName":"src/menu.ts","qualifiedName":"accelerator"},"271":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"272":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"273":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"274":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"275":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"276":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"277":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"278":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"279":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"280":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"281":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"282":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"283":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"284":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"285":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"286":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"287":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"288":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"289":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"290":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"291":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"292":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu"},"293":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.new"},"294":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.new"},"295":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"296":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"297":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"298":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"299":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"300":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.__constructor"},"301":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu"},"302":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"303":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"304":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsWindowsMenuForNSApp"},"305":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsWindowsMenuForNSApp"},"306":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsHelpMenuForNSApp"},"307":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsHelpMenuForNSApp"},"308":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"309":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"310":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"311":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"312":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"313":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"314":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"315":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"316":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"317":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"318":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"319":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"320":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"321":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"322":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"323":{"sourceFileName":"src/menu.ts","qualifiedName":"item"},"324":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"325":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"326":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"327":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"328":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"329":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"330":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"331":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"332":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"333":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"334":{"sourceFileName":"src/menu.ts","qualifiedName":"window"},"335":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"336":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"337":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"338":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"339":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"340":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"341":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"342":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"343":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"344":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"345":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"346":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"347":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"348":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"349":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"350":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"351":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"352":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"353":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"354":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"355":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"356":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"357":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu"},"358":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.new"},"359":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.new"},"360":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"361":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.default"},"362":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.default"},"363":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"364":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase._new"},"365":{"sourceFileName":"src/menu.ts","qualifiedName":"kind"},"366":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"367":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.__constructor"},"368":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu"},"369":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"370":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"371":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsAppMenu"},"372":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsAppMenu"},"373":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsWindowMenu"},"374":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsWindowMenu"},"375":{"sourceFileName":"src/menu.ts","qualifiedName":"window"},"376":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"377":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"378":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"379":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"380":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"381":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"382":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"383":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"384":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"385":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"386":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"387":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"388":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"389":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"390":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"391":{"sourceFileName":"src/menu.ts","qualifiedName":"item"},"392":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"393":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"394":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"395":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"396":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"397":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"398":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"399":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"400":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"401":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"402":{"sourceFileName":"src/menu.ts","qualifiedName":"window"},"403":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"404":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"405":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"406":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"407":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"408":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"409":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.kind"},"410":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"411":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"412":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"413":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"414":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"415":{"sourceFileName":"src/path.ts","qualifiedName":""},"416":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory"},"417":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Audio"},"418":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Cache"},"419":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Config"},"420":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Data"},"421":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.LocalData"},"422":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Document"},"423":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Download"},"424":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Picture"},"425":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Public"},"426":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Video"},"427":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Resource"},"428":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Temp"},"429":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppConfig"},"430":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppData"},"431":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLocalData"},"432":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppCache"},"433":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLog"},"434":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Desktop"},"435":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Executable"},"436":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Font"},"437":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Home"},"438":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Runtime"},"439":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Template"},"440":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"441":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"442":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"443":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"444":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"445":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"446":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"447":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"448":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"449":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"450":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"451":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"452":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"453":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"454":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"455":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"456":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"457":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"458":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"459":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"460":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"461":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"462":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"463":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"464":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"465":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"466":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"467":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"468":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"469":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"470":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"471":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"472":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"473":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"474":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"475":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"476":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"477":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"478":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"479":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"480":{"sourceFileName":"src/path.ts","qualifiedName":"resourcePath"},"481":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"482":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"483":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"484":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"485":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"486":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"487":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"488":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"489":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"490":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"491":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"492":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"493":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"494":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"495":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"496":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"497":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"498":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"499":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"500":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"501":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"502":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"503":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"504":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"505":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"506":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"507":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"508":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"509":{"sourceFileName":"src/path.ts","qualifiedName":"ext"},"510":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"511":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"512":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"513":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"514":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"515":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"516":{"sourceFileName":"src/tauri.ts","qualifiedName":""},"517":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeArgs"},"518":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeOptions"},"519":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeOptions.headers"},"520":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"521":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"522":{"sourceFileName":"src/tauri.ts","qualifiedName":"callback"},"523":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"524":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"525":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"526":{"sourceFileName":"src/tauri.ts","qualifiedName":"once"},"527":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"528":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__constructor"},"529":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"530":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"531":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.id"},"532":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__TAURI_CHANNEL_MARKER__"},"533":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.#onmessage"},"534":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"535":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"536":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"537":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"538":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"539":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"540":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"541":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"542":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"543":{"sourceFileName":"src/tauri.ts","qualifiedName":"handler"},"544":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"545":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"546":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"547":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"548":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"549":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"550":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"551":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.__constructor"},"552":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"553":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"554":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"555":{"sourceFileName":"src/tauri.ts","qualifiedName":"channelId"},"556":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.plugin"},"557":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.event"},"558":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.channelId"},"559":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"560":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"561":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"562":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"563":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"564":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"565":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"566":{"sourceFileName":"src/tauri.ts","qualifiedName":"cb"},"567":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"568":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"569":{"sourceFileName":"src/tauri.ts","qualifiedName":"payload"},"570":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"571":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"572":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"573":{"sourceFileName":"src/tauri.ts","qualifiedName":"cmd"},"574":{"sourceFileName":"src/tauri.ts","qualifiedName":"args"},"575":{"sourceFileName":"src/tauri.ts","qualifiedName":"options"},"576":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"577":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"578":{"sourceFileName":"src/tauri.ts","qualifiedName":"filePath"},"579":{"sourceFileName":"src/tauri.ts","qualifiedName":"protocol"},"580":{"sourceFileName":"src/tray.ts","qualifiedName":""},"581":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent"},"582":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.id"},"583":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.x"},"584":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.y"},"585":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.iconRect"},"586":{"sourceFileName":"src/tray.ts","qualifiedName":"__type"},"587":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.left"},"588":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.top"},"589":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.right"},"590":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.bottom"},"591":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.clickType"},"592":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions"},"593":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.id"},"594":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.menu"},"595":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.icon"},"596":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.tooltip"},"597":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.title"},"598":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.tempDirPath"},"599":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.iconAsTemplate"},"600":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.menuOnLeftClieck"},"601":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon"},"602":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.new"},"603":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.new"},"604":{"sourceFileName":"src/tray.ts","qualifiedName":"options"},"605":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.__constructor"},"606":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon"},"607":{"sourceFileName":"src/tray.ts","qualifiedName":"rid"},"608":{"sourceFileName":"src/tray.ts","qualifiedName":"id"},"609":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.id"},"610":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIcon"},"611":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIcon"},"612":{"sourceFileName":"src/tray.ts","qualifiedName":"icon"},"613":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenu"},"614":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenu"},"615":{"sourceFileName":"src/tray.ts","qualifiedName":"menu"},"616":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTooltip"},"617":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTooltip"},"618":{"sourceFileName":"src/tray.ts","qualifiedName":"tooltip"},"619":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTitle"},"620":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTitle"},"621":{"sourceFileName":"src/tray.ts","qualifiedName":"title"},"622":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setVisible"},"623":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setVisible"},"624":{"sourceFileName":"src/tray.ts","qualifiedName":"visible"},"625":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTempDirPath"},"626":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTempDirPath"},"627":{"sourceFileName":"src/tray.ts","qualifiedName":"path"},"628":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIconAsTemplate"},"629":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIconAsTemplate"},"630":{"sourceFileName":"src/tray.ts","qualifiedName":"asTemplate"},"631":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenuOnLeftClick"},"632":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenuOnLeftClick"},"633":{"sourceFileName":"src/tray.ts","qualifiedName":"onLeft"},"634":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.listen"},"635":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.listen"},"636":{"sourceFileName":"src/tray.ts","qualifiedName":"T"},"637":{"sourceFileName":"src/tray.ts","qualifiedName":"event"},"638":{"sourceFileName":"src/tray.ts","qualifiedName":"handler"},"639":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.once"},"640":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.once"},"641":{"sourceFileName":"src/tray.ts","qualifiedName":"T"},"642":{"sourceFileName":"src/tray.ts","qualifiedName":"event"},"643":{"sourceFileName":"src/tray.ts","qualifiedName":"handler"},"644":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.on"},"645":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.on"},"646":{"sourceFileName":"src/tray.ts","qualifiedName":"handler"},"647":{"sourceFileName":"src/tray.ts","qualifiedName":"__type"},"648":{"sourceFileName":"src/tray.ts","qualifiedName":"__type"},"649":{"sourceFileName":"src/tray.ts","qualifiedName":"event"},"650":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"651":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"652":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"653":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"654":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"}}} \ No newline at end of file +{"id":0,"name":"@tauri-apps/api","variant":"project","kind":1,"flags":{},"children":[{"id":1,"name":"event","variant":"declaration","kind":2,"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":36,"name":"TauriEvent","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.1.0"}]}]},"children":[{"id":49,"name":"MENU","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":59,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L59"}],"type":{"type":"literal","value":"tauri://menu"}},{"id":50,"name":"TRAY","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":60,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L60"}],"type":{"type":"literal","value":"tauri://tray"}},{"id":43,"name":"WINDOW_BLUR","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":53,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L53"}],"type":{"type":"literal","value":"tauri://blur"}},{"id":39,"name":"WINDOW_CLOSE_REQUESTED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":49,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L49"}],"type":{"type":"literal","value":"tauri://close-requested"}},{"id":40,"name":"WINDOW_CREATED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":50,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L50"}],"type":{"type":"literal","value":"tauri://window-created"}},{"id":41,"name":"WINDOW_DESTROYED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":51,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L51"}],"type":{"type":"literal","value":"tauri://destroyed"}},{"id":46,"name":"WINDOW_FILE_DROP","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":56,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L56"}],"type":{"type":"literal","value":"tauri://file-drop"}},{"id":48,"name":"WINDOW_FILE_DROP_CANCELLED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":58,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L58"}],"type":{"type":"literal","value":"tauri://file-drop-cancelled"}},{"id":47,"name":"WINDOW_FILE_DROP_HOVER","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":57,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L57"}],"type":{"type":"literal","value":"tauri://file-drop-hover"}},{"id":42,"name":"WINDOW_FOCUS","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L52"}],"type":{"type":"literal","value":"tauri://focus"}},{"id":38,"name":"WINDOW_MOVED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":48,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L48"}],"type":{"type":"literal","value":"tauri://move"}},{"id":37,"name":"WINDOW_RESIZED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":47,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L47"}],"type":{"type":"literal","value":"tauri://resize"}},{"id":44,"name":"WINDOW_SCALE_FACTOR_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":54,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L54"}],"type":{"type":"literal","value":"tauri://scale-change"}},{"id":45,"name":"WINDOW_THEME_CHANGED","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"event.ts","line":55,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L55"}],"type":{"type":"literal","value":"tauri://theme-changed"}}],"groups":[{"title":"Enumeration Members","children":[49,50,43,39,40,41,46,48,47,42,38,37,44,45]}],"sources":[{"fileName":"event.ts","line":46,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L46"}]},{"id":2,"name":"Event","variant":"declaration","kind":256,"flags":{},"children":[{"id":3,"name":"event","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event name"}]},"sources":[{"fileName":"event.ts","line":16,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L16"}],"type":{"type":"reference","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":5,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event identifier used to unlisten"}]},"sources":[{"fileName":"event.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L20"}],"type":{"type":"intrinsic","name":"number"}},{"id":6,"name":"payload","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event payload"}]},"sources":[{"fileName":"event.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L22"}],"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}},{"id":4,"name":"windowLabel","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The label of the window that emitted this event."}]},"sources":[{"fileName":"event.ts","line":18,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L18"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[3,5,6,4]}],"sources":[{"fileName":"event.ts","line":14,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L14"}],"typeParameters":[{"id":7,"name":"T","variant":"typeParam","kind":131072,"flags":{}}]},{"id":17,"name":"Options","variant":"declaration","kind":256,"flags":{},"children":[{"id":18,"name":"target","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Label of the window the function targets.\n\nWhen listening to events and using this value,\nonly events triggered by the window with the given label are received.\n\nWhen emitting events, only the window with the given label will receive it."}]},"sources":[{"fileName":"event.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L40"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[18]}],"sources":[{"fileName":"event.ts","line":31,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L31"}]},{"id":8,"name":"EventCallback","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L25"}],"typeParameters":[{"id":12,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"type":{"type":"reflection","declaration":{"id":9,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":25,"character":24,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L25"}],"signatures":[{"id":10,"name":"__type","variant":"signature","kind":4096,"flags":{},"parameters":[{"id":11,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":2,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Event","package":"@tauri-apps/api"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":16,"name":"EventName","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":29,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L29"}],"type":{"type":"union","types":[{"type":"templateLiteral","head":"","tail":[[{"type":"reference","target":36,"name":"TauriEvent","package":"@tauri-apps/api"},""]]},{"type":"intersection","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"never"},{"type":"intrinsic","name":"never"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}]}]}},{"id":13,"name":"UnlistenFn","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L27"}],"type":{"type":"reflection","declaration":{"id":14,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"event.ts","line":27,"character":18,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L27"}],"signatures":[{"id":15,"name":"__type","variant":"signature","kind":4096,"flags":{},"type":{"type":"intrinsic","name":"void"}}]}}},{"id":31,"name":"emit","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":165,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L165"}],"signatures":[{"id":32,"name":"emit","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Emits an event to the backend and all Tauri windows."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":165,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L165"}],"parameters":[{"id":33,"name":"event","variant":"param","kind":32768,"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":34,"name":"payload","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"intrinsic","name":"unknown"}},{"id":35,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":19,"name":"listen","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":100,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L100"}],"signatures":[{"id":20,"name":"listen","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an event. The event can be either global or window-specific.\nSee "},{"kind":"inline-tag","tag":"@link","text":"windowLabel","target":4,"tsLinkText":""},{"kind":"text","text":" to check the event source."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":100,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L100"}],"typeParameter":[{"id":21,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":22,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":23,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler callback."}]},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":24,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":25,"name":"once","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"event.ts","line":138,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L138"}],"signatures":[{"id":26,"name":"once","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to an one-off event. See "},{"kind":"inline-tag","tag":"@link","text":"listen","target":19,"tsLinkText":""},{"kind":"text","text":" for more information."}],"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"}]}]},"sources":[{"fileName":"event.ts","line":138,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L138"}],"typeParameter":[{"id":27,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":28,"name":"event","variant":"param","kind":32768,"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","target":16,"name":"EventName","package":"@tauri-apps/api"}},{"id":29,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":8,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"EventCallback","package":"@tauri-apps/api"}},{"id":30,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":17,"name":"Options","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[36]},{"title":"Interfaces","children":[2,17]},{"title":"Type Aliases","children":[8,16,13]},{"title":"Functions","children":[31,19,25]}],"sources":[{"fileName":"event.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/event.ts#L1"}]},{"id":65,"name":"menu","variant":"declaration","kind":2,"flags":{},"children":[{"id":116,"name":"NativeIcon","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[{"kind":"text","text":"A native Icon to be used for the menu item\n\n#### Platform-specific:\n\n- **Windows / Linux**: Unsupported."}]},"children":[{"id":117,"name":"Add","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An add item template image."}]},"sources":[{"fileName":"menu.ts","line":73,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L73"}],"type":{"type":"literal","value":"Add"}},{"id":118,"name":"Advanced","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Advanced preferences toolbar icon for the preferences window."}]},"sources":[{"fileName":"menu.ts","line":75,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L75"}],"type":{"type":"literal","value":"Advanced"}},{"id":119,"name":"Bluetooth","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A Bluetooth template image."}]},"sources":[{"fileName":"menu.ts","line":77,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L77"}],"type":{"type":"literal","value":"Bluetooth"}},{"id":120,"name":"Bookmarks","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Bookmarks image suitable for a template."}]},"sources":[{"fileName":"menu.ts","line":79,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L79"}],"type":{"type":"literal","value":"Bookmarks"}},{"id":121,"name":"Caution","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A caution image."}]},"sources":[{"fileName":"menu.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L81"}],"type":{"type":"literal","value":"Caution"}},{"id":122,"name":"ColorPanel","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A color panel toolbar icon."}]},"sources":[{"fileName":"menu.ts","line":83,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L83"}],"type":{"type":"literal","value":"ColorPanel"}},{"id":123,"name":"ColumnView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A column view mode template image."}]},"sources":[{"fileName":"menu.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L85"}],"type":{"type":"literal","value":"ColumnView"}},{"id":124,"name":"Computer","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A computer icon."}]},"sources":[{"fileName":"menu.ts","line":87,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L87"}],"type":{"type":"literal","value":"Computer"}},{"id":125,"name":"EnterFullScreen","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An enter full-screen mode template image."}]},"sources":[{"fileName":"menu.ts","line":89,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L89"}],"type":{"type":"literal","value":"EnterFullScreen"}},{"id":126,"name":"Everyone","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for all users."}]},"sources":[{"fileName":"menu.ts","line":91,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L91"}],"type":{"type":"literal","value":"Everyone"}},{"id":127,"name":"ExitFullScreen","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An exit full-screen mode template image."}]},"sources":[{"fileName":"menu.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L93"}],"type":{"type":"literal","value":"ExitFullScreen"}},{"id":128,"name":"FlowView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A cover flow view mode template image."}]},"sources":[{"fileName":"menu.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L95"}],"type":{"type":"literal","value":"FlowView"}},{"id":129,"name":"Folder","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A folder image."}]},"sources":[{"fileName":"menu.ts","line":97,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L97"}],"type":{"type":"literal","value":"Folder"}},{"id":130,"name":"FolderBurnable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A burnable folder icon."}]},"sources":[{"fileName":"menu.ts","line":99,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L99"}],"type":{"type":"literal","value":"FolderBurnable"}},{"id":131,"name":"FolderSmart","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A smart folder icon."}]},"sources":[{"fileName":"menu.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L101"}],"type":{"type":"literal","value":"FolderSmart"}},{"id":132,"name":"FollowLinkFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A link template image."}]},"sources":[{"fileName":"menu.ts","line":103,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L103"}],"type":{"type":"literal","value":"FollowLinkFreestanding"}},{"id":133,"name":"FontPanel","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A font panel toolbar icon."}]},"sources":[{"fileName":"menu.ts","line":105,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L105"}],"type":{"type":"literal","value":"FontPanel"}},{"id":134,"name":"GoLeft","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A "},{"kind":"code","text":"`go back`"},{"kind":"text","text":" template image."}]},"sources":[{"fileName":"menu.ts","line":107,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L107"}],"type":{"type":"literal","value":"GoLeft"}},{"id":135,"name":"GoRight","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A "},{"kind":"code","text":"`go forward`"},{"kind":"text","text":" template image."}]},"sources":[{"fileName":"menu.ts","line":109,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L109"}],"type":{"type":"literal","value":"GoRight"}},{"id":136,"name":"Home","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Home image suitable for a template."}]},"sources":[{"fileName":"menu.ts","line":111,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L111"}],"type":{"type":"literal","value":"Home"}},{"id":137,"name":"IChatTheater","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An iChat Theater template image."}]},"sources":[{"fileName":"menu.ts","line":113,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L113"}],"type":{"type":"literal","value":"IChatTheater"}},{"id":138,"name":"IconView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An icon view mode template image."}]},"sources":[{"fileName":"menu.ts","line":115,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L115"}],"type":{"type":"literal","value":"IconView"}},{"id":139,"name":"Info","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An information toolbar icon."}]},"sources":[{"fileName":"menu.ts","line":117,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L117"}],"type":{"type":"literal","value":"Info"}},{"id":140,"name":"InvalidDataFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A template image used to denote invalid data."}]},"sources":[{"fileName":"menu.ts","line":119,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L119"}],"type":{"type":"literal","value":"InvalidDataFreestanding"}},{"id":141,"name":"LeftFacingTriangle","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A generic left-facing triangle template image."}]},"sources":[{"fileName":"menu.ts","line":121,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L121"}],"type":{"type":"literal","value":"LeftFacingTriangle"}},{"id":142,"name":"ListView","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A list view mode template image."}]},"sources":[{"fileName":"menu.ts","line":123,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L123"}],"type":{"type":"literal","value":"ListView"}},{"id":143,"name":"LockLocked","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A locked padlock template image."}]},"sources":[{"fileName":"menu.ts","line":125,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L125"}],"type":{"type":"literal","value":"LockLocked"}},{"id":144,"name":"LockUnlocked","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An unlocked padlock template image."}]},"sources":[{"fileName":"menu.ts","line":127,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L127"}],"type":{"type":"literal","value":"LockUnlocked"}},{"id":145,"name":"MenuMixedState","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A horizontal dash, for use in menus."}]},"sources":[{"fileName":"menu.ts","line":129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L129"}],"type":{"type":"literal","value":"MenuMixedState"}},{"id":146,"name":"MenuOnState","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A check mark template image, for use in menus."}]},"sources":[{"fileName":"menu.ts","line":131,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L131"}],"type":{"type":"literal","value":"MenuOnState"}},{"id":147,"name":"MobileMe","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A MobileMe icon."}]},"sources":[{"fileName":"menu.ts","line":133,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L133"}],"type":{"type":"literal","value":"MobileMe"}},{"id":148,"name":"MultipleDocuments","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A drag image for multiple items."}]},"sources":[{"fileName":"menu.ts","line":135,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L135"}],"type":{"type":"literal","value":"MultipleDocuments"}},{"id":149,"name":"Network","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A network icon."}]},"sources":[{"fileName":"menu.ts","line":137,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L137"}],"type":{"type":"literal","value":"Network"}},{"id":150,"name":"Path","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A path button template image."}]},"sources":[{"fileName":"menu.ts","line":139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L139"}],"type":{"type":"literal","value":"Path"}},{"id":151,"name":"PreferencesGeneral","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"General preferences toolbar icon for the preferences window."}]},"sources":[{"fileName":"menu.ts","line":141,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L141"}],"type":{"type":"literal","value":"PreferencesGeneral"}},{"id":152,"name":"QuickLook","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A Quick Look template image."}]},"sources":[{"fileName":"menu.ts","line":143,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L143"}],"type":{"type":"literal","value":"QuickLook"}},{"id":154,"name":"Refresh","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A refresh template image."}]},"sources":[{"fileName":"menu.ts","line":147,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L147"}],"type":{"type":"literal","value":"Refresh"}},{"id":153,"name":"RefreshFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A refresh template image."}]},"sources":[{"fileName":"menu.ts","line":145,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L145"}],"type":{"type":"literal","value":"RefreshFreestanding"}},{"id":155,"name":"Remove","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A remove item template image."}]},"sources":[{"fileName":"menu.ts","line":149,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L149"}],"type":{"type":"literal","value":"Remove"}},{"id":156,"name":"RevealFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A reveal contents template image."}]},"sources":[{"fileName":"menu.ts","line":151,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L151"}],"type":{"type":"literal","value":"RevealFreestanding"}},{"id":157,"name":"RightFacingTriangle","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A generic right-facing triangle template image."}]},"sources":[{"fileName":"menu.ts","line":153,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L153"}],"type":{"type":"literal","value":"RightFacingTriangle"}},{"id":158,"name":"Share","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A share view template image."}]},"sources":[{"fileName":"menu.ts","line":155,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L155"}],"type":{"type":"literal","value":"Share"}},{"id":159,"name":"Slideshow","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A slideshow template image."}]},"sources":[{"fileName":"menu.ts","line":157,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L157"}],"type":{"type":"literal","value":"Slideshow"}},{"id":160,"name":"SmartBadge","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A badge for a "},{"kind":"code","text":"`smart`"},{"kind":"text","text":" item."}]},"sources":[{"fileName":"menu.ts","line":159,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L159"}],"type":{"type":"literal","value":"SmartBadge"}},{"id":161,"name":"StatusAvailable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small green indicator, similar to iChat’s available image."}]},"sources":[{"fileName":"menu.ts","line":161,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L161"}],"type":{"type":"literal","value":"StatusAvailable"}},{"id":162,"name":"StatusNone","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small clear indicator."}]},"sources":[{"fileName":"menu.ts","line":163,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L163"}],"type":{"type":"literal","value":"StatusNone"}},{"id":163,"name":"StatusPartiallyAvailable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small yellow indicator, similar to iChat’s idle image."}]},"sources":[{"fileName":"menu.ts","line":165,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L165"}],"type":{"type":"literal","value":"StatusPartiallyAvailable"}},{"id":164,"name":"StatusUnavailable","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Small red indicator, similar to iChat’s unavailable image."}]},"sources":[{"fileName":"menu.ts","line":167,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L167"}],"type":{"type":"literal","value":"StatusUnavailable"}},{"id":166,"name":"StopProgress","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A stop progress button template image."}]},"sources":[{"fileName":"menu.ts","line":171,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L171"}],"type":{"type":"literal","value":"StopProgress"}},{"id":165,"name":"StopProgressFreestanding","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"A stop progress template image."}]},"sources":[{"fileName":"menu.ts","line":169,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L169"}],"type":{"type":"literal","value":"StopProgressFreestanding"}},{"id":167,"name":"TrashEmpty","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An image of the empty trash can."}]},"sources":[{"fileName":"menu.ts","line":173,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L173"}],"type":{"type":"literal","value":"TrashEmpty"}},{"id":168,"name":"TrashFull","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"An image of the full trash can."}]},"sources":[{"fileName":"menu.ts","line":175,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L175"}],"type":{"type":"literal","value":"TrashFull"}},{"id":169,"name":"User","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for a single user."}]},"sources":[{"fileName":"menu.ts","line":177,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L177"}],"type":{"type":"literal","value":"User"}},{"id":170,"name":"UserAccounts","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"User account toolbar icon for the preferences window."}]},"sources":[{"fileName":"menu.ts","line":179,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L179"}],"type":{"type":"literal","value":"UserAccounts"}},{"id":171,"name":"UserGroup","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for a group of users."}]},"sources":[{"fileName":"menu.ts","line":181,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L181"}],"type":{"type":"literal","value":"UserGroup"}},{"id":172,"name":"UserGuest","variant":"declaration","kind":16,"flags":{},"comment":{"summary":[{"kind":"text","text":"Permissions for guests."}]},"sources":[{"fileName":"menu.ts","line":183,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L183"}],"type":{"type":"literal","value":"UserGuest"}}],"groups":[{"title":"Enumeration Members","children":[117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,154,153,155,156,157,158,159,160,161,162,163,164,166,165,167,168,169,170,171,172]}],"sources":[{"fileName":"menu.ts","line":71,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L71"}]},{"id":205,"name":"CheckMenuItem","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"A chcek menu item inside a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":" or "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":"\nand usually contains a text and a check mark or a similar toggle\nthat corresponds to a checked and unchecked states."}]},"children":[{"id":209,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":726,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L726"}],"signatures":[{"id":210,"name":"new CheckMenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":726,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L726"}],"parameters":[{"id":211,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":212,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}},{"id":231,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":243,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L243"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#id"}},{"id":232,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":244,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L244"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#kind"}},{"id":237,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":15,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L15"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#rid"}},{"id":233,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"getSignature":{"id":234,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},{"id":238,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"getSignature":{"id":239,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},{"id":240,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":29,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"signatures":[{"id":241,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}},{"id":213,"name":"isChecked","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":738,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L738"}],"signatures":[{"id":214,"name":"isChecked","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether this item is checked or not."}]},"sources":[{"fileName":"menu.ts","line":738,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L738"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":221,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":493,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L493"}],"signatures":[{"id":222,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether this item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":493,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L493"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}},{"id":218,"name":"setAccelerator","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":509,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L509"}],"signatures":[{"id":219,"name":"setAccelerator","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the accelerator for this menu item."}]},"sources":[{"fileName":"menu.ts","line":509,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L509"}],"parameters":[{"id":220,"name":"accelerator","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}},{"id":215,"name":"setChecked","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":743,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L743"}],"signatures":[{"id":216,"name":"setChecked","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets whether this item is checked or not."}]},"sources":[{"fileName":"menu.ts","line":743,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L743"}],"parameters":[{"id":217,"name":"checked","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":223,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":498,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L498"}],"signatures":[{"id":224,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets whether this item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":498,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L498"}],"parameters":[{"id":225,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}},{"id":228,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":482,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"signatures":[{"id":229,"name":"setText","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the text for this item."}]},"sources":[{"fileName":"menu.ts","line":482,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"parameters":[{"id":230,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}},{"id":226,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":477,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"signatures":[{"id":227,"name":"text","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the text of this item."}]},"sources":[{"fileName":"menu.ts","line":477,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}},{"id":206,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":731,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L731"}],"signatures":[{"id":207,"name":"new","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Create a new check menu item."}]},"sources":[{"fileName":"menu.ts","line":731,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L731"}],"parameters":[{"id":208,"name":"opts","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[209]},{"title":"Properties","children":[231,232,237]},{"title":"Accessors","children":[233,238]},{"title":"Methods","children":[240,213,221,218,215,223,228,226,206]}],"sources":[{"fileName":"menu.ts","line":725,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L725"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4"},"name":"MenuItemBase4","package":"@tauri-apps/api"}]},{"id":266,"name":"IconMenuItem","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"An icon menu item inside a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":" or "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":"\nand usually contains an icon and a text."}]},"children":[{"id":270,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":772,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L772"}],"signatures":[{"id":271,"name":"new IconMenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":772,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L772"}],"parameters":[{"id":272,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":273,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}},{"id":293,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":243,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L243"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#id"}},{"id":294,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":244,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L244"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#kind"}},{"id":299,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":15,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L15"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#rid"}},{"id":295,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"getSignature":{"id":296,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},{"id":300,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"getSignature":{"id":301,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},{"id":302,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":29,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"signatures":[{"id":303,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}},{"id":283,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":493,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L493"}],"signatures":[{"id":284,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether this item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":493,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L493"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}},{"id":280,"name":"setAccelerator","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":509,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L509"}],"signatures":[{"id":281,"name":"setAccelerator","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the accelerator for this menu item."}]},"sources":[{"fileName":"menu.ts","line":509,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L509"}],"parameters":[{"id":282,"name":"accelerator","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}},{"id":285,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":498,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L498"}],"signatures":[{"id":286,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets whether this item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":498,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L498"}],"parameters":[{"id":287,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}},{"id":274,"name":"setIcon","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":782,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L782"}],"signatures":[{"id":275,"name":"setIcon","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets an icon for this icon menu item"}]},"sources":[{"fileName":"menu.ts","line":782,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L782"}],"parameters":[{"id":276,"name":"icon","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":277,"name":"setNativeIcon","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":787,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L787"}],"signatures":[{"id":278,"name":"setNativeIcon","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets a native icon for this icon menu item"}]},"sources":[{"fileName":"menu.ts","line":787,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L787"}],"parameters":[{"id":279,"name":"icon","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":116,"name":"NativeIcon","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":290,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":482,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"signatures":[{"id":291,"name":"setText","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the text for this item."}]},"sources":[{"fileName":"menu.ts","line":482,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"parameters":[{"id":292,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}},{"id":288,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":477,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"signatures":[{"id":289,"name":"text","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the text of this item."}]},"sources":[{"fileName":"menu.ts","line":477,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}},{"id":267,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":777,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L777"}],"signatures":[{"id":268,"name":"new","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Create a new icon menu item."}]},"sources":[{"fileName":"menu.ts","line":777,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L777"}],"parameters":[{"id":269,"name":"opts","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":94,"name":"IconMenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[270]},{"title":"Properties","children":[293,294,299]},{"title":"Accessors","children":[295,300]},{"title":"Methods","children":[302,283,280,285,274,277,290,288,267]}],"sources":[{"fileName":"menu.ts","line":771,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L771"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4"},"name":"MenuItemBase4","package":"@tauri-apps/api"}]},{"id":365,"name":"Menu","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"A type that is either a menu bar on the window\non Windows and Linux or as a global menu in the menubar on macOS."}]},"children":[{"id":371,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":430,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L430"}],"signatures":[{"id":372,"name":"new Menu","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":430,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L430"}],"parameters":[{"id":373,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":374,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":365,"name":"Menu","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuBase.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuBase.constructor"}},{"id":408,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":243,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L243"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.#id"}},{"id":409,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":244,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L244"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.#kind"}},{"id":414,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":15,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L15"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.#rid"}},{"id":410,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"getSignature":{"id":411,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.id"}},{"id":415,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"getSignature":{"id":416,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.rid"}},{"id":380,"name":"append","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":271,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L271"}],"signatures":[{"id":381,"name":"append","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Add a menu item to the end of this menu.\n\n## Platform-spcific:\n\n- **macOS:** Only "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":"s can be added to a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":"."}]},"sources":[{"fileName":"menu.ts","line":271,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L271"}],"typeParameter":[{"id":382,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":383,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.append"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.append"}},{"id":417,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":29,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"signatures":[{"id":418,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.close"}},{"id":401,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":382,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L382"}],"signatures":[{"id":402,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Retrieves the menu item matching the given identifier."}]},"sources":[{"fileName":"menu.ts","line":382,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L382"}],"parameters":[{"id":403,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.get"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.get"}},{"id":388,"name":"insert","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":321,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L321"}],"signatures":[{"id":389,"name":"insert","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Add a menu item to the specified position in this menu.\n\n## Platform-spcific:\n\n- **macOS:** Only "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":"s can be added to a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":"."}]},"sources":[{"fileName":"menu.ts","line":321,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L321"}],"typeParameter":[{"id":390,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":391,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}},{"id":392,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.insert"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.insert"}},{"id":399,"name":"items","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":370,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L370"}],"signatures":[{"id":400,"name":"items","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a list of menu items that has been added to this menu."}]},"sources":[{"fileName":"menu.ts","line":370,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L370"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.items"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.items"}},{"id":404,"name":"popup","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":406,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L406"}],"signatures":[{"id":405,"name":"popup","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Popup this menu as a context menu on the specified window.\n\nIf the position, is provided, it is relative to the window's top-left corner."}]},"sources":[{"fileName":"menu.ts","line":406,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L406"}],"parameters":[{"id":406,"name":"window","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":407,"name":"position","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"number"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.popup"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.popup"}},{"id":384,"name":"prepend","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":296,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L296"}],"signatures":[{"id":385,"name":"prepend","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Add a menu item to the beginning of this menu.\n\n## Platform-spcific:\n\n- **macOS:** Only "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":"s can be added to a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":"."}]},"sources":[{"fileName":"menu.ts","line":296,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L296"}],"typeParameter":[{"id":386,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":387,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.prepend"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.prepend"}},{"id":393,"name":"remove","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":341,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L341"}],"signatures":[{"id":394,"name":"remove","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Remove a menu item from this menu."}]},"sources":[{"fileName":"menu.ts","line":341,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L341"}],"parameters":[{"id":395,"name":"item","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.remove"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.remove"}},{"id":396,"name":"removeAt","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":352,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L352"}],"signatures":[{"id":397,"name":"removeAt","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Remove a menu item from this menu at the specified position."}]},"sources":[{"fileName":"menu.ts","line":352,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L352"}],"parameters":[{"id":398,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.removeAt"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuBase.removeAt"}},{"id":375,"name":"setAsAppMenu","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":452,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L452"}],"signatures":[{"id":376,"name":"setAsAppMenu","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the app-wide menu and returns the previous one.\n\nIf a window was not created with an explicit menu or had one set explicitly,\nthis menu will be assigned to it."}]},"sources":[{"fileName":"menu.ts","line":452,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L452"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":365,"name":"Menu","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":377,"name":"setAsWindowMenu","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":467,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L467"}],"signatures":[{"id":378,"name":"setAsWindowMenu","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the window menu and returns the previous one.\n\n#### Platform-specific:\n\n- **macOS:** Unsupported. The menu on macOS is app-wide and not specific to one\nwindow, if you need to set it, use "},{"kind":"inline-tag","tag":"@linkcode","text":"setAsAppMenu","target":375,"tsLinkText":""},{"kind":"text","text":" instead."}]},"sources":[{"fileName":"menu.ts","line":467,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L467"}],"parameters":[{"id":379,"name":"window","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":365,"name":"Menu","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":369,"name":"default","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":440,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L440"}],"signatures":[{"id":370,"name":"default","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Create a default menu."}]},"sources":[{"fileName":"menu.ts","line":440,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L440"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":365,"name":"Menu","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":366,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":435,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L435"}],"signatures":[{"id":367,"name":"new","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Create a new menu."}]},"sources":[{"fileName":"menu.ts","line":435,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L435"}],"parameters":[{"id":368,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":68,"name":"MenuOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":365,"name":"Menu","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[371]},{"title":"Properties","children":[408,409,414]},{"title":"Accessors","children":[410,415]},{"title":"Methods","children":[380,417,401,388,399,404,384,393,396,375,377,369,366]}],"sources":[{"fileName":"menu.ts","line":429,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L429"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase"},"name":"MenuBase","package":"@tauri-apps/api"}]},{"id":173,"name":"MenuItem","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"A menu item inside a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":" or "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":" and contains only text."}]},"children":[{"id":177,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":534,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L534"}],"signatures":[{"id":178,"name":"new MenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":534,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L534"}],"parameters":[{"id":179,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":180,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase4.constructor"}},{"id":194,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":243,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L243"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#id"}},{"id":195,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":244,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L244"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#kind"}},{"id":200,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":15,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L15"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.#rid"}},{"id":196,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"getSignature":{"id":197,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.id"}},{"id":201,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"getSignature":{"id":202,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.rid"}},{"id":203,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":29,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"signatures":[{"id":204,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.close"}},{"id":184,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":493,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L493"}],"signatures":[{"id":185,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether this item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":493,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L493"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.isEnabled"}},{"id":181,"name":"setAccelerator","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":509,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L509"}],"signatures":[{"id":182,"name":"setAccelerator","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the accelerator for this menu item."}]},"sources":[{"fileName":"menu.ts","line":509,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L509"}],"parameters":[{"id":183,"name":"accelerator","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setAccelerator"}},{"id":186,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":498,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L498"}],"signatures":[{"id":187,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets whether this item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":498,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L498"}],"parameters":[{"id":188,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setEnabled"}},{"id":191,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":482,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"signatures":[{"id":192,"name":"setText","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the text for this item."}]},"sources":[{"fileName":"menu.ts","line":482,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"parameters":[{"id":193,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.setText"}},{"id":189,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":477,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"signatures":[{"id":190,"name":"text","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the text of this item."}]},"sources":[{"fileName":"menu.ts","line":477,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase4.text"}},{"id":174,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":539,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L539"}],"signatures":[{"id":175,"name":"new","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Create a new menu item."}]},"sources":[{"fileName":"menu.ts","line":539,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L539"}],"parameters":[{"id":176,"name":"opts","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[177]},{"title":"Properties","children":[194,195,200]},{"title":"Accessors","children":[196,201]},{"title":"Methods","children":[203,184,181,186,191,189,174]}],"sources":[{"fileName":"menu.ts","line":533,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L533"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4"},"name":"MenuItemBase4","package":"@tauri-apps/api"}]},{"id":242,"name":"PredefinedMenuItem","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"A predefined (native) menu item which has a predfined behavior by the OS or by tauri."}]},"children":[{"id":246,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":700,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L700"}],"signatures":[{"id":247,"name":"new PredefinedMenuItem","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":700,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L700"}],"parameters":[{"id":248,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":249,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase2.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"MenuItemBase2.constructor"}},{"id":255,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":243,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L243"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.#id"}},{"id":256,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":244,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L244"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.#kind"}},{"id":261,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":15,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L15"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.#rid"}},{"id":257,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"getSignature":{"id":258,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.id"}},{"id":262,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"getSignature":{"id":263,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.rid"}},{"id":264,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":29,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"signatures":[{"id":265,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.close"}},{"id":252,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":482,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"signatures":[{"id":253,"name":"setText","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the text for this item."}]},"sources":[{"fileName":"menu.ts","line":482,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"parameters":[{"id":254,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.setText"}},{"id":250,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":477,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"signatures":[{"id":251,"name":"text","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the text of this item."}]},"sources":[{"fileName":"menu.ts","line":477,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase2.text"}},{"id":243,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":705,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L705"}],"signatures":[{"id":244,"name":"new","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Create a new predefined menu item."}]},"sources":[{"fileName":"menu.ts","line":705,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L705"}],"parameters":[{"id":245,"name":"opts","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":80,"name":"PredefinedMenuItemOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[246]},{"title":"Properties","children":[255,256,261]},{"title":"Accessors","children":[257,262]},{"title":"Methods","children":[264,252,250,243]}],"sources":[{"fileName":"menu.ts","line":699,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L699"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2"},"name":"MenuItemBase2","package":"@tauri-apps/api"}]},{"id":304,"name":"Submenu","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"A type that is a submenu inside a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":" or "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":"."}]},"children":[{"id":308,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"menu.ts","line":551,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L551"}],"signatures":[{"id":309,"name":"new Submenu","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"menu.ts","line":551,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L551"}],"parameters":[{"id":310,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":311,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.constructor"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.constructor"}},{"id":344,"name":"#id","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":243,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L243"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.#id"}},{"id":345,"name":"#kind","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"menu.ts","line":244,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L244"}],"type":{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"ItemKind"},"name":"ItemKind","package":"@tauri-apps/api"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.#kind"}},{"id":350,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":15,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L15"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.#rid"}},{"id":346,"name":"id","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"getSignature":{"id":347,"name":"id","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"menu.ts","line":247,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L247"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.id"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.id"}},{"id":351,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"getSignature":{"id":352,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.rid"}},{"id":316,"name":"append","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":271,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L271"}],"signatures":[{"id":317,"name":"append","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Add a menu item to the end of this menu.\n\n## Platform-spcific:\n\n- **macOS:** Only "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":"s can be added to a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":"."}]},"sources":[{"fileName":"menu.ts","line":271,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L271"}],"typeParameter":[{"id":318,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":319,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":353,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":29,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"signatures":[{"id":354,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.close"}},{"id":337,"name":"get","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":382,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L382"}],"signatures":[{"id":338,"name":"get","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Retrieves the menu item matching the given identifier."}]},"sources":[{"fileName":"menu.ts","line":382,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L382"}],"parameters":[{"id":339,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":324,"name":"insert","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":321,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L321"}],"signatures":[{"id":325,"name":"insert","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Add a menu item to the specified position in this menu.\n\n## Platform-spcific:\n\n- **macOS:** Only "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":"s can be added to a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":"."}]},"sources":[{"fileName":"menu.ts","line":321,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L321"}],"typeParameter":[{"id":326,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":327,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}},{"id":328,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":355,"name":"isEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":493,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L493"}],"signatures":[{"id":356,"name":"isEnabled","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns whether this item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":493,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L493"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.isEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.isEnabled"}},{"id":335,"name":"items","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":370,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L370"}],"signatures":[{"id":336,"name":"items","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a list of menu items that has been added to this menu."}]},"sources":[{"fileName":"menu.ts","line":370,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L370"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":340,"name":"popup","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":406,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L406"}],"signatures":[{"id":341,"name":"popup","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Popup this menu as a context menu on the specified window.\n\nIf the position, is provided, it is relative to the window's top-left corner."}]},"sources":[{"fileName":"menu.ts","line":406,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L406"}],"parameters":[{"id":342,"name":"window","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":343,"name":"position","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"tuple","elements":[{"type":"intrinsic","name":"number"},{"type":"intrinsic","name":"number"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":320,"name":"prepend","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":296,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L296"}],"signatures":[{"id":321,"name":"prepend","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Add a menu item to the beginning of this menu.\n\n## Platform-spcific:\n\n- **macOS:** Only "},{"kind":"inline-tag","tag":"@linkcode","text":"Submenu","target":304,"tsLinkText":""},{"kind":"text","text":"s can be added to a "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":"."}]},"sources":[{"fileName":"menu.ts","line":296,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L296"}],"typeParameter":[{"id":322,"name":"T","variant":"typeParam","kind":131072,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"parameters":[{"id":323,"name":"items","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true},{"type":"array","elementType":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":329,"name":"remove","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":341,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L341"}],"signatures":[{"id":330,"name":"remove","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Remove a menu item from this menu."}]},"sources":[{"fileName":"menu.ts","line":341,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L341"}],"parameters":[{"id":331,"name":"item","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":332,"name":"removeAt","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":352,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L352"}],"signatures":[{"id":333,"name":"removeAt","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Remove a menu item from this menu at the specified position."}]},"sources":[{"fileName":"menu.ts","line":352,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L352"}],"parameters":[{"id":334,"name":"position","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":314,"name":"setAsHelpMenuForNSApp","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":588,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L588"}],"signatures":[{"id":315,"name":"setAsHelpMenuForNSApp","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Set this submenu as the Help menu for the application on macOS.\n\nThis will cause macOS to automatically add a search box to the menu.\n\nIf no menu is set as the Help menu, macOS will automatically use any menu\nwhich has a title matching the localized word \"Help\".\n\n#### Platform-specific:\n\n- **Windows / Linux**: Unsupported."}]},"sources":[{"fileName":"menu.ts","line":588,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L588"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":312,"name":"setAsWindowsMenuForNSApp","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":570,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L570"}],"signatures":[{"id":313,"name":"setAsWindowsMenuForNSApp","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Set this submenu as the Window menu for the application on macOS.\n\nThis will cause macOS to automatically add window-switching items and\ncertain other items to the menu.\n\n#### Platform-specific:\n\n- **Windows / Linux**: Unsupported."}]},"sources":[{"fileName":"menu.ts","line":570,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L570"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":357,"name":"setEnabled","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":498,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L498"}],"signatures":[{"id":358,"name":"setEnabled","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets whether this item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":498,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L498"}],"parameters":[{"id":359,"name":"enabled","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setEnabled"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setEnabled"}},{"id":362,"name":"setText","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":482,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"signatures":[{"id":363,"name":"setText","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the text for this item."}]},"sources":[{"fileName":"menu.ts","line":482,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L482"}],"parameters":[{"id":364,"name":"text","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setText"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.setText"}},{"id":360,"name":"text","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"menu.ts","line":477,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"signatures":[{"id":361,"name":"text","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns the text of this item."}]},"sources":[{"fileName":"menu.ts","line":477,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L477"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.text"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"MenuItemBase3.text"}},{"id":305,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"menu.ts","line":556,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L556"}],"signatures":[{"id":306,"name":"new","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Create a new submenu."}]},"sources":[{"fileName":"menu.ts","line":556,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L556"}],"parameters":[{"id":307,"name":"opts","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":79,"name":"SubmenuOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[308]},{"title":"Properties","children":[344,345,350]},{"title":"Accessors","children":[346,351]},{"title":"Methods","children":[316,353,337,324,355,335,340,320,329,332,314,312,357,362,360,305]}],"sources":[{"fileName":"menu.ts","line":547,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L547"},{"fileName":"menu.ts","line":550,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L550"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3"},"name":"MenuItemBase3","package":"@tauri-apps/api"},{"type":"reference","target":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase"},"name":"MenuBase","package":"@tauri-apps/api"}]},{"id":104,"name":"AboutMetadata","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"A metadata for the about predefined menu item."}]},"children":[{"id":108,"name":"authors","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The authors of the application.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}]},"sources":[{"fileName":"menu.ts","line":618,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L618"}],"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}},{"id":109,"name":"comments","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Application comments.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}]},"sources":[{"fileName":"menu.ts","line":626,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L626"}],"type":{"type":"intrinsic","name":"string"}},{"id":110,"name":"copyright","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The copyright of the application."}]},"sources":[{"fileName":"menu.ts","line":628,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L628"}],"type":{"type":"intrinsic","name":"string"}},{"id":114,"name":"credits","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The credits.\n\n#### Platform-specific\n\n- **Windows / Linux:** Unsupported."}]},"sources":[{"fileName":"menu.ts","line":660,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L660"}],"type":{"type":"intrinsic","name":"string"}},{"id":115,"name":"icon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The application icon.\n\n#### Platform-specific\n\n- **Windows:** Unsupported."}]},"sources":[{"fileName":"menu.ts","line":668,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L668"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":111,"name":"license","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The license of the application.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}]},"sources":[{"fileName":"menu.ts","line":636,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L636"}],"type":{"type":"intrinsic","name":"string"}},{"id":105,"name":"name","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Sets the application name."}]},"sources":[{"fileName":"menu.ts","line":600,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L600"}],"type":{"type":"intrinsic","name":"string"}},{"id":107,"name":"short_version","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The short version, e.g. \"1.0\".\n\n#### Platform-specific\n\n- **Windows / Linux:** Appended to the end of "},{"kind":"code","text":"`version`"},{"kind":"text","text":" in parentheses."}]},"sources":[{"fileName":"menu.ts","line":610,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L610"}],"type":{"type":"intrinsic","name":"string"}},{"id":106,"name":"version","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The application version."}]},"sources":[{"fileName":"menu.ts","line":602,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L602"}],"type":{"type":"intrinsic","name":"string"}},{"id":112,"name":"website","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The application website.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}]},"sources":[{"fileName":"menu.ts","line":644,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L644"}],"type":{"type":"intrinsic","name":"string"}},{"id":113,"name":"website_label","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The website label.\n\n#### Platform-specific\n\n- **macOS:** Unsupported."}]},"sources":[{"fileName":"menu.ts","line":652,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L652"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[108,109,110,114,115,111,105,107,106,112,113]}],"sources":[{"fileName":"menu.ts","line":598,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L598"}]},{"id":85,"name":"CheckMenuItemOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Options for creating a new check menu item."}]},"children":[{"id":90,"name":"accelerator","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specify an accelerator for the new menu item."}]},"sources":[{"fileName":"menu.ts","line":527,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L527"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":75,"name":"MenuItemOptions.accelerator"}},{"id":91,"name":"action","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":529,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L529"}],"type":{"type":"reflection","declaration":{"id":92,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"menu.ts","line":529,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L529"}],"signatures":[{"id":93,"name":"__type","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Specify a handler to be called when this menu item is activated."}]},"sources":[{"fileName":"menu.ts","line":529,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L529"}],"type":{"type":"intrinsic","name":"void"}}]}},"inheritedFrom":{"type":"reference","target":76,"name":"MenuItemOptions.action"}},{"id":86,"name":"checked","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the new check menu item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":717,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L717"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":89,"name":"enabled","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the new menu item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":525,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L525"}],"type":{"type":"intrinsic","name":"boolean"},"inheritedFrom":{"type":"reference","target":74,"name":"MenuItemOptions.enabled"}},{"id":87,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specify an id to use for the new menu item."}]},"sources":[{"fileName":"menu.ts","line":521,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L521"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":72,"name":"MenuItemOptions.id"}},{"id":88,"name":"text","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The text of the new menu item."}]},"sources":[{"fileName":"menu.ts","line":523,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L523"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":73,"name":"MenuItemOptions.text"}}],"groups":[{"title":"Properties","children":[90,91,86,89,87,88]}],"sources":[{"fileName":"menu.ts","line":715,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L715"}],"extendedTypes":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}]},{"id":94,"name":"IconMenuItemOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Options for creating a new icon menu item."}]},"children":[{"id":100,"name":"accelerator","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specify an accelerator for the new menu item."}]},"sources":[{"fileName":"menu.ts","line":527,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L527"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":75,"name":"MenuItemOptions.accelerator"}},{"id":101,"name":"action","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":529,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L529"}],"type":{"type":"reflection","declaration":{"id":102,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"menu.ts","line":529,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L529"}],"signatures":[{"id":103,"name":"__type","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Specify a handler to be called when this menu item is activated."}]},"sources":[{"fileName":"menu.ts","line":529,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L529"}],"type":{"type":"intrinsic","name":"void"}}]}},"inheritedFrom":{"type":"reference","target":76,"name":"MenuItemOptions.action"}},{"id":99,"name":"enabled","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the new menu item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":525,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L525"}],"type":{"type":"intrinsic","name":"boolean"},"inheritedFrom":{"type":"reference","target":74,"name":"MenuItemOptions.enabled"}},{"id":95,"name":"icon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Icon to be used for the new icon menu item.\n\nif both "},{"kind":"inline-tag","tag":"@linkcode","text":"icon","target":95,"tsLinkText":"icon"},{"kind":"text","text":" and "},{"kind":"inline-tag","tag":"@linkcode","text":"nativeIcon","target":96,"tsLinkText":"nativeIcon"},{"kind":"text","text":" are specified, only "},{"kind":"inline-tag","tag":"@linkcode","text":"icon","target":95,"tsLinkText":"icon"},{"kind":"text","text":" is used."}]},"sources":[{"fileName":"menu.ts","line":758,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L758"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":97,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specify an id to use for the new menu item."}]},"sources":[{"fileName":"menu.ts","line":521,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L521"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":72,"name":"MenuItemOptions.id"}},{"id":96,"name":"nativeIcon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"NativeIcon to be used for the new icon menu item.\n\nif both "},{"kind":"inline-tag","tag":"@linkcode","text":"icon","target":95,"tsLinkText":"icon"},{"kind":"text","text":" and "},{"kind":"inline-tag","tag":"@linkcode","text":"nativeIcon","target":96,"tsLinkText":"nativeIcon"},{"kind":"text","text":" are specified, only "},{"kind":"inline-tag","tag":"@linkcode","text":"icon","target":95,"tsLinkText":"icon"},{"kind":"text","text":" is used."}]},"sources":[{"fileName":"menu.ts","line":764,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L764"}],"type":{"type":"reference","target":116,"name":"NativeIcon","package":"@tauri-apps/api"}},{"id":98,"name":"text","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The text of the new menu item."}]},"sources":[{"fileName":"menu.ts","line":523,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L523"}],"type":{"type":"intrinsic","name":"string"},"inheritedFrom":{"type":"reference","target":73,"name":"MenuItemOptions.text"}}],"groups":[{"title":"Properties","children":[100,101,99,95,97,96,98]}],"sources":[{"fileName":"menu.ts","line":752,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L752"}],"extendedTypes":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"}]},{"id":66,"name":"MenuEvent","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Describes a menu event emitted when a menu item is activated"}]},"children":[{"id":67,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Id of the menu item that triggered this event"}]},"sources":[{"fileName":"menu.ts","line":19,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L19"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[67]}],"sources":[{"fileName":"menu.ts","line":17,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L17"}]},{"id":71,"name":"MenuItemOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Options for creating a new menu item."}]},"children":[{"id":75,"name":"accelerator","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specify an accelerator for the new menu item."}]},"sources":[{"fileName":"menu.ts","line":527,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L527"}],"type":{"type":"intrinsic","name":"string"}},{"id":76,"name":"action","variant":"declaration","kind":1024,"flags":{"isOptional":true},"sources":[{"fileName":"menu.ts","line":529,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L529"}],"type":{"type":"reflection","declaration":{"id":77,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"menu.ts","line":529,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L529"}],"signatures":[{"id":78,"name":"__type","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Specify a handler to be called when this menu item is activated."}]},"sources":[{"fileName":"menu.ts","line":529,"character":11,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L529"}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":74,"name":"enabled","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether the new menu item is enabled or not."}]},"sources":[{"fileName":"menu.ts","line":525,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L525"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":72,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specify an id to use for the new menu item."}]},"sources":[{"fileName":"menu.ts","line":521,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L521"}],"type":{"type":"intrinsic","name":"string"}},{"id":73,"name":"text","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The text of the new menu item."}]},"sources":[{"fileName":"menu.ts","line":523,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L523"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[75,76,74,72,73]}],"sources":[{"fileName":"menu.ts","line":519,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L519"}],"extendedBy":[{"type":"reference","target":85,"name":"CheckMenuItemOptions"},{"type":"reference","target":94,"name":"IconMenuItemOptions"}]},{"id":68,"name":"MenuOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Options for creating a new menu."}]},"children":[{"id":69,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Specify an id to use for the new menu."}]},"sources":[{"fileName":"menu.ts","line":419,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L419"}],"type":{"type":"intrinsic","name":"string"}},{"id":70,"name":"items","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"List of items to add to the new menu."}]},"sources":[{"fileName":"menu.ts","line":421,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L421"}],"type":{"type":"array","elementType":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":173,"name":"MenuItem","package":"@tauri-apps/api"},{"type":"reference","target":242,"name":"PredefinedMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":205,"name":"CheckMenuItem","package":"@tauri-apps/api"},{"type":"reference","target":266,"name":"IconMenuItem","package":"@tauri-apps/api"}]}}}],"groups":[{"title":"Properties","children":[69,70]}],"sources":[{"fileName":"menu.ts","line":417,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L417"}]},{"id":80,"name":"PredefinedMenuItemOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Options for creating a new predefined menu item."}]},"children":[{"id":82,"name":"item","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The predefined item type"}]},"sources":[{"fileName":"menu.ts","line":676,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L676"}],"type":{"type":"union","types":[{"type":"reflection","declaration":{"id":83,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":84,"name":"About","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"menu.ts","line":694,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L694"}],"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":104,"name":"AboutMetadata","package":"@tauri-apps/api"}]}}],"groups":[{"title":"Properties","children":[84]}],"sources":[{"fileName":"menu.ts","line":693,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L693"}]}},{"type":"literal","value":"Separator"},{"type":"literal","value":"Copy"},{"type":"literal","value":"Cut"},{"type":"literal","value":"Paste"},{"type":"literal","value":"SelectAll"},{"type":"literal","value":"Undo"},{"type":"literal","value":"Redo"},{"type":"literal","value":"Minimize"},{"type":"literal","value":"Maximize"},{"type":"literal","value":"Fullscreen"},{"type":"literal","value":"Hide"},{"type":"literal","value":"HideOthers"},{"type":"literal","value":"ShowAll"},{"type":"literal","value":"CloseWindow"},{"type":"literal","value":"Quit"},{"type":"literal","value":"Services"}]}},{"id":81,"name":"text","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The text of the new predefined menu item."}]},"sources":[{"fileName":"menu.ts","line":674,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L674"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[82,81]}],"sources":[{"fileName":"menu.ts","line":672,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L672"}]},{"id":79,"name":"SubmenuOptions","variant":"declaration","kind":4194304,"flags":{},"sources":[{"fileName":"menu.ts","line":544,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L544"}],"type":{"type":"intersection","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Omit"},"typeArguments":[{"type":"reference","target":71,"name":"MenuItemOptions","package":"@tauri-apps/api"},{"type":"union","types":[{"type":"literal","value":"accelerator"},{"type":"literal","value":"action"}]}],"name":"Omit","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#omittype-keys"},{"type":"reference","target":68,"name":"MenuOptions","package":"@tauri-apps/api"}]}}],"groups":[{"title":"Enumerations","children":[116]},{"title":"Classes","children":[205,266,365,173,242,304]},{"title":"Interfaces","children":[104,85,94,66,71,68,80]},{"title":"Type Aliases","children":[79]}],"sources":[{"fileName":"menu.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/menu.ts#L1"}]},{"id":51,"name":"mocks","variant":"declaration","kind":2,"flags":{},"children":[{"id":63,"name":"clearMocks","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":178,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/mocks.ts#L178"}],"signatures":[{"id":64,"name":"clearMocks","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"mocks.ts","line":178,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/mocks.ts#L178"}],"type":{"type":"intrinsic","name":"void"}}]},{"id":52,"name":"mockIPC","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":80,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/mocks.ts#L80"}],"signatures":[{"id":53,"name":"mockIPC","variant":"signature","kind":4096,"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, payload) => {\n switch (cmd) {\n case \"add\":\n return (payload.a as number) + (payload.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, payload) => {\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"}]}]},"sources":[{"fileName":"mocks.ts","line":80,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/mocks.ts#L80"}],"parameters":[{"id":54,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":55,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/mocks.ts#L81"}],"signatures":[{"id":56,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"mocks.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/mocks.ts#L81"}],"parameters":[{"id":57,"name":"cmd","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":58,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"}}],"type":{"type":"intrinsic","name":"any"}}]}}}],"type":{"type":"intrinsic","name":"void"}}]},{"id":59,"name":"mockWindows","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"mocks.ts","line":142,"character":16,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/mocks.ts#L142"}],"signatures":[{"id":60,"name":"mockWindows","variant":"signature","kind":4096,"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 === \"plugin:event|emit\") {\n console.log('emit event', args?.event, args?.payload);\n }\n});\n\nconst { emit } = await import(\"@tauri-apps/api/event\");\nawait emit('loaded'); // this will cause the mocked IPC handler to log to the console.\n```"}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"mocks.ts","line":142,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/mocks.ts#L142"}],"parameters":[{"id":61,"name":"current","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Label of window this JavaScript context is running in."}]},"type":{"type":"intrinsic","name":"string"}},{"id":62,"name":"additionalWindows","variant":"param","kind":32768,"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":[63,52,59]}],"sources":[{"fileName":"mocks.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/mocks.ts#L1"}]},{"id":419,"name":"path","variant":"declaration","kind":2,"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\nIt is recommended to allowlist only the APIs you use for optimal bundle size and security."}]},"children":[{"id":420,"name":"BaseDirectory","variant":"declaration","kind":8,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":436,"name":"AppCache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":35,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L35"}],"type":{"type":"literal","value":16}},{"id":433,"name":"AppConfig","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":32,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L32"}],"type":{"type":"literal","value":13}},{"id":434,"name":"AppData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":33,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L33"}],"type":{"type":"literal","value":14}},{"id":435,"name":"AppLocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":34,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L34"}],"type":{"type":"literal","value":15}},{"id":437,"name":"AppLog","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":36,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L36"}],"type":{"type":"literal","value":17}},{"id":421,"name":"Audio","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L20"}],"type":{"type":"literal","value":1}},{"id":422,"name":"Cache","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":21,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L21"}],"type":{"type":"literal","value":2}},{"id":423,"name":"Config","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L22"}],"type":{"type":"literal","value":3}},{"id":424,"name":"Data","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":23,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L23"}],"type":{"type":"literal","value":4}},{"id":438,"name":"Desktop","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":38,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L38"}],"type":{"type":"literal","value":18}},{"id":426,"name":"Document","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":25,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L25"}],"type":{"type":"literal","value":6}},{"id":427,"name":"Download","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L26"}],"type":{"type":"literal","value":7}},{"id":439,"name":"Executable","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":39,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L39"}],"type":{"type":"literal","value":19}},{"id":440,"name":"Font","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":40,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L40"}],"type":{"type":"literal","value":20}},{"id":441,"name":"Home","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":41,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L41"}],"type":{"type":"literal","value":21}},{"id":425,"name":"LocalData","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L24"}],"type":{"type":"literal","value":5}},{"id":428,"name":"Picture","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":27,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L27"}],"type":{"type":"literal","value":8}},{"id":429,"name":"Public","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":28,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L28"}],"type":{"type":"literal","value":9}},{"id":431,"name":"Resource","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":30,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L30"}],"type":{"type":"literal","value":11}},{"id":442,"name":"Runtime","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":42,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L42"}],"type":{"type":"literal","value":22}},{"id":432,"name":"Temp","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":31,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L31"}],"type":{"type":"literal","value":12}},{"id":443,"name":"Template","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":43,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L43"}],"type":{"type":"literal","value":23}},{"id":430,"name":"Video","variant":"declaration","kind":16,"flags":{},"sources":[{"fileName":"path.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L29"}],"type":{"type":"literal","value":10}}],"groups":[{"title":"Enumeration Members","children":[436,433,434,435,437,421,422,423,424,438,426,427,439,440,441,425,428,429,431,442,432,443,430]}],"sources":[{"fileName":"path.ts","line":19,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L19"}]},{"id":450,"name":"appCacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":108,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L108"}],"signatures":[{"id":451,"name":"appCacheDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":108,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L108"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":444,"name":"appConfigDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":57,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L57"}],"signatures":[{"id":445,"name":"appConfigDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":57,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L57"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":446,"name":"appDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":74,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L74"}],"signatures":[{"id":447,"name":"appDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":74,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L74"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":448,"name":"appLocalDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":91,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L91"}],"signatures":[{"id":449,"name":"appLocalDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":91,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L91"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":452,"name":"appLogDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":520,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L520"}],"signatures":[{"id":453,"name":"appLogDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":520,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L520"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":454,"name":"audioDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":130,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L130"}],"signatures":[{"id":455,"name":"audioDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":130,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L130"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":510,"name":"basename","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":653,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L653"}],"signatures":[{"id":511,"name":"basename","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":653,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L653"}],"parameters":[{"id":512,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":513,"name":"ext","variant":"param","kind":32768,"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","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":456,"name":"cacheDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":152,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L152"}],"signatures":[{"id":457,"name":"cacheDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":152,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L152"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":458,"name":"configDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":174,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L174"}],"signatures":[{"id":459,"name":"configDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":174,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L174"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":460,"name":"dataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":196,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L196"}],"signatures":[{"id":461,"name":"dataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":196,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L196"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":493,"name":"delimiter","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":560,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L560"}],"signatures":[{"id":494,"name":"delimiter","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns 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":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":560,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L560"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":462,"name":"desktopDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":218,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L218"}],"signatures":[{"id":463,"name":"desktopDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":218,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L218"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":504,"name":"dirname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":619,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L619"}],"signatures":[{"id":505,"name":"dirname","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":619,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L619"}],"parameters":[{"id":506,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":464,"name":"documentDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":240,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L240"}],"signatures":[{"id":465,"name":"documentDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":240,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L240"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":466,"name":"downloadDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":262,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L262"}],"signatures":[{"id":467,"name":"downloadDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":262,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L262"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":468,"name":"executableDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":284,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L284"}],"signatures":[{"id":469,"name":"executableDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":284,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L284"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":507,"name":"extname","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":635,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L635"}],"signatures":[{"id":508,"name":"extname","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":635,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L635"}],"parameters":[{"id":509,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":470,"name":"fontDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":306,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L306"}],"signatures":[{"id":471,"name":"fontDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":306,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L306"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":472,"name":"homeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":328,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L328"}],"signatures":[{"id":473,"name":"homeDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":328,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L328"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":514,"name":"isAbsolute","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":667,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L667"}],"signatures":[{"id":515,"name":"isAbsolute","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":667,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L667"}],"parameters":[{"id":516,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":501,"name":"join","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":604,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L604"}],"signatures":[{"id":502,"name":"join","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":604,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L604"}],"parameters":[{"id":503,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":474,"name":"localDataDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":350,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L350"}],"signatures":[{"id":475,"name":"localDataDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":350,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L350"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":498,"name":"normalize","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":589,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L589"}],"signatures":[{"id":499,"name":"normalize","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":589,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L589"}],"parameters":[{"id":500,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":476,"name":"pictureDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":372,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L372"}],"signatures":[{"id":477,"name":"pictureDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":372,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L372"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":478,"name":"publicDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":394,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L394"}],"signatures":[{"id":479,"name":"publicDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":394,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L394"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":495,"name":"resolve","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":574,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L574"}],"signatures":[{"id":496,"name":"resolve","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":574,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L574"}],"parameters":[{"id":497,"name":"paths","variant":"param","kind":32768,"flags":{"isRest":true},"type":{"type":"array","elementType":{"type":"intrinsic","name":"string"}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":482,"name":"resolveResource","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":431,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L431"}],"signatures":[{"id":483,"name":"resolveResource","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":431,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L431"}],"parameters":[{"id":484,"name":"resourcePath","variant":"param","kind":32768,"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","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":480,"name":"resourceDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":411,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L411"}],"signatures":[{"id":481,"name":"resourceDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":411,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L411"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":485,"name":"runtimeDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":454,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L454"}],"signatures":[{"id":486,"name":"runtimeDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":454,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L454"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":491,"name":"sep","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":549,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L549"}],"signatures":[{"id":492,"name":"sep","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns 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":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":549,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L549"}],"type":{"type":"intrinsic","name":"string"}}]},{"id":517,"name":"tempDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":536,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L536"}],"signatures":[{"id":518,"name":"tempDir","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Returns a temporary directory."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { tempDir } from '@tauri-apps/api/path';\nconst temp = await tempDir();\n```"}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"path.ts","line":536,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L536"}],"parameters":[{"id":519,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":487,"name":"templateDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":476,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L476"}],"signatures":[{"id":488,"name":"templateDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":476,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L476"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":489,"name":"videoDir","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"path.ts","line":498,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L498"}],"signatures":[{"id":490,"name":"videoDir","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"path.ts","line":498,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L498"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"string"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Enumerations","children":[420]},{"title":"Functions","children":[450,444,446,448,452,454,510,456,458,460,493,462,504,464,466,468,507,470,472,514,501,474,498,476,478,495,482,480,485,491,517,487,489]}],"sources":[{"fileName":"path.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/path.ts#L1"}]},{"id":520,"name":"tauri","variant":"declaration","kind":2,"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":531,"name":"Channel","variant":"declaration","kind":128,"flags":{},"children":[{"id":532,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L71"}],"signatures":[{"id":533,"name":"new Channel","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":71,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L71"}],"typeParameter":[{"id":534,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}],"type":{"type":"reference","target":531,"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Channel","package":"@tauri-apps/api"}}]},{"id":537,"name":"#onmessage","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"tauri.ts","line":67,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L67"}],"type":{"type":"reflection","declaration":{"id":538,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":67,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L67"}],"signatures":[{"id":539,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":67,"character":14,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L67"}],"parameters":[{"id":540,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}},"defaultValue":"..."},{"id":536,"name":"__TAURI_CHANNEL_MARKER__","variant":"declaration","kind":1024,"flags":{"isPrivate":true,"isReadonly":true},"sources":[{"fileName":"tauri.ts","line":66,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L66"}],"type":{"type":"literal","value":true},"defaultValue":"true"},{"id":535,"name":"id","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":64,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L64"}],"type":{"type":"intrinsic","name":"number"}},{"id":541,"name":"onmessage","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L77"},{"fileName":"tauri.ts","line":81,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L81"}],"getSignature":{"id":542,"name":"onmessage","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L81"}],"type":{"type":"reflection","declaration":{"id":543,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L81"}],"signatures":[{"id":544,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":81,"character":19,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L81"}],"parameters":[{"id":545,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}},"setSignature":{"id":546,"name":"onmessage","variant":"signature","kind":1048576,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L77"}],"parameters":[{"id":547,"name":"handler","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":548,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L77"}],"signatures":[{"id":549,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":77,"character":25,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L77"}],"parameters":[{"id":550,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"intrinsic","name":"void"}}},{"id":551,"name":"toJSON","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L85"}],"signatures":[{"id":552,"name":"toJSON","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L85"}],"type":{"type":"intrinsic","name":"string"}}]}],"groups":[{"title":"Constructors","children":[532]},{"title":"Properties","children":[537,536,535]},{"title":"Accessors","children":[541]},{"title":"Methods","children":[551]}],"sources":[{"fileName":"tauri.ts","line":63,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L63"}],"typeParameters":[{"id":553,"name":"T","variant":"typeParam","kind":131072,"flags":{},"default":{"type":"intrinsic","name":"unknown"}}]},{"id":554,"name":"PluginListener","variant":"declaration","kind":128,"flags":{},"children":[{"id":555,"name":"constructor","variant":"declaration","kind":512,"flags":{},"sources":[{"fileName":"tauri.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L95"}],"signatures":[{"id":556,"name":"new PluginListener","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tauri.ts","line":95,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L95"}],"parameters":[{"id":557,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":558,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":559,"name":"channelId","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","target":554,"name":"PluginListener","package":"@tauri-apps/api"}}]},{"id":562,"name":"channelId","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":93,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L93"}],"type":{"type":"intrinsic","name":"number"}},{"id":561,"name":"event","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":92,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L92"}],"type":{"type":"intrinsic","name":"string"}},{"id":560,"name":"plugin","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":91,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L91"}],"type":{"type":"intrinsic","name":"string"}},{"id":563,"name":"unregister","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tauri.ts","line":101,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L101"}],"signatures":[{"id":564,"name":"unregister","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":101,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L101"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[555]},{"title":"Properties","children":[562,561,560]},{"title":"Methods","children":[563]}],"sources":[{"fileName":"tauri.ts","line":90,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L90"}]},{"id":522,"name":"InvokeOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"children":[{"id":523,"name":"headers","variant":"declaration","kind":1024,"flags":{},"sources":[{"fileName":"tauri.ts","line":139,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L139"}],"type":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"string"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.dom.d.ts","qualifiedName":"Headers"},"name":"Headers","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/API/Headers"}]}}],"groups":[{"title":"Properties","children":[523]}],"sources":[{"fileName":"tauri.ts","line":138,"character":10,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L138"}]},{"id":521,"name":"InvokeArgs","variant":"declaration","kind":4194304,"flags":{},"comment":{"summary":[{"kind":"text","text":"Command arguments."}],"blockTags":[{"tag":"@since","content":[{"kind":"text","text":"1.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":133,"character":5,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L133"}],"type":{"type":"union","types":[{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Record"},"typeArguments":[{"type":"intrinsic","name":"string"},{"type":"intrinsic","name":"unknown"}],"name":"Record","package":"typescript","externalUrl":"https://www.typescriptlang.org/docs/handbook/utility-types.html#recordkeys-type"},{"type":"array","elementType":{"type":"intrinsic","name":"number"}},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"ArrayBuffer"},"name":"ArrayBuffer","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":565,"name":"addPluginListener","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":116,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L116"}],"signatures":[{"id":566,"name":"addPluginListener","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Adds a listener to a plugin event."}],"blockTags":[{"tag":"@returns","content":[{"kind":"text","text":"The listener object to stop listening to the events."}]},{"tag":"@since","content":[{"kind":"text","text":"2.0.0"}]}]},"sources":[{"fileName":"tauri.ts","line":116,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L116"}],"typeParameter":[{"id":567,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":568,"name":"plugin","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":569,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}},{"id":570,"name":"cb","variant":"param","kind":32768,"flags":{},"type":{"type":"reflection","declaration":{"id":571,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":119,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L119"}],"signatures":[{"id":572,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":119,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L119"}],"parameters":[{"id":573,"name":"payload","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":554,"name":"PluginListener","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":580,"name":"convertFileSrc","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":212,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L212"}],"signatures":[{"id":581,"name":"convertFileSrc","variant":"signature","kind":4096,"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' ipc: https://ipc.localhost; 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"}]}]},"sources":[{"fileName":"tauri.ts","line":212,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L212"}],"parameters":[{"id":582,"name":"filePath","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The file path."}]},"type":{"type":"intrinsic","name":"string"}},{"id":583,"name":"protocol","variant":"param","kind":32768,"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":574,"name":"invoke","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":157,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L157"}],"signatures":[{"id":575,"name":"invoke","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"tauri.ts","line":157,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L157"}],"typeParameter":[{"id":576,"name":"T","variant":"typeParam","kind":131072,"flags":{}}],"parameters":[{"id":577,"name":"cmd","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The command name."}]},"type":{"type":"intrinsic","name":"string"}},{"id":578,"name":"args","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"The optional arguments to pass to the command."}]},"type":{"type":"reference","target":521,"name":"InvokeArgs","package":"@tauri-apps/api"},"defaultValue":"{}"},{"id":579,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The request options."}]},"type":{"type":"reference","target":522,"name":"InvokeOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":-1,"name":"T","refersToTypeParameter":true}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":524,"name":"transformCallback","variant":"declaration","kind":64,"flags":{},"sources":[{"fileName":"tauri.ts","line":41,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L41"}],"signatures":[{"id":525,"name":"transformCallback","variant":"signature","kind":4096,"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"}]}]},"sources":[{"fileName":"tauri.ts","line":41,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L41"}],"parameters":[{"id":526,"name":"callback","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reflection","declaration":{"id":527,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tauri.ts","line":42,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L42"}],"signatures":[{"id":528,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tauri.ts","line":42,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L42"}],"parameters":[{"id":529,"name":"response","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"any"}}],"type":{"type":"intrinsic","name":"void"}}]}}},{"id":530,"name":"once","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"},"defaultValue":"false"}],"type":{"type":"intrinsic","name":"number"}}]}],"groups":[{"title":"Classes","children":[531,554]},{"title":"Interfaces","children":[522]},{"title":"Type Aliases","children":[521]},{"title":"Functions","children":[565,580,574,524]}],"sources":[{"fileName":"tauri.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tauri.ts#L1"}]},{"id":584,"name":"tray","variant":"declaration","kind":2,"flags":{},"children":[{"id":605,"name":"TrayIcon","variant":"declaration","kind":128,"flags":{},"comment":{"summary":[{"kind":"text","text":"Tray icon class and associated methods. This type constructor is private,\ninstead, you should use the static method "},{"kind":"inline-tag","tag":"@linkcode","text":"new","target":606,"tsLinkText":""},{"kind":"text","text":".\n\n#### Warning\n\nUnlike Rust, javascript does not have any way to run cleanup code\nwhen an object is being removed by garbage collection, but this tray icon\nwill be cleaned up when the tauri app exists, however if you want to cleanup\nthis object early, you need to call "},{"kind":"inline-tag","tag":"@linkcode","text":"close","target":203,"tsLinkText":""},{"kind":"text","text":"."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```ts\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new({ tooltip: 'awesome tray tooltip' });\ntray.set_tooltip('new tooltip');\n```"}]}]},"children":[{"id":609,"name":"constructor","variant":"declaration","kind":512,"flags":{"isPrivate":true},"sources":[{"fileName":"tray.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L116"}],"signatures":[{"id":610,"name":"new TrayIcon","variant":"signature","kind":16384,"flags":{},"sources":[{"fileName":"tray.ts","line":116,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L116"}],"parameters":[{"id":611,"name":"rid","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"number"}},{"id":612,"name":"id","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"string"}}],"type":{"type":"reference","target":605,"name":"TrayIcon","package":"@tauri-apps/api"},"overwrites":{"type":"reference","target":-1,"name":"Resource.constructor"}}],"overwrites":{"type":"reference","target":-1,"name":"Resource.constructor"}},{"id":644,"name":"#rid","variant":"declaration","kind":1024,"flags":{"isPrivate":true},"sources":[{"fileName":"internal/index.ts","line":15,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L15"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.#rid"}},{"id":613,"name":"id","variant":"declaration","kind":1024,"flags":{"isPublic":true},"comment":{"summary":[{"kind":"text","text":"The id associated with this tray icon."}]},"sources":[{"fileName":"tray.ts","line":114,"character":9,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L114"}],"type":{"type":"intrinsic","name":"string"}},{"id":645,"name":"rid","variant":"declaration","kind":262144,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":6,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"getSignature":{"id":646,"name":"rid","variant":"signature","kind":524288,"flags":{},"sources":[{"fileName":"internal/index.ts","line":17,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L17"}],"type":{"type":"intrinsic","name":"number"},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.rid"}},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.rid"}},{"id":647,"name":"close","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"internal/index.ts","line":29,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"signatures":[{"id":648,"name":"close","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Destroys and cleans up this resource from memory.\n**You should not call any method on this object anymore and should drop any reference to it.**"}]},"sources":[{"fileName":"internal/index.ts","line":29,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/internal/index.ts#L29"}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"},"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.close"}}],"inheritedFrom":{"type":"reference","target":-1,"name":"Resource.close"}},{"id":638,"name":"on","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":238,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L238"}],"signatures":[{"id":639,"name":"on","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Listen to this tray icon events."}],"blockTags":[{"tag":"@example","content":[{"kind":"code","text":"```typescript\nimport { TrayIcon } from '@tauri-apps/api/tray';\nconst tray = await TrayIcon.new();\nconst unlisten = await tray.on((event) => {\n console.log(event)\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":"2.0.0"}]}]},"sources":[{"fileName":"tray.ts","line":238,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L238"}],"parameters":[{"id":640,"name":"handler","variant":"param","kind":32768,"flags":{},"comment":{"summary":[{"kind":"text","text":"Event handler."}]},"type":{"type":"reflection","declaration":{"id":641,"name":"__type","variant":"declaration","kind":65536,"flags":{},"sources":[{"fileName":"tray.ts","line":238,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L238"}],"signatures":[{"id":642,"name":"__type","variant":"signature","kind":4096,"flags":{},"sources":[{"fileName":"tray.ts","line":238,"character":20,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L238"}],"parameters":[{"id":643,"name":"event","variant":"param","kind":32768,"flags":{},"type":{"type":"reference","target":585,"name":"TrayIconEvent","package":"@tauri-apps/api"}}],"type":{"type":"intrinsic","name":"void"}}]}}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":13,"name":"UnlistenFn","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":614,"name":"setIcon","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":140,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L140"}],"signatures":[{"id":615,"name":"setIcon","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets a new tray icon. If "},{"kind":"code","text":"`null`"},{"kind":"text","text":" is provided, it will remove the icon."}]},"sources":[{"fileName":"tray.ts","line":140,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L140"}],"parameters":[{"id":616,"name":"icon","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":632,"name":"setIconAsTemplate","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":202,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L202"}],"signatures":[{"id":633,"name":"setIconAsTemplate","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the current icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**"}]},"sources":[{"fileName":"tray.ts","line":202,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L202"}],"parameters":[{"id":634,"name":"asTemplate","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":617,"name":"setMenu","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":151,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L151"}],"signatures":[{"id":618,"name":"setMenu","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets a new tray menu.\n\n#### Platform-specific:\n\n- **Linux**: once a menu is set it cannot be removed so "},{"kind":"code","text":"`null`"},{"kind":"text","text":" has no effect"}]},"sources":[{"fileName":"tray.ts","line":151,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L151"}],"parameters":[{"id":619,"name":"menu","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":365,"name":"Menu","package":"@tauri-apps/api"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":635,"name":"setMenuOnLeftClick","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":210,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L210"}],"signatures":[{"id":636,"name":"setMenuOnLeftClick","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Disable or enable showing the tray menu on left click. **macOS only**."}]},"sources":[{"fileName":"tray.ts","line":210,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L210"}],"parameters":[{"id":637,"name":"onLeft","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":629,"name":"setTempDirPath","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":197,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L197"}],"signatures":[{"id":630,"name":"setTempDirPath","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the tray icon temp dir path. **Linux only**.\n\nOn Linux, we need to write the icon to the disk and usually it will\nbe "},{"kind":"code","text":"`$XDG_RUNTIME_DIR/tray-icon`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$TEMP/tray-icon`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"tray.ts","line":197,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L197"}],"parameters":[{"id":631,"name":"path","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":623,"name":"setTitle","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":182,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L182"}],"signatures":[{"id":624,"name":"setTitle","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the tooltip for this tray icon.\n\n## Platform-specific:\n\n- **Linux:** The title will not be shown unless there is an icon\nas well. The title is useful for numerical and other frequently\nupdated information. In general, it shouldn't be shown unless a\nuser requests it as it can take up a significant amount of space\non the user's panel. This may not be shown in all visualizations.\n- **Windows:** Unsupported"}]},"sources":[{"fileName":"tray.ts","line":182,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L182"}],"parameters":[{"id":625,"name":"title","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":620,"name":"setTooltip","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":166,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L166"}],"signatures":[{"id":621,"name":"setTooltip","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Sets the tooltip for this tray icon.\n\n## Platform-specific:\n\n- **Linux:** Unsupported"}]},"sources":[{"fileName":"tray.ts","line":166,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L166"}],"parameters":[{"id":622,"name":"tooltip","variant":"param","kind":32768,"flags":{},"type":{"type":"union","types":[{"type":"literal","value":null},{"type":"intrinsic","name":"string"}]}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":626,"name":"setVisible","variant":"declaration","kind":2048,"flags":{},"sources":[{"fileName":"tray.ts","line":187,"character":8,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L187"}],"signatures":[{"id":627,"name":"setVisible","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Show or hide this tray icon."}]},"sources":[{"fileName":"tray.ts","line":187,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L187"}],"parameters":[{"id":628,"name":"visible","variant":"param","kind":32768,"flags":{},"type":{"type":"intrinsic","name":"boolean"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]},{"id":606,"name":"new","variant":"declaration","kind":2048,"flags":{"isStatic":true},"sources":[{"fileName":"tray.ts","line":129,"character":15,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L129"}],"signatures":[{"id":607,"name":"new","variant":"signature","kind":4096,"flags":{},"comment":{"summary":[{"kind":"text","text":"Creates a new "},{"kind":"inline-tag","tag":"@linkcode","text":"TrayIcon","target":605,"tsLinkText":""},{"kind":"text","text":"\n\n#### Platform-specific:\n\n- **Linux:** Sometimes the icon won't be visible unless a menu is set.\nSetting an empty "},{"kind":"inline-tag","tag":"@linkcode","text":"Menu","target":365,"tsLinkText":""},{"kind":"text","text":" is enough."}]},"sources":[{"fileName":"tray.ts","line":129,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L129"}],"parameters":[{"id":608,"name":"options","variant":"param","kind":32768,"flags":{"isOptional":true},"type":{"type":"reference","target":596,"name":"TrayIconOptions","package":"@tauri-apps/api"}}],"type":{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Promise"},"typeArguments":[{"type":"reference","target":605,"name":"TrayIcon","package":"@tauri-apps/api"}],"name":"Promise","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise"}}]}],"groups":[{"title":"Constructors","children":[609]},{"title":"Properties","children":[644,613]},{"title":"Accessors","children":[645]},{"title":"Methods","children":[647,638,614,632,617,635,629,623,620,626,606]}],"sources":[{"fileName":"tray.ts","line":112,"character":13,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L112"}],"extendedTypes":[{"type":"reference","target":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource"},"name":"Resource","package":"@tauri-apps/api"}]},{"id":585,"name":"TrayIconEvent","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"text","text":"Describes a tray event emitted when a tray icon is clicked\n\n#### Platform-specific:\n\n- **Linux**: Unsupported. The event is not emmited even though the icon is shown,\nthe icon will still show a context menu on right click."}]},"children":[{"id":595,"name":"clickType","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The click type that triggered this event."}]},"sources":[{"fileName":"tray.ts","line":37,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L37"}],"type":{"type":"union","types":[{"type":"literal","value":"Left"},{"type":"literal","value":"Right"},{"type":"literal","value":"Double"}]}},{"id":589,"name":"iconRect","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Position and size of the tray icon."}]},"sources":[{"fileName":"tray.ts","line":26,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L26"}],"type":{"type":"reflection","declaration":{"id":590,"name":"__type","variant":"declaration","kind":65536,"flags":{},"children":[{"id":594,"name":"bottom","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The y-coordinate of the lower-right corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":34,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L34"}],"type":{"type":"intrinsic","name":"number"}},{"id":591,"name":"left","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The x-coordinate of the upper-left corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":28,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L28"}],"type":{"type":"intrinsic","name":"number"}},{"id":593,"name":"right","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The x-coordinate of the lower-right corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":32,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L32"}],"type":{"type":"intrinsic","name":"number"}},{"id":592,"name":"top","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"The y-coordinate of the upper-left corner of the rectangle."}]},"sources":[{"fileName":"tray.ts","line":30,"character":4,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L30"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[594,591,593,592]}],"sources":[{"fileName":"tray.ts","line":26,"character":12,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L26"}]}}},{"id":586,"name":"id","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Id of the tray icon which triggered this event."}]},"sources":[{"fileName":"tray.ts","line":20,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L20"}],"type":{"type":"intrinsic","name":"string"}},{"id":587,"name":"x","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Physical X Position of the click the triggered this event."}]},"sources":[{"fileName":"tray.ts","line":22,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L22"}],"type":{"type":"intrinsic","name":"number"}},{"id":588,"name":"y","variant":"declaration","kind":1024,"flags":{},"comment":{"summary":[{"kind":"text","text":"Physical Y Position of the click the triggered this event."}]},"sources":[{"fileName":"tray.ts","line":24,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L24"}],"type":{"type":"intrinsic","name":"number"}}],"groups":[{"title":"Properties","children":[595,589,586,587,588]}],"sources":[{"fileName":"tray.ts","line":18,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L18"}]},{"id":596,"name":"TrayIconOptions","variant":"declaration","kind":256,"flags":{},"comment":{"summary":[{"kind":"inline-tag","tag":"@link","text":"`TrayIcon`","target":606,"tsLinkText":"`TrayIcon`"},{"kind":"text","text":" creation options"}]},"children":[{"id":599,"name":"icon","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon which could be icon bytes or path to the icon file.\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```"}]},"sources":[{"fileName":"tray.ts","line":63,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L63"}],"type":{"type":"union","types":[{"type":"intrinsic","name":"string"},{"type":"reference","target":{"sourceFileName":"node_modules/typescript/lib/lib.es5.d.ts","qualifiedName":"Uint8Array"},"name":"Uint8Array","package":"typescript","externalUrl":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array"}]}},{"id":603,"name":"iconAsTemplate","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Use the icon as a [template](https://developer.apple.com/documentation/appkit/nsimage/1520017-template?language=objc). **macOS only**."}]},"sources":[{"fileName":"tray.ts","line":89,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L89"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":597,"name":"id","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon id. If undefined, a random one will be assigend"}]},"sources":[{"fileName":"tray.ts","line":50,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L50"}],"type":{"type":"intrinsic","name":"string"}},{"id":598,"name":"menu","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon menu"}]},"sources":[{"fileName":"tray.ts","line":52,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L52"}],"type":{"type":"union","types":[{"type":"reference","target":304,"name":"Submenu","package":"@tauri-apps/api"},{"type":"reference","target":365,"name":"Menu","package":"@tauri-apps/api"}]}},{"id":604,"name":"menuOnLeftClieck","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"Whether to show the tray menu on left click or not, default is "},{"kind":"code","text":"`true`"},{"kind":"text","text":". **macOS only**."}]},"sources":[{"fileName":"tray.ts","line":91,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L91"}],"type":{"type":"intrinsic","name":"boolean"}},{"id":602,"name":"tempDirPath","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon temp dir path. **Linux only**.\n\nOn Linux, we need to write the icon to the disk and usually it will\nbe "},{"kind":"code","text":"`$XDG_RUNTIME_DIR/tray-icon`"},{"kind":"text","text":" or "},{"kind":"code","text":"`$TEMP/tray-icon`"},{"kind":"text","text":"."}]},"sources":[{"fileName":"tray.ts","line":85,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L85"}],"type":{"type":"intrinsic","name":"string"}},{"id":601,"name":"title","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tooltip text\n\n#### Platform-specific\n\n- **Linux:** The title will not be shown unless there is an icon\nas well. The title is useful for numerical and other frequently\nupdated information. In general, it shouldn't be shown unless a\nuser requests it as it can take up a significant amount of space\non the user's panel. This may not be shown in all visualizations.\n- **Windows:** Unsupported."}]},"sources":[{"fileName":"tray.ts","line":78,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L78"}],"type":{"type":"intrinsic","name":"string"}},{"id":600,"name":"tooltip","variant":"declaration","kind":1024,"flags":{"isOptional":true},"comment":{"summary":[{"kind":"text","text":"The tray icon tooltip"}]},"sources":[{"fileName":"tray.ts","line":65,"character":2,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L65"}],"type":{"type":"intrinsic","name":"string"}}],"groups":[{"title":"Properties","children":[599,603,597,598,604,602,601,600]}],"sources":[{"fileName":"tray.ts","line":48,"character":17,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L48"}]}],"groups":[{"title":"Classes","children":[605]},{"title":"Interfaces","children":[585,596]}],"sources":[{"fileName":"tray.ts","line":1,"character":0,"url":"https://github.com/tauri-apps/tauri/blob/4cdf9d24/tooling/api/src/tray.ts#L1"}]}],"groups":[{"title":"Modules","children":[1,65,51,419,520,584]}],"packageName":"@tauri-apps/api","symbolIdMap":{"1":{"sourceFileName":"src/event.ts","qualifiedName":""},"2":{"sourceFileName":"src/event.ts","qualifiedName":"Event"},"3":{"sourceFileName":"src/event.ts","qualifiedName":"Event.event"},"4":{"sourceFileName":"src/event.ts","qualifiedName":"Event.windowLabel"},"5":{"sourceFileName":"src/event.ts","qualifiedName":"Event.id"},"6":{"sourceFileName":"src/event.ts","qualifiedName":"Event.payload"},"7":{"sourceFileName":"src/event.ts","qualifiedName":"Event.T"},"8":{"sourceFileName":"src/event.ts","qualifiedName":"EventCallback"},"9":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"10":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"11":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"12":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"13":{"sourceFileName":"src/event.ts","qualifiedName":"UnlistenFn"},"14":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"15":{"sourceFileName":"src/event.ts","qualifiedName":"__type"},"16":{"sourceFileName":"src/event.ts","qualifiedName":"EventName"},"17":{"sourceFileName":"src/event.ts","qualifiedName":"Options"},"18":{"sourceFileName":"src/event.ts","qualifiedName":"Options.target"},"19":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"20":{"sourceFileName":"src/event.ts","qualifiedName":"listen"},"21":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"22":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"23":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"24":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"25":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"26":{"sourceFileName":"src/event.ts","qualifiedName":"once"},"27":{"sourceFileName":"src/event.ts","qualifiedName":"T"},"28":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"29":{"sourceFileName":"src/event.ts","qualifiedName":"handler"},"30":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"31":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"32":{"sourceFileName":"src/event.ts","qualifiedName":"emit"},"33":{"sourceFileName":"src/event.ts","qualifiedName":"event"},"34":{"sourceFileName":"src/event.ts","qualifiedName":"payload"},"35":{"sourceFileName":"src/event.ts","qualifiedName":"options"},"36":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent"},"37":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_RESIZED"},"38":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_MOVED"},"39":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CLOSE_REQUESTED"},"40":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_CREATED"},"41":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_DESTROYED"},"42":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FOCUS"},"43":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_BLUR"},"44":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_SCALE_FACTOR_CHANGED"},"45":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_THEME_CHANGED"},"46":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP"},"47":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_HOVER"},"48":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.WINDOW_FILE_DROP_CANCELLED"},"49":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.MENU"},"50":{"sourceFileName":"src/event.ts","qualifiedName":"TauriEvent.TRAY"},"51":{"sourceFileName":"src/mocks.ts","qualifiedName":""},"52":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"53":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockIPC"},"54":{"sourceFileName":"src/mocks.ts","qualifiedName":"cb"},"55":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"56":{"sourceFileName":"src/mocks.ts","qualifiedName":"__type"},"57":{"sourceFileName":"src/mocks.ts","qualifiedName":"cmd"},"58":{"sourceFileName":"src/mocks.ts","qualifiedName":"payload"},"59":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"60":{"sourceFileName":"src/mocks.ts","qualifiedName":"mockWindows"},"61":{"sourceFileName":"src/mocks.ts","qualifiedName":"current"},"62":{"sourceFileName":"src/mocks.ts","qualifiedName":"additionalWindows"},"63":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"64":{"sourceFileName":"src/mocks.ts","qualifiedName":"clearMocks"},"65":{"sourceFileName":"src/menu.ts","qualifiedName":""},"66":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuEvent"},"67":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuEvent.id"},"68":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuOptions"},"69":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuOptions.id"},"70":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuOptions.items"},"71":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions"},"72":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.id"},"73":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.text"},"74":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.enabled"},"75":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.accelerator"},"76":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.action"},"77":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"78":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"79":{"sourceFileName":"src/menu.ts","qualifiedName":"SubmenuOptions"},"80":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItemOptions"},"81":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItemOptions.text"},"82":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItemOptions.item"},"83":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"84":{"sourceFileName":"src/menu.ts","qualifiedName":"__type.About"},"85":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItemOptions"},"86":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItemOptions.checked"},"87":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.id"},"88":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.text"},"89":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.enabled"},"90":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.accelerator"},"91":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.action"},"92":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"93":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"94":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItemOptions"},"95":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItemOptions.icon"},"96":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItemOptions.nativeIcon"},"97":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.id"},"98":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.text"},"99":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.enabled"},"100":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.accelerator"},"101":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemOptions.action"},"102":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"103":{"sourceFileName":"src/menu.ts","qualifiedName":"__type"},"104":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata"},"105":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.name"},"106":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.version"},"107":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.short_version"},"108":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.authors"},"109":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.comments"},"110":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.copyright"},"111":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.license"},"112":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.website"},"113":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.website_label"},"114":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.credits"},"115":{"sourceFileName":"src/menu.ts","qualifiedName":"AboutMetadata.icon"},"116":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon"},"117":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Add"},"118":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Advanced"},"119":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Bluetooth"},"120":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Bookmarks"},"121":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Caution"},"122":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ColorPanel"},"123":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ColumnView"},"124":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Computer"},"125":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.EnterFullScreen"},"126":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Everyone"},"127":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ExitFullScreen"},"128":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FlowView"},"129":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Folder"},"130":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FolderBurnable"},"131":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FolderSmart"},"132":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FollowLinkFreestanding"},"133":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.FontPanel"},"134":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.GoLeft"},"135":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.GoRight"},"136":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Home"},"137":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.IChatTheater"},"138":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.IconView"},"139":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Info"},"140":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.InvalidDataFreestanding"},"141":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.LeftFacingTriangle"},"142":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.ListView"},"143":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.LockLocked"},"144":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.LockUnlocked"},"145":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MenuMixedState"},"146":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MenuOnState"},"147":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MobileMe"},"148":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.MultipleDocuments"},"149":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Network"},"150":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Path"},"151":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.PreferencesGeneral"},"152":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.QuickLook"},"153":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.RefreshFreestanding"},"154":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Refresh"},"155":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Remove"},"156":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.RevealFreestanding"},"157":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.RightFacingTriangle"},"158":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Share"},"159":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.Slideshow"},"160":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.SmartBadge"},"161":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusAvailable"},"162":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusNone"},"163":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusPartiallyAvailable"},"164":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StatusUnavailable"},"165":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StopProgressFreestanding"},"166":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.StopProgress"},"167":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.TrashEmpty"},"168":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.TrashFull"},"169":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.User"},"170":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.UserAccounts"},"171":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.UserGroup"},"172":{"sourceFileName":"src/menu.ts","qualifiedName":"NativeIcon.UserGuest"},"173":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem"},"174":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem.new"},"175":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem.new"},"176":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"177":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem.__constructor"},"178":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItem"},"179":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"180":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"181":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"182":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"183":{"sourceFileName":"src/menu.ts","qualifiedName":"accelerator"},"184":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"185":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"186":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"187":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"188":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"189":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"190":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"191":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"192":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"193":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"194":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"195":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"196":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"197":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"200":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"201":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"202":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"203":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"204":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"205":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem"},"206":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.new"},"207":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.new"},"208":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"209":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.__constructor"},"210":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem"},"211":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"212":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"213":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.isChecked"},"214":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.isChecked"},"215":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.setChecked"},"216":{"sourceFileName":"src/menu.ts","qualifiedName":"CheckMenuItem.setChecked"},"217":{"sourceFileName":"src/menu.ts","qualifiedName":"checked"},"218":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"219":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"220":{"sourceFileName":"src/menu.ts","qualifiedName":"accelerator"},"221":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"222":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"223":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"224":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"225":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"226":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"227":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"228":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"229":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"230":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"231":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"232":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"233":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"234":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"237":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"238":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"239":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"240":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"241":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"242":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"243":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem.new"},"244":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem.new"},"245":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"246":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem.__constructor"},"247":{"sourceFileName":"src/menu.ts","qualifiedName":"PredefinedMenuItem"},"248":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"249":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"250":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"251":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"252":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"253":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"254":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"255":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"256":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"257":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"258":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"261":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"262":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"263":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"264":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"265":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"266":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem"},"267":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.new"},"268":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.new"},"269":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"270":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.__constructor"},"271":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem"},"272":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"273":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"274":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setIcon"},"275":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setIcon"},"276":{"sourceFileName":"src/menu.ts","qualifiedName":"icon"},"277":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setNativeIcon"},"278":{"sourceFileName":"src/menu.ts","qualifiedName":"IconMenuItem.setNativeIcon"},"279":{"sourceFileName":"src/menu.ts","qualifiedName":"icon"},"280":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"281":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase4.setAccelerator"},"282":{"sourceFileName":"src/menu.ts","qualifiedName":"accelerator"},"283":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"284":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"285":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"286":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"287":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"288":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"289":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"290":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"291":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"292":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"293":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"294":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"295":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"296":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"299":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"300":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"301":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"302":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"303":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"304":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu"},"305":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.new"},"306":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.new"},"307":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"308":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.__constructor"},"309":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu"},"310":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"311":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"312":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsWindowsMenuForNSApp"},"313":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsWindowsMenuForNSApp"},"314":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsHelpMenuForNSApp"},"315":{"sourceFileName":"src/menu.ts","qualifiedName":"Submenu.setAsHelpMenuForNSApp"},"316":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"317":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"318":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"319":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"320":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"321":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"322":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"323":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"324":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"325":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"326":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"327":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"328":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"329":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"330":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"331":{"sourceFileName":"src/menu.ts","qualifiedName":"item"},"332":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"333":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"334":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"335":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"336":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"337":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"338":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"339":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"340":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"341":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"342":{"sourceFileName":"src/menu.ts","qualifiedName":"window"},"343":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"344":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"345":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"346":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"347":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"350":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"351":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"352":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"353":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"354":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"355":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"356":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.isEnabled"},"357":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"358":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase3.setEnabled"},"359":{"sourceFileName":"src/menu.ts","qualifiedName":"enabled"},"360":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"361":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.text"},"362":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"363":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase2.setText"},"364":{"sourceFileName":"src/menu.ts","qualifiedName":"text"},"365":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu"},"366":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.new"},"367":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.new"},"368":{"sourceFileName":"src/menu.ts","qualifiedName":"opts"},"369":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.default"},"370":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.default"},"371":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.__constructor"},"372":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu"},"373":{"sourceFileName":"src/menu.ts","qualifiedName":"rid"},"374":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"375":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsAppMenu"},"376":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsAppMenu"},"377":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsWindowMenu"},"378":{"sourceFileName":"src/menu.ts","qualifiedName":"Menu.setAsWindowMenu"},"379":{"sourceFileName":"src/menu.ts","qualifiedName":"window"},"380":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"381":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.append"},"382":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"383":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"384":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"385":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.prepend"},"386":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"387":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"388":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"389":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.insert"},"390":{"sourceFileName":"src/menu.ts","qualifiedName":"T"},"391":{"sourceFileName":"src/menu.ts","qualifiedName":"items"},"392":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"393":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"394":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.remove"},"395":{"sourceFileName":"src/menu.ts","qualifiedName":"item"},"396":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"397":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.removeAt"},"398":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"399":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"400":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.items"},"401":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"402":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.get"},"403":{"sourceFileName":"src/menu.ts","qualifiedName":"id"},"404":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"405":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuBase.popup"},"406":{"sourceFileName":"src/menu.ts","qualifiedName":"window"},"407":{"sourceFileName":"src/menu.ts","qualifiedName":"position"},"408":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#id"},"409":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.#kind"},"410":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"411":{"sourceFileName":"src/menu.ts","qualifiedName":"MenuItemBase.id"},"414":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"415":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"416":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"417":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"418":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"419":{"sourceFileName":"src/path.ts","qualifiedName":""},"420":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory"},"421":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Audio"},"422":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Cache"},"423":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Config"},"424":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Data"},"425":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.LocalData"},"426":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Document"},"427":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Download"},"428":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Picture"},"429":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Public"},"430":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Video"},"431":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Resource"},"432":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Temp"},"433":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppConfig"},"434":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppData"},"435":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLocalData"},"436":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppCache"},"437":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.AppLog"},"438":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Desktop"},"439":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Executable"},"440":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Font"},"441":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Home"},"442":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Runtime"},"443":{"sourceFileName":"src/path.ts","qualifiedName":"BaseDirectory.Template"},"444":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"445":{"sourceFileName":"src/path.ts","qualifiedName":"appConfigDir"},"446":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"447":{"sourceFileName":"src/path.ts","qualifiedName":"appDataDir"},"448":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"449":{"sourceFileName":"src/path.ts","qualifiedName":"appLocalDataDir"},"450":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"451":{"sourceFileName":"src/path.ts","qualifiedName":"appCacheDir"},"452":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"453":{"sourceFileName":"src/path.ts","qualifiedName":"appLogDir"},"454":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"455":{"sourceFileName":"src/path.ts","qualifiedName":"audioDir"},"456":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"457":{"sourceFileName":"src/path.ts","qualifiedName":"cacheDir"},"458":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"459":{"sourceFileName":"src/path.ts","qualifiedName":"configDir"},"460":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"461":{"sourceFileName":"src/path.ts","qualifiedName":"dataDir"},"462":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"463":{"sourceFileName":"src/path.ts","qualifiedName":"desktopDir"},"464":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"465":{"sourceFileName":"src/path.ts","qualifiedName":"documentDir"},"466":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"467":{"sourceFileName":"src/path.ts","qualifiedName":"downloadDir"},"468":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"469":{"sourceFileName":"src/path.ts","qualifiedName":"executableDir"},"470":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"471":{"sourceFileName":"src/path.ts","qualifiedName":"fontDir"},"472":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"473":{"sourceFileName":"src/path.ts","qualifiedName":"homeDir"},"474":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"475":{"sourceFileName":"src/path.ts","qualifiedName":"localDataDir"},"476":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"477":{"sourceFileName":"src/path.ts","qualifiedName":"pictureDir"},"478":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"479":{"sourceFileName":"src/path.ts","qualifiedName":"publicDir"},"480":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"481":{"sourceFileName":"src/path.ts","qualifiedName":"resourceDir"},"482":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"483":{"sourceFileName":"src/path.ts","qualifiedName":"resolveResource"},"484":{"sourceFileName":"src/path.ts","qualifiedName":"resourcePath"},"485":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"486":{"sourceFileName":"src/path.ts","qualifiedName":"runtimeDir"},"487":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"488":{"sourceFileName":"src/path.ts","qualifiedName":"templateDir"},"489":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"490":{"sourceFileName":"src/path.ts","qualifiedName":"videoDir"},"491":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"492":{"sourceFileName":"src/path.ts","qualifiedName":"sep"},"493":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"494":{"sourceFileName":"src/path.ts","qualifiedName":"delimiter"},"495":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"496":{"sourceFileName":"src/path.ts","qualifiedName":"resolve"},"497":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"498":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"499":{"sourceFileName":"src/path.ts","qualifiedName":"normalize"},"500":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"501":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"502":{"sourceFileName":"src/path.ts","qualifiedName":"join"},"503":{"sourceFileName":"src/path.ts","qualifiedName":"paths"},"504":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"505":{"sourceFileName":"src/path.ts","qualifiedName":"dirname"},"506":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"507":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"508":{"sourceFileName":"src/path.ts","qualifiedName":"extname"},"509":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"510":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"511":{"sourceFileName":"src/path.ts","qualifiedName":"basename"},"512":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"513":{"sourceFileName":"src/path.ts","qualifiedName":"ext"},"514":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"515":{"sourceFileName":"src/path.ts","qualifiedName":"isAbsolute"},"516":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"517":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"518":{"sourceFileName":"src/path.ts","qualifiedName":"tempDir"},"519":{"sourceFileName":"src/path.ts","qualifiedName":"path"},"520":{"sourceFileName":"src/tauri.ts","qualifiedName":""},"521":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeArgs"},"522":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeOptions"},"523":{"sourceFileName":"src/tauri.ts","qualifiedName":"InvokeOptions.headers"},"524":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"525":{"sourceFileName":"src/tauri.ts","qualifiedName":"transformCallback"},"526":{"sourceFileName":"src/tauri.ts","qualifiedName":"callback"},"527":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"528":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"529":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"530":{"sourceFileName":"src/tauri.ts","qualifiedName":"once"},"531":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"532":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__constructor"},"533":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel"},"534":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"535":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.id"},"536":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.__TAURI_CHANNEL_MARKER__"},"537":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.#onmessage"},"538":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"539":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"540":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"541":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"542":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"543":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"544":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"545":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"546":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.onmessage"},"547":{"sourceFileName":"src/tauri.ts","qualifiedName":"handler"},"548":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"549":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"550":{"sourceFileName":"src/tauri.ts","qualifiedName":"response"},"551":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"552":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.toJSON"},"553":{"sourceFileName":"src/tauri.ts","qualifiedName":"Channel.T"},"554":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"555":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.__constructor"},"556":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener"},"557":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"558":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"559":{"sourceFileName":"src/tauri.ts","qualifiedName":"channelId"},"560":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.plugin"},"561":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.event"},"562":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.channelId"},"563":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"564":{"sourceFileName":"src/tauri.ts","qualifiedName":"PluginListener.unregister"},"565":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"566":{"sourceFileName":"src/tauri.ts","qualifiedName":"addPluginListener"},"567":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"568":{"sourceFileName":"src/tauri.ts","qualifiedName":"plugin"},"569":{"sourceFileName":"src/tauri.ts","qualifiedName":"event"},"570":{"sourceFileName":"src/tauri.ts","qualifiedName":"cb"},"571":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"572":{"sourceFileName":"src/tauri.ts","qualifiedName":"__type"},"573":{"sourceFileName":"src/tauri.ts","qualifiedName":"payload"},"574":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"575":{"sourceFileName":"src/tauri.ts","qualifiedName":"invoke"},"576":{"sourceFileName":"src/tauri.ts","qualifiedName":"T"},"577":{"sourceFileName":"src/tauri.ts","qualifiedName":"cmd"},"578":{"sourceFileName":"src/tauri.ts","qualifiedName":"args"},"579":{"sourceFileName":"src/tauri.ts","qualifiedName":"options"},"580":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"581":{"sourceFileName":"src/tauri.ts","qualifiedName":"convertFileSrc"},"582":{"sourceFileName":"src/tauri.ts","qualifiedName":"filePath"},"583":{"sourceFileName":"src/tauri.ts","qualifiedName":"protocol"},"584":{"sourceFileName":"src/tray.ts","qualifiedName":""},"585":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent"},"586":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.id"},"587":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.x"},"588":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.y"},"589":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.iconRect"},"590":{"sourceFileName":"src/tray.ts","qualifiedName":"__type"},"591":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.left"},"592":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.top"},"593":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.right"},"594":{"sourceFileName":"src/tray.ts","qualifiedName":"__type.bottom"},"595":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconEvent.clickType"},"596":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions"},"597":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.id"},"598":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.menu"},"599":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.icon"},"600":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.tooltip"},"601":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.title"},"602":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.tempDirPath"},"603":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.iconAsTemplate"},"604":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIconOptions.menuOnLeftClieck"},"605":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon"},"606":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.new"},"607":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.new"},"608":{"sourceFileName":"src/tray.ts","qualifiedName":"options"},"609":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.__constructor"},"610":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon"},"611":{"sourceFileName":"src/tray.ts","qualifiedName":"rid"},"612":{"sourceFileName":"src/tray.ts","qualifiedName":"id"},"613":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.id"},"614":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIcon"},"615":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIcon"},"616":{"sourceFileName":"src/tray.ts","qualifiedName":"icon"},"617":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenu"},"618":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenu"},"619":{"sourceFileName":"src/tray.ts","qualifiedName":"menu"},"620":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTooltip"},"621":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTooltip"},"622":{"sourceFileName":"src/tray.ts","qualifiedName":"tooltip"},"623":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTitle"},"624":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTitle"},"625":{"sourceFileName":"src/tray.ts","qualifiedName":"title"},"626":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setVisible"},"627":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setVisible"},"628":{"sourceFileName":"src/tray.ts","qualifiedName":"visible"},"629":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTempDirPath"},"630":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setTempDirPath"},"631":{"sourceFileName":"src/tray.ts","qualifiedName":"path"},"632":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIconAsTemplate"},"633":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setIconAsTemplate"},"634":{"sourceFileName":"src/tray.ts","qualifiedName":"asTemplate"},"635":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenuOnLeftClick"},"636":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.setMenuOnLeftClick"},"637":{"sourceFileName":"src/tray.ts","qualifiedName":"onLeft"},"638":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.on"},"639":{"sourceFileName":"src/tray.ts","qualifiedName":"TrayIcon.on"},"640":{"sourceFileName":"src/tray.ts","qualifiedName":"handler"},"641":{"sourceFileName":"src/tray.ts","qualifiedName":"__type"},"642":{"sourceFileName":"src/tray.ts","qualifiedName":"__type"},"643":{"sourceFileName":"src/tray.ts","qualifiedName":"event"},"644":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.#rid"},"645":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"646":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.rid"},"647":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"},"648":{"sourceFileName":"src/internal/index.ts","qualifiedName":"Resource.close"}}} \ No newline at end of file From 99398f2455da91c37887d6833b77ce0b4653730b Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 18:48:07 +0300 Subject: [PATCH 14/64] fix check license header script --- .scripts/ci/check-license-header.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.scripts/ci/check-license-header.js b/.scripts/ci/check-license-header.js index d0d6dc68f98..ca6b4a3d44a 100644 --- a/.scripts/ci/check-license-header.js +++ b/.scripts/ci/check-license-header.js @@ -13,6 +13,8 @@ SPDX-License-Identifier: Apache-2.0 SPDX-License-Identifier: MIT` const bundlerLicense = '// Copyright 2016-2019 Cargo-Bundle developers ' +const denoLicense = + '// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.' const extensions = ['.rs', '.js', '.ts', '.yml', '.swift', '.kt'] const ignore = [ @@ -26,7 +28,10 @@ const ignore = [ ] async function checkFile(file) { - if (extensions.some((e) => file.endsWith(e)) && !ignore.some((i) => file.includes(`/${i}/`))) { + if ( + extensions.some((e) => file.endsWith(e)) && + !ignore.some((i) => file.includes(`/${i}/`)) + ) { const fileStream = fs.createReadStream(file) const rl = readline.createInterface({ input: fileStream, @@ -41,7 +46,8 @@ async function checkFile(file) { line.length === 0 || line.startsWith('#!') || line.startsWith('// swift-tools-version:') || - line === bundlerLicense + line === bundlerLicense || + line === denoLicense ) { continue } From 46c0e7ec6d527b02ae1ceb4d8095545d8940b72c Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 18:55:02 +0300 Subject: [PATCH 15/64] fix android and ios build --- core/tauri/src/app.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/core/tauri/src/app.rs b/core/tauri/src/app.rs index 054b90eaeff..ea04b7ab90a 100644 --- a/core/tauri/src/app.rs +++ b/core/tauri/src/app.rs @@ -812,6 +812,7 @@ impl App { self.handle.plugin(crate::path::init())?; self.handle.plugin(crate::event::init())?; self.handle.plugin(crate::resources::plugin::init())?; + #[cfg(desktop)] self.handle.plugin(crate::menu::plugin::init())?; #[cfg(all(desktop, feature = "tray-icon"))] self.handle.plugin(crate::tray::plugin::init())?; From cb3122b4e0efd0702333075dc3bd3b0ff00ce043 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Tue, 29 Aug 2023 19:14:36 +0300 Subject: [PATCH 16/64] change file --- .changes/api-tray-menu.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/api-tray-menu.md diff --git a/.changes/api-tray-menu.md b/.changes/api-tray-menu.md new file mode 100644 index 00000000000..ab9143fd626 --- /dev/null +++ b/.changes/api-tray-menu.md @@ -0,0 +1,5 @@ +--- +'@tauri-apps/api': 'minor' +--- + +Add `tray` and `menu` modules to create and manage tray icons and menus from Javascript. From 7e046d8b78d881913a65e883437786d7a68cba0a Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 30 Aug 2023 03:50:38 +0300 Subject: [PATCH 17/64] change tag --- .changes/api-tray-menu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changes/api-tray-menu.md b/.changes/api-tray-menu.md index ab9143fd626..2071bcca177 100644 --- a/.changes/api-tray-menu.md +++ b/.changes/api-tray-menu.md @@ -1,5 +1,5 @@ --- -'@tauri-apps/api': 'minor' +'@tauri-apps/api': 'minor:feat' --- Add `tray` and `menu` modules to create and manage tray icons and menus from Javascript. From 432c5cd39bbe074543c5973e4865c96a9ea4ae4d Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Mon, 18 Sep 2023 23:13:53 +0300 Subject: [PATCH 18/64] fmt --- core/tauri/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tauri/src/lib.rs b/core/tauri/src/lib.rs index 0f0993b2e04..2451d5484f7 100644 --- a/core/tauri/src/lib.rs +++ b/core/tauri/src/lib.rs @@ -84,8 +84,8 @@ pub mod ipc; mod manager; mod pattern; pub mod plugin; -mod resources; pub(crate) mod protocol; +mod resources; mod vibrancy; pub mod window; use tauri_runtime as runtime; From ebcafa2584c3a174b77516334d0a784a5777a9f8 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 11 Oct 2023 22:43:55 +0300 Subject: [PATCH 19/64] Apply suggestions from code review Co-authored-by: Lucas Fernandes Nogueira --- core/tauri-macros/src/lib.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/tauri-macros/src/lib.rs b/core/tauri-macros/src/lib.rs index 9a55c23b7c1..104dd31a6aa 100644 --- a/core/tauri-macros/src/lib.rs +++ b/core/tauri-macros/src/lib.rs @@ -91,11 +91,11 @@ pub fn default_runtime(attributes: TokenStream, input: TokenStream) -> TokenStre runtime::default_runtime(attributes, input).into() } -/// Accepets a closure-like syntax to call arbitray code on a menu item -/// after mathcing against `kind` and retreiveing it from `resources_table` using `rid`. +/// Accepts a closure-like syntax to call arbitrary code on a menu item +/// after matching against `kind` and retrieving it from `resources_table` using `rid`. /// -/// You can optionally pass a third paraemeter to select which item kinds -/// to match agains, by providing a `|` separated list of item kinds +/// You can optionally pass a third parameter to select which item kinds +/// to match against, by providing a `|` separated list of item kinds /// ```ignore /// do_menu_item!(|i| i.set_text(text), Check | Submenu); /// ``` From efdb6ec2d3e393253628deef31675181b9ecd9be Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 11 Oct 2023 22:45:27 +0300 Subject: [PATCH 20/64] Update core/tauri/src/resources/mod.rs Co-authored-by: Lucas Fernandes Nogueira --- core/tauri/src/resources/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tauri/src/resources/mod.rs b/core/tauri/src/resources/mod.rs index 95dd3a6bf14..e17e6723687 100644 --- a/core/tauri/src/resources/mod.rs +++ b/core/tauri/src/resources/mod.rs @@ -17,7 +17,7 @@ use std::{ /// Resources are Rust objects that are stored in [ResourceTable] and managed by tauri. /// They are identified in JS by a numeric ID (the resource ID, or rid). -/// Resources can be created in endpoints. Resources can also be retrieved in endpoints by +/// Resources can be created in commands. Resources can also be retrieved in commands by /// their rid. Resources are thread-safe. /// /// Resources are reference counted in Rust. This means that they can be From 7ac11576d41f888ecfede19669191f3abba335b6 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 11 Oct 2023 22:47:40 +0300 Subject: [PATCH 21/64] Update core/tauri-macros/src/menu.rs Co-authored-by: Lucas Fernandes Nogueira --- core/tauri-macros/src/menu.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/tauri-macros/src/menu.rs b/core/tauri-macros/src/menu.rs index 4f947b83d87..9d2d0e72232 100644 --- a/core/tauri-macros/src/menu.rs +++ b/core/tauri-macros/src/menu.rs @@ -63,12 +63,7 @@ pub fn do_menu_item(input: DoMenuItemInput) -> TokenStream { kinds.extend(defaults.clone()); } - let mut has_negated: bool = false; - for NegatedIdent(negated, _) in &kinds { - if *negated && !has_negated { - has_negated = true; - } - } + let has_negated = kinds.iter().any(|n| n.0); if has_negated { kinds.extend(defaults); From ff7b46f8c56af1d1750f9c22278e329234416eaf Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 11 Oct 2023 22:48:15 +0300 Subject: [PATCH 22/64] Update core/tauri/src/resources/mod.rs Co-authored-by: Lucas Fernandes Nogueira --- core/tauri/src/resources/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tauri/src/resources/mod.rs b/core/tauri/src/resources/mod.rs index e17e6723687..bc14f742d34 100644 --- a/core/tauri/src/resources/mod.rs +++ b/core/tauri/src/resources/mod.rs @@ -95,7 +95,7 @@ impl ResourceTable { /// The resource type is erased at runtime and must be statically known /// when retrieving it through `get()`. /// - /// Returns a unique resource ID, which acts as a key for this resource. + /// Returns an unique resource ID, which acts as a key for this resource. pub(crate) fn add_arc(&mut self, resource: Arc) -> ResourceId { let resource = resource as Arc; self.add_arc_dyn(resource) From 11e6e21ccd422fa11d89e8256fa85dd6ad5b8562 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 11 Oct 2023 22:48:38 +0300 Subject: [PATCH 23/64] Update core/tauri/src/resources/mod.rs Co-authored-by: Lucas Fernandes Nogueira --- core/tauri/src/resources/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tauri/src/resources/mod.rs b/core/tauri/src/resources/mod.rs index bc14f742d34..dfbd6d83bcf 100644 --- a/core/tauri/src/resources/mod.rs +++ b/core/tauri/src/resources/mod.rs @@ -112,7 +112,7 @@ impl ResourceTable { /// Returns a reference counted pointer to the resource of type `T` with the /// given `rid`. If `rid` is not present or has a type different than `T`, - /// this function returns `None`. + /// this function returns [`Error::BadResourceId`]. pub(crate) fn get(&self, rid: ResourceId) -> Result, Error> { self .index From 97af23a624f02d9ca1864ec955c44dfce679dfd0 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Wed, 11 Oct 2023 23:14:00 +0300 Subject: [PATCH 24/64] Update core/tauri-macros/src/menu.rs Co-authored-by: Lucas Fernandes Nogueira --- core/tauri-macros/src/menu.rs | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/core/tauri-macros/src/menu.rs b/core/tauri-macros/src/menu.rs index 9d2d0e72232..9177975d024 100644 --- a/core/tauri-macros/src/menu.rs +++ b/core/tauri-macros/src/menu.rs @@ -73,15 +73,19 @@ pub fn do_menu_item(input: DoMenuItemInput) -> TokenStream { let (kinds, types): (Vec, Vec) = kinds .into_iter() - .filter_map(|nident| match nident.1 { - i if i == "MenuItem" && !nident.0 => Some((i, Ident::new("MenuItem", Span::call_site()))), - i if i == "Submenu" && !nident.0 => Some((i, Ident::new("Submenu", Span::call_site()))), - i if i == "Predefined" && !nident.0 => { - Some((i, Ident::new("PredefinedMenuItem", Span::call_site()))) + .filter_map(|nident| { + if nident.0 { + None + } else { + match nident.1 { + i if i == "MenuItem" => Some((i, Ident::new("MenuItem", Span::call_site()))), + i if i == "Submenu" => Some((i, Ident::new("Submenu", Span::call_site()))), + i if i == "Predefined" => Some((i, Ident::new("PredefinedMenuItem", Span::call_site()))), + i if i == "Check" => Some((i, Ident::new("CheckMenuItem", Span::call_site()))), + i if i == "Icon" => Some((i, Ident::new("IconMenuItem", Span::call_site()))), + _ => None, + } } - i if i == "Check" && !nident.0 => Some((i, Ident::new("CheckMenuItem", Span::call_site()))), - i if i == "Icon" && !nident.0 => Some((i, Ident::new("IconMenuItem", Span::call_site()))), - _ => None, }) .unzip(); From 0945ba10be00af58216b4e4b503ae7afd21f009b Mon Sep 17 00:00:00 2001 From: amrbashir Date: Thu, 12 Oct 2023 16:40:24 +0300 Subject: [PATCH 25/64] lints, safety comments, remove unsused code --- core/tauri-runtime/src/window.rs | 7 +++---- core/tauri/src/manager.rs | 2 +- core/tauri/src/resources/mod.rs | 21 +++------------------ core/tauri/src/window.rs | 2 +- 4 files changed, 8 insertions(+), 24 deletions(-) diff --git a/core/tauri-runtime/src/window.rs b/core/tauri-runtime/src/window.rs index c5e4fb50057..a88b1a9ab33 100644 --- a/core/tauri-runtime/src/window.rs +++ b/core/tauri-runtime/src/window.rs @@ -320,10 +320,9 @@ impl> PendingWindow { protocol: H, ) { let uri_scheme = uri_scheme.into(); - self.uri_scheme_protocols.insert( - uri_scheme, - Box::new(move |data, responder| (protocol)(data, responder)), - ); + self + .uri_scheme_protocols + .insert(uri_scheme, Box::new(protocol)); } #[cfg(target_os = "android")] diff --git a/core/tauri/src/manager.rs b/core/tauri/src/manager.rs index 7410db57703..b54568e76b4 100644 --- a/core/tauri/src/manager.rs +++ b/core/tauri/src/manager.rs @@ -205,7 +205,7 @@ fn replace_csp_nonce( .into_iter() .map(|n| format!("'nonce-{n}'")) .collect::>(); - let sources = csp.entry(directive.into()).or_insert_with(Default::default); + let sources = csp.entry(directive.into()).or_default(); let self_source = "'self'".to_string(); if !sources.contains(&self_source) { sources.push(self_source); diff --git a/core/tauri/src/resources/mod.rs b/core/tauri/src/resources/mod.rs index dfbd6d83bcf..8594c55d27f 100644 --- a/core/tauri/src/resources/mod.rs +++ b/core/tauri/src/resources/mod.rs @@ -48,9 +48,10 @@ impl dyn Resource { #[allow(clippy::needless_lifetimes)] pub(crate) fn downcast_arc<'a, T: Resource>(self: &'a Arc) -> Option<&'a Arc> { if self.is::() { + // A resource is stored as `Arc` in a BTreeMap + // and is safe to cast to `Arc` because of the runtime + // check done in `self.is::()` let ptr = self as *const Arc<_> as *const Arc; - // TODO(piscisaureus): safety comment - #[allow(clippy::undocumented_unsafe_blocks)] Some(unsafe { &*ptr }) } else { None @@ -122,22 +123,6 @@ impl ResourceTable { .ok_or_else(|| Error::BadResourceId(rid)) } - // /// Removes a resource of type `T` from the resource table and returns it. - // /// If a resource with the given `rid` exists but its type does not match `T`, - // /// it is not removed from the resource table. Note that the resource's - // /// `close()` method is *not* called. - // /// - // /// Also note that there might be a case where - // /// the returned `Arc` is referenced by other variables. That is, we cannot - // /// assume that `Arc::strong_count(&returned_arc)` is always equal to 1 on success. - // /// In particular, be really careful when you want to extract the inner value of - // /// type `T` from `Arc`. - // pub(crate) fn take(&mut self, rid: ResourceId) -> Result, Error> { - // let resource = self.get::(rid)?; - // self.index.remove(&rid); - // Ok(resource) - // } - /// Removes the resource with the given `rid` from the resource table. If the /// only reference to this resource existed in the resource table, this will /// cause the resource to be dropped. However, since resources are reference diff --git a/core/tauri/src/window.rs b/core/tauri/src/window.rs index 9da21191671..a3a3422e343 100644 --- a/core/tauri/src/window.rs +++ b/core/tauri/src/window.rs @@ -2247,7 +2247,7 @@ impl Window { window_label, event, }) - .or_insert_with(Default::default) + .or_default() .insert(event_id); Ok(event_id) From 94ee625352004802e06828a11c37b4164d8e45b7 Mon Sep 17 00:00:00 2001 From: amrbashir Date: Thu, 12 Oct 2023 16:52:33 +0300 Subject: [PATCH 26/64] whitespace and removed clippy lint --- core/tauri/src/ipc/channel.rs | 2 +- core/tauri/src/resources/mod.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/core/tauri/src/ipc/channel.rs b/core/tauri/src/ipc/channel.rs index 76a9101ceba..7a746fc6374 100644 --- a/core/tauri/src/ipc/channel.rs +++ b/core/tauri/src/ipc/channel.rs @@ -100,7 +100,7 @@ impl Channel { self.id } - /// Sends the given data through the channel. + /// Sends the given data through the channel. pub fn send(&self, data: T) -> crate::Result<()> { let body = data.body()?; (self.on_message)(body) diff --git a/core/tauri/src/resources/mod.rs b/core/tauri/src/resources/mod.rs index 8594c55d27f..bf176eee778 100644 --- a/core/tauri/src/resources/mod.rs +++ b/core/tauri/src/resources/mod.rs @@ -45,7 +45,6 @@ impl dyn Resource { } #[inline(always)] - #[allow(clippy::needless_lifetimes)] pub(crate) fn downcast_arc<'a, T: Resource>(self: &'a Arc) -> Option<&'a Arc> { if self.is::() { // A resource is stored as `Arc` in a BTreeMap From c4b3ae48be2770d258ca1242b4c2a25188ff4108 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 23 Oct 2023 17:34:26 -0300 Subject: [PATCH 27/64] typo --- tooling/api/src/menu.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 509ef620aac..d840bf5113b 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -727,7 +727,7 @@ interface CheckMenuItemOptions extends MenuItemOptions { } /** - * A chcek menu item inside a {@linkcode Menu} or {@linkcode Submenu} + * A check menu item inside a {@linkcode Menu} or {@linkcode Submenu} * and usually contains a text and a check mark or a similar toggle * that corresponds to a checked and unchecked states. */ From 90030a482fbb534e82fe998c09deb1444d0717e4 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 23 Oct 2023 17:53:05 -0300 Subject: [PATCH 28/64] use channels --- core/tauri/scripts/bundle.global.js | 2 +- core/tauri/src/menu/plugin.rs | 23 ++++- core/tauri/src/tray/plugin.rs | 10 ++- tooling/api/src/event.ts | 4 +- tooling/api/src/menu.ts | 134 +++++++++------------------- tooling/api/src/tray.ts | 51 +++-------- tooling/api/src/window.ts | 21 ----- 7 files changed, 85 insertions(+), 160 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 9087af5108d..da9864ca6b3 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var K=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)K(t,n,{get:e[n],enumerable:!0})},_e=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of we(e))!Pe.call(t,a)&&a!==n&&K(t,a,{get:()=>e[a],enumerable:!(r=ye(e,a))||r.enumerable});return t};var ve=t=>_e(K({},"__esModule",{value:!0}),t);var se=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var m=(t,e,n)=>(se(t,e,"read from private field"),n?n.call(t):e.get(t)),b=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},y=(t,e,n,r)=>(se(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var pn={};d(pn,{app:()=>Q,dpi:()=>Y,event:()=>B,menu:()=>re,path:()=>X,primitives:()=>j,tray:()=>ne,window:()=>J});var Q={};d(Q,{getName:()=>Ie,getTauriVersion:()=>Se,getVersion:()=>Me,hide:()=>Te,show:()=>Ae});var j={};d(j,{Channel:()=>E,PluginListener:()=>x,addPluginListener:()=>fe,convertFileSrc:()=>ke,invoke:()=>i,transformCallback:()=>L});function L(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var w,E=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;b(this,w,()=>{});this.id=L(e=>{m(this,w).call(this,e)})}set onmessage(e){y(this,w,e)}get onmessage(){return m(this,w)}toJSON(){return`__CHANNEL__:${this.id}`}};w=new WeakMap;var x=class{constructor(e,n,r){this.plugin=e,this.event=n,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function fe(t,e,n){let r=new E;return r.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:r}).then(()=>new x(t,e,r.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function ke(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function Me(){return i("plugin:app|version")}async function Ie(){return i("plugin:app|name")}async function Se(){return i("plugin:app|tauri_version")}async function Ae(){return i("plugin:app|app_show")}async function Te(){return i("plugin:app|app_hide")}var B={};d(B,{TauriEvent:()=>M,emit:()=>$,listen:()=>p,once:()=>q});var M=(u=>(u.WINDOW_RESIZED="tauri://resize",u.WINDOW_MOVED="tauri://move",u.WINDOW_CLOSE_REQUESTED="tauri://close-requested",u.WINDOW_CREATED="tauri://window-created",u.WINDOW_DESTROYED="tauri://destroyed",u.WINDOW_FOCUS="tauri://focus",u.WINDOW_BLUR="tauri://blur",u.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",u.WINDOW_THEME_CHANGED="tauri://theme-changed",u.WINDOW_FILE_DROP="tauri://file-drop",u.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",u.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",u.MENU="tauri://menu",u.TRAY="tauri://tray",u))(M||{});async function oe(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function p(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:L(e)}).then(r=>async()=>oe(t,r))}async function q(t,e,n){return p(t,r=>{e(r),oe(t,r.id).catch(()=>{})},n)}async function $(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var J={};d(J,{CloseRequestedEvent:()=>D,Effect:()=>ce,EffectState:()=>de,LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h,ProgressBarStatus:()=>ue,UserAttentionType:()=>ae,Window:()=>I,availableMonitors:()=>Ee,currentMonitor:()=>Ce,getAll:()=>F,getCurrent:()=>v,primaryMonitor:()=>Oe});var Y={};d(Y,{LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h});var P=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},h=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new P(this.width/e,this.height/e)}},_=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},g=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new _(this.x/e,this.y/e)}};var ae=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(ae||{}),D=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},ue=(c=>(c.None="none",c.Normal="normal",c.Indeterminate="indeterminate",c.Paused="paused",c.Error="error",c))(ue||{});function v(){return new I(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function F(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new I(t.label,{skip:!0}))}var le=["tauri://created","tauri://error"],I=class t{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return F().some(n=>n.label===e)?new t(e,{skip:!0}):null}static getCurrent(){return v()}static getAll(){return F()}static async getFocusedWindow(){for(let e of F())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):p(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):q(e,n,{target:this.label})}async emit(e,n){if(le.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return $(e,n,{target:this.label})}_handleTauriEvent(e,n){return le.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value: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("plugin:window|set_size",{label:this.label,value:{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("plugin:window|set_min_size",{label:this.label,value: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("plugin:window|set_max_size",{label:this.label,value: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("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value: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("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=pe(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=me(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let r=new D(n);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",a=>{e({...a,payload:!0})}),r=await this.listen("tauri://blur",a=>{e({...a,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onMenuClicked(e){return this.listen("tauri://menu",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",c=>{e({...c,payload:{type:"drop",paths:c.payload}})}),r=await this.listen("tauri://file-drop-hover",c=>{e({...c,payload:{type:"hover",paths:c.payload}})}),a=await this.listen("tauri://file-drop-cancelled",c=>{e({...c,payload:{type:"cancel"}})});return()=>{n(),r(),a()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},ce=(l=>(l.AppearanceBased="appearanceBased",l.Light="light",l.Dark="dark",l.MediumLight="mediumLight",l.UltraDark="ultraDark",l.Titlebar="titlebar",l.Selection="selection",l.Menu="menu",l.Popover="popover",l.Sidebar="sidebar",l.HeaderView="headerView",l.Sheet="sheet",l.WindowBackground="windowBackground",l.HudWindow="hudWindow",l.FullScreenUI="fullScreenUI",l.Tooltip="tooltip",l.ContentBackground="contentBackground",l.UnderWindowBackground="underWindowBackground",l.UnderPageBackground="underPageBackground",l.Mica="mica",l.Blur="blur",l.Acrylic="acrylic",l.Tabbed="tabbed",l.TabbedDark="tabbedDark",l.TabbedLight="tabbedLight",l))(ce||{}),de=(r=>(r.FollowsWindowActiveState="followsWindowActiveState",r.Active="active",r.Inactive="inactive",r))(de||{});function Z(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:me(t.position),size:pe(t.size)}}function me(t){return new g(t.x,t.y)}function pe(t){return new h(t.width,t.height)}async function Ce(){return i("plugin:window|current_monitor").then(Z)}async function Oe(){return i("plugin:window|primary_monitor").then(Z)}async function Ee(){return i("plugin:window|available_monitors").then(t=>t.map(Z))}var X={};d(X,{BaseDirectory:()=>he,appCacheDir:()=>De,appConfigDir:()=>xe,appDataDir:()=>Le,appLocalDataDir:()=>Fe,appLogDir:()=>en,audioDir:()=>Re,basename:()=>cn,cacheDir:()=>ze,configDir:()=>Ue,dataDir:()=>We,delimiter:()=>rn,desktopDir:()=>He,dirname:()=>an,documentDir:()=>Ne,downloadDir:()=>Ve,executableDir:()=>Ge,extname:()=>un,fontDir:()=>Ke,homeDir:()=>je,isAbsolute:()=>dn,join:()=>ln,localDataDir:()=>Qe,normalize:()=>on,pictureDir:()=>qe,publicDir:()=>$e,resolve:()=>sn,resolveResource:()=>Ye,resourceDir:()=>Be,runtimeDir:()=>Ze,sep:()=>tn,tempDir:()=>nn,templateDir:()=>Je,videoDir:()=>Xe});var he=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(he||{});async function xe(){return i("plugin:path|resolve_directory",{directory:13})}async function Le(){return i("plugin:path|resolve_directory",{directory:14})}async function Fe(){return i("plugin:path|resolve_directory",{directory:15})}async function De(){return i("plugin:path|resolve_directory",{directory:16})}async function Re(){return i("plugin:path|resolve_directory",{directory:1})}async function ze(){return i("plugin:path|resolve_directory",{directory:2})}async function Ue(){return i("plugin:path|resolve_directory",{directory:3})}async function We(){return i("plugin:path|resolve_directory",{directory:4})}async function He(){return i("plugin:path|resolve_directory",{directory:18})}async function Ne(){return i("plugin:path|resolve_directory",{directory:6})}async function Ve(){return i("plugin:path|resolve_directory",{directory:7})}async function Ge(){return i("plugin:path|resolve_directory",{directory:19})}async function Ke(){return i("plugin:path|resolve_directory",{directory:20})}async function je(){return i("plugin:path|resolve_directory",{directory:21})}async function Qe(){return i("plugin:path|resolve_directory",{directory:5})}async function qe(){return i("plugin:path|resolve_directory",{directory:8})}async function $e(){return i("plugin:path|resolve_directory",{directory:9})}async function Be(){return i("plugin:path|resolve_directory",{directory:11})}async function Ye(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Ze(){return i("plugin:path|resolve_directory",{directory:22})}async function Je(){return i("plugin:path|resolve_directory",{directory:23})}async function Xe(){return i("plugin:path|resolve_directory",{directory:10})}async function en(){return i("plugin:path|resolve_directory",{directory:17})}async function nn(t){return i("plugin:path|resolve_directory",{directory:12})}function tn(){return window.__TAURI_INTERNALS__.plugins.path.sep}function rn(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function sn(...t){return i("plugin:path|resolve",{paths:t})}async function on(t){return i("plugin:path|normalize",{path:t})}async function ln(...t){return i("plugin:path|join",{paths:t})}async function an(t){return i("plugin:path|dirname",{path:t})}async function un(t){return i("plugin:path|extname",{path:t})}async function cn(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function dn(t){return i("plugin:path|isAbsolute",{path:t})}var ne={};d(ne,{TrayIcon:()=>ee});var S,f=class{constructor(e){b(this,S,void 0);y(this,S,e)}get rid(){return m(this,S)}async close(){return i("plugin:resources|close",{rid:this.rid})}};S=new WeakMap;function ge(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)??Object.create(null))})})}var ee=class t extends f{constructor(n,r){super(n);this.id=r}static async new(n){return n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),i("plugin:tray|new",{options:n??{}}).then(([r,a])=>new t(r,a))}async setIcon(n){return i("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),i("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return i("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return i("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return i("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return i("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return i("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return i("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}async on(n){return p("tauri://tray",r=>{r.payload.id===this.id&&n(r.payload)},{target:v().label})}};var re={};d(re,{CheckMenuItem:()=>V,IconMenuItem:()=>G,Menu:()=>te,MenuItem:()=>H,NativeIcon:()=>be,PredefinedMenuItem:()=>N,Submenu:()=>T});async function mn(t,e){if(!window.__TAURI_MENU__){window.__TAURI_MENU__={handlers:{}};let n=await p("tauri://menu",r=>{let a=window.__TAURI_MENU__?.handlers[r.payload.id];if(a)for(e of a)e()},{target:v().label});window.addEventListener("unload",n)}window.__TAURI_MENU__.handlers[t]||(window.__TAURI_MENU__.handlers[t]=[]),window.__TAURI_MENU__.handlers[t].push(e)}var be=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(be||{});function ie([t,e,n]){switch(n){case"Submenu":return new T(t,e);case"Predefined":return new N(t,e);case"Check":return new V(t,e);case"Icon":return new G(t,e);case"MenuItem":default:return new H(t,e)}}async function k(t,e){let n=null,r=null;return e&&("action"in e&&e.action!==void 0&&(n=e.action),"items"in e&&(r=e.items.map(a=>[a.rid,a.kind]))),i("plugin:menu|new",{kind:t,options:e?{...e,items:r}:void 0}).then(a=>(n&&mn(a[1],n),a))}var C,O,R=class extends f{constructor(n,r,a){super(n);b(this,C,void 0);b(this,O,void 0);y(this,C,r),y(this,O,a)}get id(){return m(this,C)}get kind(){return m(this,O)}};C=new WeakMap,O=new WeakMap;var z=class extends R{async append(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return i("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return i("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(r=>[r.rid,r.kind]),position:n})}async remove(e){return i("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return i("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(ie)}async items(){return i("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(ie))}async get(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?ie(n):null)}async popup(e,n){return i("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},te=class t extends z{constructor(e,n){super(e,n,"Menu")}static async new(e){return k("Menu",e).then(([n,r])=>new t(n,r))}static async default(){return i("plugin:menu|default").then(([e,n])=>new t(e,n))}async setAsAppMenu(){return i("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new t(e[0],e[1]):null)}async setAsWindowMenu(e){return i("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new t(n[0],n[1]):null)}},U=class extends R{async text(){return i("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return i("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},W=class extends U{async isEnabled(){return i("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return i("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},A=class extends W{async setAccelerator(e){return i("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},H=class t extends A{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return k("MenuItem",e).then(([n,r])=>new t(n,r))}},T=class t extends z{constructor(e,n){super(e,n,"Submenu")}static async new(e){return k("Submenu",e).then(([n,r])=>new t(n,r))}async setAsWindowsMenuForNSApp(){return i("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return i("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};ge(T,W);var N=class t extends U{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return k("MenuItem",e).then(([n,r])=>new t(n,r))}},V=class t extends A{constructor(e,n){super(e,n,"Check")}static async new(e){return k("Check",e).then(([n,r])=>new t(n,r))}async isChecked(){return i("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return i("plugin:menu|set_checked",{rid:this.rid,checked:e})}},G=class t extends A{constructor(e,n){super(e,n,"Icon")}static async new(e){return k("Icon",e).then(([n,r])=>new t(n,r))}async setIcon(e){return i("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return i("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};return ve(pn);})(); +"use strict";var __TAURI_IIFE__=(()=>{var G=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)G(t,n,{get:e[n],enumerable:!0})},_e=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of we(e))!Pe.call(t,l)&&l!==n&&G(t,l,{get:()=>e[l],enumerable:!(r=ye(e,l))||r.enumerable});return t};var ve=t=>_e(G({},"__esModule",{value:!0}),t);var re=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var m=(t,e,n)=>(re(t,e,"read from private field"),n?n.call(t):e.get(t)),b=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},y=(t,e,n,r)=>(re(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var mn={};d(mn,{app:()=>K,dpi:()=>B,event:()=>$,menu:()=>te,path:()=>Y,primitives:()=>N,tray:()=>ee,window:()=>J});var K={};d(K,{getName:()=>Se,getTauriVersion:()=>Ie,getVersion:()=>Me,hide:()=>Ce,show:()=>Ae});var N={};d(N,{Channel:()=>p,PluginListener:()=>O,addPluginListener:()=>fe,convertFileSrc:()=>ke,invoke:()=>i,transformCallback:()=>T});function T(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var w,p=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;b(this,w,()=>{});this.id=T(e=>{m(this,w).call(this,e)})}set onmessage(e){y(this,w,e)}get onmessage(){return m(this,w)}toJSON(){return`__CHANNEL__:${this.id}`}};w=new WeakMap;var O=class{constructor(e,n,r){this.plugin=e,this.event=n,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function fe(t,e,n){let r=new p;return r.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:r}).then(()=>new O(t,e,r.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function ke(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function Me(){return i("plugin:app|version")}async function Se(){return i("plugin:app|name")}async function Ie(){return i("plugin:app|tauri_version")}async function Ae(){return i("plugin:app|app_show")}async function Ce(){return i("plugin:app|app_hide")}var $={};d($,{TauriEvent:()=>j,emit:()=>q,listen:()=>x,once:()=>Q});var j=(c=>(c.WINDOW_RESIZED="tauri://resize",c.WINDOW_MOVED="tauri://move",c.WINDOW_CLOSE_REQUESTED="tauri://close-requested",c.WINDOW_CREATED="tauri://window-created",c.WINDOW_DESTROYED="tauri://destroyed",c.WINDOW_FOCUS="tauri://focus",c.WINDOW_BLUR="tauri://blur",c.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",c.WINDOW_THEME_CHANGED="tauri://theme-changed",c.WINDOW_FILE_DROP="tauri://file-drop",c.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",c.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",c))(j||{});async function se(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function x(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:T(e)}).then(r=>async()=>se(t,r))}async function Q(t,e,n){return x(t,r=>{e(r),se(t,r.id).catch(()=>{})},n)}async function q(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var J={};d(J,{CloseRequestedEvent:()=>D,Effect:()=>ce,EffectState:()=>de,LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h,ProgressBarStatus:()=>le,UserAttentionType:()=>ae,Window:()=>k,availableMonitors:()=>xe,currentMonitor:()=>Oe,getAll:()=>L,getCurrent:()=>ue,primaryMonitor:()=>Te});var B={};d(B,{LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h});var P=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},h=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new P(this.width/e,this.height/e)}},_=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},g=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new _(this.x/e,this.y/e)}};var ae=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(ae||{}),D=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},le=(u=>(u.None="none",u.Normal="normal",u.Indeterminate="indeterminate",u.Paused="paused",u.Error="error",u))(le||{});function ue(){return new k(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function L(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new k(t.label,{skip:!0}))}var oe=["tauri://created","tauri://error"],k=class t{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return L().some(n=>n.label===e)?new t(e,{skip:!0}):null}static getCurrent(){return ue()}static getAll(){return L()}static async getFocusedWindow(){for(let e of L())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):x(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):Q(e,n,{target:this.label})}async emit(e,n){if(oe.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return q(e,n,{target:this.label})}_handleTauriEvent(e,n){return oe.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value: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("plugin:window|set_size",{label:this.label,value:{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("plugin:window|set_min_size",{label:this.label,value: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("plugin:window|set_max_size",{label:this.label,value: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("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value: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("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=pe(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=me(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let r=new D(n);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),r=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",u=>{e({...u,payload:{type:"drop",paths:u.payload}})}),r=await this.listen("tauri://file-drop-hover",u=>{e({...u,payload:{type:"hover",paths:u.payload}})}),l=await this.listen("tauri://file-drop-cancelled",u=>{e({...u,payload:{type:"cancel"}})});return()=>{n(),r(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},ce=(a=>(a.AppearanceBased="appearanceBased",a.Light="light",a.Dark="dark",a.MediumLight="mediumLight",a.UltraDark="ultraDark",a.Titlebar="titlebar",a.Selection="selection",a.Menu="menu",a.Popover="popover",a.Sidebar="sidebar",a.HeaderView="headerView",a.Sheet="sheet",a.WindowBackground="windowBackground",a.HudWindow="hudWindow",a.FullScreenUI="fullScreenUI",a.Tooltip="tooltip",a.ContentBackground="contentBackground",a.UnderWindowBackground="underWindowBackground",a.UnderPageBackground="underPageBackground",a.Mica="mica",a.Blur="blur",a.Acrylic="acrylic",a.Tabbed="tabbed",a.TabbedDark="tabbedDark",a.TabbedLight="tabbedLight",a))(ce||{}),de=(r=>(r.FollowsWindowActiveState="followsWindowActiveState",r.Active="active",r.Inactive="inactive",r))(de||{});function Z(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:me(t.position),size:pe(t.size)}}function me(t){return new g(t.x,t.y)}function pe(t){return new h(t.width,t.height)}async function Oe(){return i("plugin:window|current_monitor").then(Z)}async function Te(){return i("plugin:window|primary_monitor").then(Z)}async function xe(){return i("plugin:window|available_monitors").then(t=>t.map(Z))}var Y={};d(Y,{BaseDirectory:()=>he,appCacheDir:()=>Ee,appConfigDir:()=>Le,appDataDir:()=>De,appLocalDataDir:()=>Fe,appLogDir:()=>en,audioDir:()=>Re,basename:()=>cn,cacheDir:()=>ze,configDir:()=>We,dataDir:()=>Ue,delimiter:()=>rn,desktopDir:()=>He,dirname:()=>ln,documentDir:()=>Ve,downloadDir:()=>Ge,executableDir:()=>Ne,extname:()=>un,fontDir:()=>Ke,homeDir:()=>je,isAbsolute:()=>dn,join:()=>an,localDataDir:()=>Qe,normalize:()=>on,pictureDir:()=>qe,publicDir:()=>$e,resolve:()=>sn,resolveResource:()=>Ze,resourceDir:()=>Be,runtimeDir:()=>Je,sep:()=>tn,tempDir:()=>nn,templateDir:()=>Ye,videoDir:()=>Xe});var he=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(he||{});async function Le(){return i("plugin:path|resolve_directory",{directory:13})}async function De(){return i("plugin:path|resolve_directory",{directory:14})}async function Fe(){return i("plugin:path|resolve_directory",{directory:15})}async function Ee(){return i("plugin:path|resolve_directory",{directory:16})}async function Re(){return i("plugin:path|resolve_directory",{directory:1})}async function ze(){return i("plugin:path|resolve_directory",{directory:2})}async function We(){return i("plugin:path|resolve_directory",{directory:3})}async function Ue(){return i("plugin:path|resolve_directory",{directory:4})}async function He(){return i("plugin:path|resolve_directory",{directory:18})}async function Ve(){return i("plugin:path|resolve_directory",{directory:6})}async function Ge(){return i("plugin:path|resolve_directory",{directory:7})}async function Ne(){return i("plugin:path|resolve_directory",{directory:19})}async function Ke(){return i("plugin:path|resolve_directory",{directory:20})}async function je(){return i("plugin:path|resolve_directory",{directory:21})}async function Qe(){return i("plugin:path|resolve_directory",{directory:5})}async function qe(){return i("plugin:path|resolve_directory",{directory:8})}async function $e(){return i("plugin:path|resolve_directory",{directory:9})}async function Be(){return i("plugin:path|resolve_directory",{directory:11})}async function Ze(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Je(){return i("plugin:path|resolve_directory",{directory:22})}async function Ye(){return i("plugin:path|resolve_directory",{directory:23})}async function Xe(){return i("plugin:path|resolve_directory",{directory:10})}async function en(){return i("plugin:path|resolve_directory",{directory:17})}async function nn(t){return i("plugin:path|resolve_directory",{directory:12})}function tn(){return window.__TAURI_INTERNALS__.plugins.path.sep}function rn(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function sn(...t){return i("plugin:path|resolve",{paths:t})}async function on(t){return i("plugin:path|normalize",{path:t})}async function an(...t){return i("plugin:path|join",{paths:t})}async function ln(t){return i("plugin:path|dirname",{path:t})}async function un(t){return i("plugin:path|extname",{path:t})}async function cn(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function dn(t){return i("plugin:path|isAbsolute",{path:t})}var ee={};d(ee,{TrayIcon:()=>X});var M,v=class{constructor(e){b(this,M,void 0);y(this,M,e)}get rid(){return m(this,M)}async close(){return i("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function ge(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)??Object.create(null))})})}var X=class t extends v{constructor(n,r){super(n);this.id=r}static async new(n){n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]);let r=new p;return n?.action&&(r.onmessage=n.action,delete n.action),i("plugin:tray|new",{options:n??{},handler:r}).then(([l,u])=>new t(l,u))}async setIcon(n){return i("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),i("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return i("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return i("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return i("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return i("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return i("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return i("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}};var te={};d(te,{CheckMenuItem:()=>H,IconMenuItem:()=>V,Menu:()=>ie,MenuItem:()=>W,NativeIcon:()=>be,PredefinedMenuItem:()=>U,Submenu:()=>I});var be=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(be||{});function ne([t,e,n]){switch(n){case"Submenu":return new I(t,e);case"Predefined":return new U(t,e);case"Check":return new H(t,e);case"Icon":return new V(t,e);case"MenuItem":default:return new W(t,e)}}async function f(t,e){let n=new p,r=null;return e&&("action"in e&&e.action!==void 0&&(n.onmessage=e.action,delete e.action),"items"in e&&(r=e.items.map(l=>[l.rid,l.kind]))),i("plugin:menu|new",{kind:t,options:e?{...e,items:r}:void 0,handler:n})}var A,C,F=class extends v{constructor(n,r,l){super(n);b(this,A,void 0);b(this,C,void 0);y(this,A,r),y(this,C,l)}get id(){return m(this,A)}get kind(){return m(this,C)}};A=new WeakMap,C=new WeakMap;var E=class extends F{async append(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return i("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return i("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(r=>[r.rid,r.kind]),position:n})}async remove(e){return i("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return i("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(ne)}async items(){return i("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(ne))}async get(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?ne(n):null)}async popup(e,n){return i("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},ie=class t extends E{constructor(e,n){super(e,n,"Menu")}static async new(e){return f("Menu",e).then(([n,r])=>new t(n,r))}static async default(){return i("plugin:menu|default").then(([e,n])=>new t(e,n))}async setAsAppMenu(){return i("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new t(e[0],e[1]):null)}async setAsWindowMenu(e){return i("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new t(n[0],n[1]):null)}},R=class extends F{async text(){return i("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return i("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},z=class extends R{async isEnabled(){return i("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return i("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},S=class extends z{async setAccelerator(e){return i("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},W=class t extends S{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},I=class t extends E{constructor(e,n){super(e,n,"Submenu")}static async new(e){return f("Submenu",e).then(([n,r])=>new t(n,r))}async setAsWindowsMenuForNSApp(){return i("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return i("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};ge(I,z);var U=class t extends R{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},H=class t extends S{constructor(e,n){super(e,n,"Check")}static async new(e){return f("Check",e).then(([n,r])=>new t(n,r))}async isChecked(){return i("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return i("plugin:menu|set_checked",{rid:this.rid,checked:e})}},V=class t extends S{constructor(e,n){super(e,n,"Icon")}static async new(e){return f("Icon",e).then(([n,r])=>new t(n,r))}async setIcon(e){return i("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return i("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};return ve(mn);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index fb798756ecc..952aec276fc 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -2,14 +2,17 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +use std::{collections::HashMap, sync::Mutex}; + use serde::{Deserialize, Serialize}; use super::{sealed::ContextMenuBase, *}; use crate::{ command, + ipc::Channel, plugin::{Builder, TauriPlugin}, resources::ResourceId, - AppHandle, IconDto, Manager, RunEvent, Runtime, + AppHandle, IconDto, Manager, RunEvent, Runtime, State, }; use tauri_macros::do_menu_item; @@ -98,6 +101,8 @@ fn new( app: AppHandle, kind: ItemKind, options: Option, + channels: State<'_, MenuChannels>, + handler: Channel, ) -> crate::Result<(ResourceId, MenuId)> { let options = options.unwrap_or_default(); let mut resources_table = app.manager.resources_table(); @@ -116,6 +121,9 @@ fn new( let menu = builder.build()?; let id = menu.id().clone(); let rid = resources_table.add(menu); + + channels.0.lock().unwrap().insert(id.clone(), handler); + Some((rid, id)) } @@ -133,6 +141,9 @@ fn new( let submenu = builder.build()?; let id = submenu.id().clone(); let rid = resources_table.add(submenu); + + channels.0.lock().unwrap().insert(id.clone(), handler); + Some((rid, id)) } @@ -601,11 +612,19 @@ fn set_native_icon( icon_item.set_native_icon(icon) } +struct MenuChannels(Mutex>); + pub(crate) fn init() -> TauriPlugin { Builder::new("menu") + .setup(|app, _api| { + app.manage(MenuChannels(Mutex::default())); + Ok(()) + }) .on_event(|app, e| { if let RunEvent::MenuEvent(e) = e { - let _ = app.emit_all("tauri://menu", e); + if let Some(channel) = app.state::().0.lock().unwrap().get(&e.id) { + let _ = channel.send(e); + } } }) .invoke_handler(crate::generate_handler![ diff --git a/core/tauri/src/tray/plugin.rs b/core/tauri/src/tray/plugin.rs index 8dad79c9f0c..ef620ce2c89 100644 --- a/core/tauri/src/tray/plugin.rs +++ b/core/tauri/src/tray/plugin.rs @@ -8,6 +8,7 @@ use serde::Deserialize; use crate::{ command, + ipc::Channel, menu::{plugin::ItemKind, Menu, Submenu}, plugin::{Builder, TauriPlugin}, resources::ResourceId, @@ -34,6 +35,7 @@ struct TrayIconOptions { fn new( app: AppHandle, options: TrayIconOptions, + handler: Option, ) -> crate::Result<(ResourceId, String)> { let mut builder = if let Some(id) = options.id { TrayIconBuilder::::with_id(id) @@ -41,9 +43,11 @@ fn new( TrayIconBuilder::::new() }; - builder = builder.on_tray_event(|tray, e| { - let _ = tray.app_handle().emit_all("tauri://tray", e); - }); + if let Some(handler) = handler { + builder = builder.on_tray_event(|tray, e| { + let _ = handler.send(e); + }); + } let mut resources_table = app.manager.resources_table(); diff --git a/tooling/api/src/event.ts b/tooling/api/src/event.ts index 3938a943b09..04e833639f2 100644 --- a/tooling/api/src/event.ts +++ b/tooling/api/src/event.ts @@ -55,9 +55,7 @@ enum TauriEvent { WINDOW_THEME_CHANGED = 'tauri://theme-changed', WINDOW_FILE_DROP = 'tauri://file-drop', WINDOW_FILE_DROP_HOVER = 'tauri://file-drop-hover', - WINDOW_FILE_DROP_CANCELLED = 'tauri://file-drop-cancelled', - MENU = 'tauri://menu', - TRAY = 'tauri://tray' + WINDOW_FILE_DROP_CANCELLED = 'tauri://file-drop-cancelled' } /** diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index d840bf5113b..93d069fb2f0 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -2,10 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -import { TauriEvent, listen } from './event' import { Resource, applyMixins } from './internal' -import { invoke } from './primitives' -import { getCurrent } from './window' +import { Channel, invoke } from './primitives' /** * Menu types and utilities. @@ -20,48 +18,6 @@ interface MenuEvent { id: string } -declare global { - interface Window { - __TAURI_MENU__?: { - handlers: Record void>> - } - } -} - -async function addEventListener( - id: string, - handler: () => void -): Promise { - if (!window.__TAURI_MENU__) { - window.__TAURI_MENU__ = { handlers: {} } - const unlisten = await listen( - TauriEvent.MENU, - (e) => { - const handlers = window.__TAURI_MENU__?.handlers[e.payload.id] - if (handlers) { - for (handler of handlers) { - handler() - } - } - }, - { - target: getCurrent().label - } - ) - - window.addEventListener('unload', unlisten) - } - - // eslint-disable-next-line - if (!window.__TAURI_MENU__.handlers[id]) { - // eslint-disable-next-line - window.__TAURI_MENU__.handlers[id] = [] - } - - // eslint-disable-next-line - window.__TAURI_MENU__.handlers[id].push(handler) -} - /** * A native Icon to be used for the menu item * @@ -222,12 +178,12 @@ async function newMenu( | PredefinedMenuItemOptions | IconMenuItemOptions ): Promise<[number, string]> { - let handler: null | (() => void) = null + const handler = new Channel() let items: null | Array<[number, string]> = null if (opts) { - if ('action' in opts && opts.action !== void 0) { - // eslint-disable-next-line - handler = opts.action + if ('action' in opts && opts.action) { + handler.onmessage = opts.action + delete opts.action } if ('items' in opts) { @@ -237,14 +193,10 @@ async function newMenu( } } - return invoke<[number, string]>('plugin:menu|new', { + return invoke('plugin:menu|new', { kind, - options: opts ? { ...opts, items } : undefined - }).then((ret) => { - if (handler) { - void addEventListener(ret[1], handler) - } - return ret + options: opts ? { ...opts, items } : undefined, + handler }) } @@ -279,11 +231,11 @@ class MenuBase extends MenuItemBase { */ async append< T extends - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem >(items: T | T[]): Promise { return invoke('plugin:menu|append', { rid: this.rid, @@ -304,11 +256,11 @@ class MenuBase extends MenuItemBase { */ async prepend< T extends - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem >(items: T | T[]): Promise { return invoke('plugin:menu|prepend', { rid: this.rid, @@ -329,11 +281,11 @@ class MenuBase extends MenuItemBase { */ async insert< T extends - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem >(items: T | T[], position: number): Promise { return invoke('plugin:menu|insert', { rid: this.rid, @@ -553,7 +505,7 @@ class MenuItem extends MenuItemBase4 { type SubmenuOptions = Omit & MenuOptions -interface Submenu extends MenuItemBase3 {} +interface Submenu extends MenuItemBase3 { } /** A type that is a submenu inside a {@linkcode Menu} or {@linkcode Submenu}. */ class Submenu extends MenuBase { @@ -683,25 +635,25 @@ interface PredefinedMenuItemOptions { text?: string /** The predefined item type */ item: - | 'Separator' - | 'Copy' - | 'Cut' - | 'Paste' - | 'SelectAll' - | 'Undo' - | 'Redo' - | 'Minimize' - | 'Maximize' - | 'Fullscreen' - | 'Hide' - | 'HideOthers' - | 'ShowAll' - | 'CloseWindow' - | 'Quit' - | 'Services' - | { - About: AboutMetadata | null - } + | 'Separator' + | 'Copy' + | 'Cut' + | 'Paste' + | 'SelectAll' + | 'Undo' + | 'Redo' + | 'Minimize' + | 'Maximize' + | 'Fullscreen' + | 'Hide' + | 'HideOthers' + | 'ShowAll' + | 'CloseWindow' + | 'Quit' + | 'Services' + | { + About: AboutMetadata | null + } } /** A predefined (native) menu item which has a predfined behavior by the OS or by tauri. */ diff --git a/tooling/api/src/tray.ts b/tooling/api/src/tray.ts index fc970c2482a..2c93b5fccf7 100644 --- a/tooling/api/src/tray.ts +++ b/tooling/api/src/tray.ts @@ -3,10 +3,8 @@ // SPDX-License-Identifier: MIT import type { Menu, Submenu } from './menu' -import { TauriEvent, listen, type UnlistenFn } from './event' import { Resource } from './internal' -import { invoke } from './primitives' -import { getCurrent } from './window' +import { Channel, invoke } from './primitives' /** * Describes a tray event emitted when a tray icon is clicked @@ -90,6 +88,8 @@ export interface TrayIconOptions { iconAsTemplate?: boolean /** Whether to show the tray menu on left click or not, default is `true`. **macOS only**. */ menuOnLeftClieck?: boolean + /** A handler for an event on the tray icon. */ + action?: (event: TrayIconEvent) => void } /** @@ -132,8 +132,16 @@ export class TrayIcon extends Resource { // @ts-expect-error we only need the rid and kind options.menu = [options.menu.rid, options.menu.kind] } + + const handler = new Channel() + if (options?.action) { + handler.onmessage = options.action + delete options.action + } + return invoke<[number, string]>('plugin:tray|new', { - options: options ?? {} + options: options ?? {}, + handler }).then(([rid, id]) => new TrayIcon(rid, id)) } @@ -214,39 +222,4 @@ export class TrayIcon extends Resource { onLeft }) } - - /** - * Listen to this tray icon events. - * - * @example - * ```typescript - * import { TrayIcon } from '@tauri-apps/api/tray'; - * const tray = await TrayIcon.new(); - * const unlisten = await tray.on((event) => { - * console.log(event) - * }); - * - * // you need to call unlisten if your handler goes out of scope e.g. the component is unmounted - * unlisten(); - * ``` - * - * @param handler Event handler. - * @returns A promise resolving to a function to unlisten to the event. - * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. - * - * @since 2.0.0 - */ - async on(handler: (event: TrayIconEvent) => void): Promise { - return listen( - TauriEvent.TRAY, - (e) => { - if (e.payload.id === this.id) { - handler(e.payload) - } - }, - { - target: getCurrent().label - } - ) - } } diff --git a/tooling/api/src/window.ts b/tooling/api/src/window.ts index c1d6997f2c5..c057b1de91b 100644 --- a/tooling/api/src/window.ts +++ b/tooling/api/src/window.ts @@ -1681,27 +1681,6 @@ class Window { ) } - /** - * Listen to the window menu item click. The payload is the item id. - * - * @example - * ```typescript - * import { getCurrent } from "@tauri-apps/api/window"; - * const unlisten = await getCurrent().onMenuClicked(({ payload: menuId }) => { - * console.log('Menu clicked: ' + menuId); - * }); - * - * // you need to call unlisten if your handler goes out of scope e.g. the component is unmounted - * unlisten(); - * ``` - * - * @returns A promise resolving to a function to unlisten to the event. - * Note that removing the listener is required if your listener goes out of scope e.g. the component is unmounted. - */ - async onMenuClicked(handler: EventCallback): Promise { - return this.listen(TauriEvent.MENU, handler) - } - /** * Listen to a file drop event. * The listener is triggered when the user hovers the selected files on the window, From 6ab30d163f8c66a24da47be3533714160c138b20 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 23 Oct 2023 17:56:15 -0300 Subject: [PATCH 29/64] lint --- core/tauri/scripts/bundle.global.js | 2 +- tooling/api/src/menu.ts | 76 ++++++++++++++--------------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index da9864ca6b3..36102d07783 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var G=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)G(t,n,{get:e[n],enumerable:!0})},_e=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of we(e))!Pe.call(t,l)&&l!==n&&G(t,l,{get:()=>e[l],enumerable:!(r=ye(e,l))||r.enumerable});return t};var ve=t=>_e(G({},"__esModule",{value:!0}),t);var re=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var m=(t,e,n)=>(re(t,e,"read from private field"),n?n.call(t):e.get(t)),b=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},y=(t,e,n,r)=>(re(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var mn={};d(mn,{app:()=>K,dpi:()=>B,event:()=>$,menu:()=>te,path:()=>Y,primitives:()=>N,tray:()=>ee,window:()=>J});var K={};d(K,{getName:()=>Se,getTauriVersion:()=>Ie,getVersion:()=>Me,hide:()=>Ce,show:()=>Ae});var N={};d(N,{Channel:()=>p,PluginListener:()=>O,addPluginListener:()=>fe,convertFileSrc:()=>ke,invoke:()=>i,transformCallback:()=>T});function T(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var w,p=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;b(this,w,()=>{});this.id=T(e=>{m(this,w).call(this,e)})}set onmessage(e){y(this,w,e)}get onmessage(){return m(this,w)}toJSON(){return`__CHANNEL__:${this.id}`}};w=new WeakMap;var O=class{constructor(e,n,r){this.plugin=e,this.event=n,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function fe(t,e,n){let r=new p;return r.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:r}).then(()=>new O(t,e,r.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function ke(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function Me(){return i("plugin:app|version")}async function Se(){return i("plugin:app|name")}async function Ie(){return i("plugin:app|tauri_version")}async function Ae(){return i("plugin:app|app_show")}async function Ce(){return i("plugin:app|app_hide")}var $={};d($,{TauriEvent:()=>j,emit:()=>q,listen:()=>x,once:()=>Q});var j=(c=>(c.WINDOW_RESIZED="tauri://resize",c.WINDOW_MOVED="tauri://move",c.WINDOW_CLOSE_REQUESTED="tauri://close-requested",c.WINDOW_CREATED="tauri://window-created",c.WINDOW_DESTROYED="tauri://destroyed",c.WINDOW_FOCUS="tauri://focus",c.WINDOW_BLUR="tauri://blur",c.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",c.WINDOW_THEME_CHANGED="tauri://theme-changed",c.WINDOW_FILE_DROP="tauri://file-drop",c.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",c.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",c))(j||{});async function se(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function x(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:T(e)}).then(r=>async()=>se(t,r))}async function Q(t,e,n){return x(t,r=>{e(r),se(t,r.id).catch(()=>{})},n)}async function q(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var J={};d(J,{CloseRequestedEvent:()=>D,Effect:()=>ce,EffectState:()=>de,LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h,ProgressBarStatus:()=>le,UserAttentionType:()=>ae,Window:()=>k,availableMonitors:()=>xe,currentMonitor:()=>Oe,getAll:()=>L,getCurrent:()=>ue,primaryMonitor:()=>Te});var B={};d(B,{LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h});var P=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},h=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new P(this.width/e,this.height/e)}},_=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},g=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new _(this.x/e,this.y/e)}};var ae=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(ae||{}),D=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},le=(u=>(u.None="none",u.Normal="normal",u.Indeterminate="indeterminate",u.Paused="paused",u.Error="error",u))(le||{});function ue(){return new k(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function L(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new k(t.label,{skip:!0}))}var oe=["tauri://created","tauri://error"],k=class t{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return L().some(n=>n.label===e)?new t(e,{skip:!0}):null}static getCurrent(){return ue()}static getAll(){return L()}static async getFocusedWindow(){for(let e of L())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):x(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):Q(e,n,{target:this.label})}async emit(e,n){if(oe.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return q(e,n,{target:this.label})}_handleTauriEvent(e,n){return oe.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value: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("plugin:window|set_size",{label:this.label,value:{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("plugin:window|set_min_size",{label:this.label,value: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("plugin:window|set_max_size",{label:this.label,value: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("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value: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("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=pe(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=me(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let r=new D(n);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),r=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",u=>{e({...u,payload:{type:"drop",paths:u.payload}})}),r=await this.listen("tauri://file-drop-hover",u=>{e({...u,payload:{type:"hover",paths:u.payload}})}),l=await this.listen("tauri://file-drop-cancelled",u=>{e({...u,payload:{type:"cancel"}})});return()=>{n(),r(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},ce=(a=>(a.AppearanceBased="appearanceBased",a.Light="light",a.Dark="dark",a.MediumLight="mediumLight",a.UltraDark="ultraDark",a.Titlebar="titlebar",a.Selection="selection",a.Menu="menu",a.Popover="popover",a.Sidebar="sidebar",a.HeaderView="headerView",a.Sheet="sheet",a.WindowBackground="windowBackground",a.HudWindow="hudWindow",a.FullScreenUI="fullScreenUI",a.Tooltip="tooltip",a.ContentBackground="contentBackground",a.UnderWindowBackground="underWindowBackground",a.UnderPageBackground="underPageBackground",a.Mica="mica",a.Blur="blur",a.Acrylic="acrylic",a.Tabbed="tabbed",a.TabbedDark="tabbedDark",a.TabbedLight="tabbedLight",a))(ce||{}),de=(r=>(r.FollowsWindowActiveState="followsWindowActiveState",r.Active="active",r.Inactive="inactive",r))(de||{});function Z(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:me(t.position),size:pe(t.size)}}function me(t){return new g(t.x,t.y)}function pe(t){return new h(t.width,t.height)}async function Oe(){return i("plugin:window|current_monitor").then(Z)}async function Te(){return i("plugin:window|primary_monitor").then(Z)}async function xe(){return i("plugin:window|available_monitors").then(t=>t.map(Z))}var Y={};d(Y,{BaseDirectory:()=>he,appCacheDir:()=>Ee,appConfigDir:()=>Le,appDataDir:()=>De,appLocalDataDir:()=>Fe,appLogDir:()=>en,audioDir:()=>Re,basename:()=>cn,cacheDir:()=>ze,configDir:()=>We,dataDir:()=>Ue,delimiter:()=>rn,desktopDir:()=>He,dirname:()=>ln,documentDir:()=>Ve,downloadDir:()=>Ge,executableDir:()=>Ne,extname:()=>un,fontDir:()=>Ke,homeDir:()=>je,isAbsolute:()=>dn,join:()=>an,localDataDir:()=>Qe,normalize:()=>on,pictureDir:()=>qe,publicDir:()=>$e,resolve:()=>sn,resolveResource:()=>Ze,resourceDir:()=>Be,runtimeDir:()=>Je,sep:()=>tn,tempDir:()=>nn,templateDir:()=>Ye,videoDir:()=>Xe});var he=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(he||{});async function Le(){return i("plugin:path|resolve_directory",{directory:13})}async function De(){return i("plugin:path|resolve_directory",{directory:14})}async function Fe(){return i("plugin:path|resolve_directory",{directory:15})}async function Ee(){return i("plugin:path|resolve_directory",{directory:16})}async function Re(){return i("plugin:path|resolve_directory",{directory:1})}async function ze(){return i("plugin:path|resolve_directory",{directory:2})}async function We(){return i("plugin:path|resolve_directory",{directory:3})}async function Ue(){return i("plugin:path|resolve_directory",{directory:4})}async function He(){return i("plugin:path|resolve_directory",{directory:18})}async function Ve(){return i("plugin:path|resolve_directory",{directory:6})}async function Ge(){return i("plugin:path|resolve_directory",{directory:7})}async function Ne(){return i("plugin:path|resolve_directory",{directory:19})}async function Ke(){return i("plugin:path|resolve_directory",{directory:20})}async function je(){return i("plugin:path|resolve_directory",{directory:21})}async function Qe(){return i("plugin:path|resolve_directory",{directory:5})}async function qe(){return i("plugin:path|resolve_directory",{directory:8})}async function $e(){return i("plugin:path|resolve_directory",{directory:9})}async function Be(){return i("plugin:path|resolve_directory",{directory:11})}async function Ze(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Je(){return i("plugin:path|resolve_directory",{directory:22})}async function Ye(){return i("plugin:path|resolve_directory",{directory:23})}async function Xe(){return i("plugin:path|resolve_directory",{directory:10})}async function en(){return i("plugin:path|resolve_directory",{directory:17})}async function nn(t){return i("plugin:path|resolve_directory",{directory:12})}function tn(){return window.__TAURI_INTERNALS__.plugins.path.sep}function rn(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function sn(...t){return i("plugin:path|resolve",{paths:t})}async function on(t){return i("plugin:path|normalize",{path:t})}async function an(...t){return i("plugin:path|join",{paths:t})}async function ln(t){return i("plugin:path|dirname",{path:t})}async function un(t){return i("plugin:path|extname",{path:t})}async function cn(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function dn(t){return i("plugin:path|isAbsolute",{path:t})}var ee={};d(ee,{TrayIcon:()=>X});var M,v=class{constructor(e){b(this,M,void 0);y(this,M,e)}get rid(){return m(this,M)}async close(){return i("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function ge(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)??Object.create(null))})})}var X=class t extends v{constructor(n,r){super(n);this.id=r}static async new(n){n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]);let r=new p;return n?.action&&(r.onmessage=n.action,delete n.action),i("plugin:tray|new",{options:n??{},handler:r}).then(([l,u])=>new t(l,u))}async setIcon(n){return i("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),i("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return i("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return i("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return i("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return i("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return i("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return i("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}};var te={};d(te,{CheckMenuItem:()=>H,IconMenuItem:()=>V,Menu:()=>ie,MenuItem:()=>W,NativeIcon:()=>be,PredefinedMenuItem:()=>U,Submenu:()=>I});var be=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(be||{});function ne([t,e,n]){switch(n){case"Submenu":return new I(t,e);case"Predefined":return new U(t,e);case"Check":return new H(t,e);case"Icon":return new V(t,e);case"MenuItem":default:return new W(t,e)}}async function f(t,e){let n=new p,r=null;return e&&("action"in e&&e.action!==void 0&&(n.onmessage=e.action,delete e.action),"items"in e&&(r=e.items.map(l=>[l.rid,l.kind]))),i("plugin:menu|new",{kind:t,options:e?{...e,items:r}:void 0,handler:n})}var A,C,F=class extends v{constructor(n,r,l){super(n);b(this,A,void 0);b(this,C,void 0);y(this,A,r),y(this,C,l)}get id(){return m(this,A)}get kind(){return m(this,C)}};A=new WeakMap,C=new WeakMap;var E=class extends F{async append(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return i("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return i("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(r=>[r.rid,r.kind]),position:n})}async remove(e){return i("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return i("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(ne)}async items(){return i("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(ne))}async get(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?ne(n):null)}async popup(e,n){return i("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},ie=class t extends E{constructor(e,n){super(e,n,"Menu")}static async new(e){return f("Menu",e).then(([n,r])=>new t(n,r))}static async default(){return i("plugin:menu|default").then(([e,n])=>new t(e,n))}async setAsAppMenu(){return i("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new t(e[0],e[1]):null)}async setAsWindowMenu(e){return i("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new t(n[0],n[1]):null)}},R=class extends F{async text(){return i("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return i("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},z=class extends R{async isEnabled(){return i("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return i("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},S=class extends z{async setAccelerator(e){return i("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},W=class t extends S{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},I=class t extends E{constructor(e,n){super(e,n,"Submenu")}static async new(e){return f("Submenu",e).then(([n,r])=>new t(n,r))}async setAsWindowsMenuForNSApp(){return i("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return i("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};ge(I,z);var U=class t extends R{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},H=class t extends S{constructor(e,n){super(e,n,"Check")}static async new(e){return f("Check",e).then(([n,r])=>new t(n,r))}async isChecked(){return i("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return i("plugin:menu|set_checked",{rid:this.rid,checked:e})}},V=class t extends S{constructor(e,n){super(e,n,"Icon")}static async new(e){return f("Icon",e).then(([n,r])=>new t(n,r))}async setIcon(e){return i("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return i("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};return ve(mn);})(); +"use strict";var __TAURI_IIFE__=(()=>{var G=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)G(t,n,{get:e[n],enumerable:!0})},_e=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of we(e))!Pe.call(t,l)&&l!==n&&G(t,l,{get:()=>e[l],enumerable:!(r=ye(e,l))||r.enumerable});return t};var ve=t=>_e(G({},"__esModule",{value:!0}),t);var re=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var m=(t,e,n)=>(re(t,e,"read from private field"),n?n.call(t):e.get(t)),b=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},y=(t,e,n,r)=>(re(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var mn={};d(mn,{app:()=>K,dpi:()=>B,event:()=>$,menu:()=>te,path:()=>Y,primitives:()=>N,tray:()=>ee,window:()=>J});var K={};d(K,{getName:()=>Se,getTauriVersion:()=>Ie,getVersion:()=>Me,hide:()=>Ce,show:()=>Ae});var N={};d(N,{Channel:()=>p,PluginListener:()=>O,addPluginListener:()=>fe,convertFileSrc:()=>ke,invoke:()=>i,transformCallback:()=>T});function T(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var w,p=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;b(this,w,()=>{});this.id=T(e=>{m(this,w).call(this,e)})}set onmessage(e){y(this,w,e)}get onmessage(){return m(this,w)}toJSON(){return`__CHANNEL__:${this.id}`}};w=new WeakMap;var O=class{constructor(e,n,r){this.plugin=e,this.event=n,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function fe(t,e,n){let r=new p;return r.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:r}).then(()=>new O(t,e,r.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function ke(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function Me(){return i("plugin:app|version")}async function Se(){return i("plugin:app|name")}async function Ie(){return i("plugin:app|tauri_version")}async function Ae(){return i("plugin:app|app_show")}async function Ce(){return i("plugin:app|app_hide")}var $={};d($,{TauriEvent:()=>j,emit:()=>q,listen:()=>x,once:()=>Q});var j=(c=>(c.WINDOW_RESIZED="tauri://resize",c.WINDOW_MOVED="tauri://move",c.WINDOW_CLOSE_REQUESTED="tauri://close-requested",c.WINDOW_CREATED="tauri://window-created",c.WINDOW_DESTROYED="tauri://destroyed",c.WINDOW_FOCUS="tauri://focus",c.WINDOW_BLUR="tauri://blur",c.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",c.WINDOW_THEME_CHANGED="tauri://theme-changed",c.WINDOW_FILE_DROP="tauri://file-drop",c.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",c.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",c))(j||{});async function se(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function x(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:T(e)}).then(r=>async()=>se(t,r))}async function Q(t,e,n){return x(t,r=>{e(r),se(t,r.id).catch(()=>{})},n)}async function q(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var J={};d(J,{CloseRequestedEvent:()=>D,Effect:()=>ce,EffectState:()=>de,LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h,ProgressBarStatus:()=>le,UserAttentionType:()=>ae,Window:()=>k,availableMonitors:()=>xe,currentMonitor:()=>Oe,getAll:()=>L,getCurrent:()=>ue,primaryMonitor:()=>Te});var B={};d(B,{LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h});var P=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},h=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new P(this.width/e,this.height/e)}},_=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},g=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new _(this.x/e,this.y/e)}};var ae=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(ae||{}),D=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},le=(u=>(u.None="none",u.Normal="normal",u.Indeterminate="indeterminate",u.Paused="paused",u.Error="error",u))(le||{});function ue(){return new k(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function L(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new k(t.label,{skip:!0}))}var oe=["tauri://created","tauri://error"],k=class t{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return L().some(n=>n.label===e)?new t(e,{skip:!0}):null}static getCurrent(){return ue()}static getAll(){return L()}static async getFocusedWindow(){for(let e of L())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):x(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):Q(e,n,{target:this.label})}async emit(e,n){if(oe.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return q(e,n,{target:this.label})}_handleTauriEvent(e,n){return oe.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value: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("plugin:window|set_size",{label:this.label,value:{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("plugin:window|set_min_size",{label:this.label,value: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("plugin:window|set_max_size",{label:this.label,value: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("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value: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("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=pe(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=me(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let r=new D(n);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),r=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",u=>{e({...u,payload:{type:"drop",paths:u.payload}})}),r=await this.listen("tauri://file-drop-hover",u=>{e({...u,payload:{type:"hover",paths:u.payload}})}),l=await this.listen("tauri://file-drop-cancelled",u=>{e({...u,payload:{type:"cancel"}})});return()=>{n(),r(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},ce=(a=>(a.AppearanceBased="appearanceBased",a.Light="light",a.Dark="dark",a.MediumLight="mediumLight",a.UltraDark="ultraDark",a.Titlebar="titlebar",a.Selection="selection",a.Menu="menu",a.Popover="popover",a.Sidebar="sidebar",a.HeaderView="headerView",a.Sheet="sheet",a.WindowBackground="windowBackground",a.HudWindow="hudWindow",a.FullScreenUI="fullScreenUI",a.Tooltip="tooltip",a.ContentBackground="contentBackground",a.UnderWindowBackground="underWindowBackground",a.UnderPageBackground="underPageBackground",a.Mica="mica",a.Blur="blur",a.Acrylic="acrylic",a.Tabbed="tabbed",a.TabbedDark="tabbedDark",a.TabbedLight="tabbedLight",a))(ce||{}),de=(r=>(r.FollowsWindowActiveState="followsWindowActiveState",r.Active="active",r.Inactive="inactive",r))(de||{});function Z(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:me(t.position),size:pe(t.size)}}function me(t){return new g(t.x,t.y)}function pe(t){return new h(t.width,t.height)}async function Oe(){return i("plugin:window|current_monitor").then(Z)}async function Te(){return i("plugin:window|primary_monitor").then(Z)}async function xe(){return i("plugin:window|available_monitors").then(t=>t.map(Z))}var Y={};d(Y,{BaseDirectory:()=>he,appCacheDir:()=>Ee,appConfigDir:()=>Le,appDataDir:()=>De,appLocalDataDir:()=>Fe,appLogDir:()=>en,audioDir:()=>Re,basename:()=>cn,cacheDir:()=>ze,configDir:()=>We,dataDir:()=>Ue,delimiter:()=>rn,desktopDir:()=>He,dirname:()=>ln,documentDir:()=>Ve,downloadDir:()=>Ge,executableDir:()=>Ne,extname:()=>un,fontDir:()=>Ke,homeDir:()=>je,isAbsolute:()=>dn,join:()=>an,localDataDir:()=>Qe,normalize:()=>on,pictureDir:()=>qe,publicDir:()=>$e,resolve:()=>sn,resolveResource:()=>Ze,resourceDir:()=>Be,runtimeDir:()=>Je,sep:()=>tn,tempDir:()=>nn,templateDir:()=>Ye,videoDir:()=>Xe});var he=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(he||{});async function Le(){return i("plugin:path|resolve_directory",{directory:13})}async function De(){return i("plugin:path|resolve_directory",{directory:14})}async function Fe(){return i("plugin:path|resolve_directory",{directory:15})}async function Ee(){return i("plugin:path|resolve_directory",{directory:16})}async function Re(){return i("plugin:path|resolve_directory",{directory:1})}async function ze(){return i("plugin:path|resolve_directory",{directory:2})}async function We(){return i("plugin:path|resolve_directory",{directory:3})}async function Ue(){return i("plugin:path|resolve_directory",{directory:4})}async function He(){return i("plugin:path|resolve_directory",{directory:18})}async function Ve(){return i("plugin:path|resolve_directory",{directory:6})}async function Ge(){return i("plugin:path|resolve_directory",{directory:7})}async function Ne(){return i("plugin:path|resolve_directory",{directory:19})}async function Ke(){return i("plugin:path|resolve_directory",{directory:20})}async function je(){return i("plugin:path|resolve_directory",{directory:21})}async function Qe(){return i("plugin:path|resolve_directory",{directory:5})}async function qe(){return i("plugin:path|resolve_directory",{directory:8})}async function $e(){return i("plugin:path|resolve_directory",{directory:9})}async function Be(){return i("plugin:path|resolve_directory",{directory:11})}async function Ze(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Je(){return i("plugin:path|resolve_directory",{directory:22})}async function Ye(){return i("plugin:path|resolve_directory",{directory:23})}async function Xe(){return i("plugin:path|resolve_directory",{directory:10})}async function en(){return i("plugin:path|resolve_directory",{directory:17})}async function nn(t){return i("plugin:path|resolve_directory",{directory:12})}function tn(){return window.__TAURI_INTERNALS__.plugins.path.sep}function rn(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function sn(...t){return i("plugin:path|resolve",{paths:t})}async function on(t){return i("plugin:path|normalize",{path:t})}async function an(...t){return i("plugin:path|join",{paths:t})}async function ln(t){return i("plugin:path|dirname",{path:t})}async function un(t){return i("plugin:path|extname",{path:t})}async function cn(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function dn(t){return i("plugin:path|isAbsolute",{path:t})}var ee={};d(ee,{TrayIcon:()=>X});var M,v=class{constructor(e){b(this,M,void 0);y(this,M,e)}get rid(){return m(this,M)}async close(){return i("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function ge(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)??Object.create(null))})})}var X=class t extends v{constructor(n,r){super(n);this.id=r}static async new(n){n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]);let r=new p;return n?.action&&(r.onmessage=n.action,delete n.action),i("plugin:tray|new",{options:n??{},handler:r}).then(([l,u])=>new t(l,u))}async setIcon(n){return i("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),i("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return i("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return i("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return i("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return i("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return i("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return i("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}};var te={};d(te,{CheckMenuItem:()=>H,IconMenuItem:()=>V,Menu:()=>ie,MenuItem:()=>W,NativeIcon:()=>be,PredefinedMenuItem:()=>U,Submenu:()=>I});var be=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(be||{});function ne([t,e,n]){switch(n){case"Submenu":return new I(t,e);case"Predefined":return new U(t,e);case"Check":return new H(t,e);case"Icon":return new V(t,e);case"MenuItem":default:return new W(t,e)}}async function f(t,e){let n=new p,r=null;return e&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&(r=e.items.map(l=>[l.rid,l.kind]))),i("plugin:menu|new",{kind:t,options:e?{...e,items:r}:void 0,handler:n})}var A,C,F=class extends v{constructor(n,r,l){super(n);b(this,A,void 0);b(this,C,void 0);y(this,A,r),y(this,C,l)}get id(){return m(this,A)}get kind(){return m(this,C)}};A=new WeakMap,C=new WeakMap;var E=class extends F{async append(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return i("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return i("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(r=>[r.rid,r.kind]),position:n})}async remove(e){return i("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return i("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(ne)}async items(){return i("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(ne))}async get(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?ne(n):null)}async popup(e,n){return i("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},ie=class t extends E{constructor(e,n){super(e,n,"Menu")}static async new(e){return f("Menu",e).then(([n,r])=>new t(n,r))}static async default(){return i("plugin:menu|default").then(([e,n])=>new t(e,n))}async setAsAppMenu(){return i("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new t(e[0],e[1]):null)}async setAsWindowMenu(e){return i("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new t(n[0],n[1]):null)}},R=class extends F{async text(){return i("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return i("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},z=class extends R{async isEnabled(){return i("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return i("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},S=class extends z{async setAccelerator(e){return i("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},W=class t extends S{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},I=class t extends E{constructor(e,n){super(e,n,"Submenu")}static async new(e){return f("Submenu",e).then(([n,r])=>new t(n,r))}async setAsWindowsMenuForNSApp(){return i("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return i("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};ge(I,z);var U=class t extends R{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},H=class t extends S{constructor(e,n){super(e,n,"Check")}static async new(e){return f("Check",e).then(([n,r])=>new t(n,r))}async isChecked(){return i("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return i("plugin:menu|set_checked",{rid:this.rid,checked:e})}},V=class t extends S{constructor(e,n){super(e,n,"Icon")}static async new(e){return f("Icon",e).then(([n,r])=>new t(n,r))}async setIcon(e){return i("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return i("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};return ve(mn);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 93d069fb2f0..588036bcedc 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -186,9 +186,7 @@ async function newMenu( delete opts.action } - if ('items' in opts) { - // @ts-expect-error items should all have rid and kind accessors - // eslint-disable-next-line + if ('items' in opts && opts.items) { items = opts.items.map((i) => [i.rid, i.kind]) } } @@ -231,11 +229,11 @@ class MenuBase extends MenuItemBase { */ async append< T extends - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem >(items: T | T[]): Promise { return invoke('plugin:menu|append', { rid: this.rid, @@ -256,11 +254,11 @@ class MenuBase extends MenuItemBase { */ async prepend< T extends - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem >(items: T | T[]): Promise { return invoke('plugin:menu|prepend', { rid: this.rid, @@ -281,11 +279,11 @@ class MenuBase extends MenuItemBase { */ async insert< T extends - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem >(items: T | T[], position: number): Promise { return invoke('plugin:menu|insert', { rid: this.rid, @@ -505,9 +503,11 @@ class MenuItem extends MenuItemBase4 { type SubmenuOptions = Omit & MenuOptions -interface Submenu extends MenuItemBase3 { } +// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging +interface Submenu extends MenuItemBase3 {} /** A type that is a submenu inside a {@linkcode Menu} or {@linkcode Submenu}. */ +// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging class Submenu extends MenuBase { constructor(rid: number, id: string) { super(rid, id, 'Submenu') @@ -635,25 +635,25 @@ interface PredefinedMenuItemOptions { text?: string /** The predefined item type */ item: - | 'Separator' - | 'Copy' - | 'Cut' - | 'Paste' - | 'SelectAll' - | 'Undo' - | 'Redo' - | 'Minimize' - | 'Maximize' - | 'Fullscreen' - | 'Hide' - | 'HideOthers' - | 'ShowAll' - | 'CloseWindow' - | 'Quit' - | 'Services' - | { - About: AboutMetadata | null - } + | 'Separator' + | 'Copy' + | 'Cut' + | 'Paste' + | 'SelectAll' + | 'Undo' + | 'Redo' + | 'Minimize' + | 'Maximize' + | 'Fullscreen' + | 'Hide' + | 'HideOthers' + | 'ShowAll' + | 'CloseWindow' + | 'Quit' + | 'Services' + | { + About: AboutMetadata | null + } } /** A predefined (native) menu item which has a predfined behavior by the OS or by tauri. */ From d894b163714e3c0a94f4fe29c5827daa7a4cd1fa Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 23 Oct 2023 17:59:06 -0300 Subject: [PATCH 30/64] private constructors --- tooling/api/src/menu.ts | 103 ++++++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 47 deletions(-) diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 588036bcedc..ba3907a603f 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -148,6 +148,7 @@ type ItemKind = | 'Submenu' | 'Menu' +/* eslint-disable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-call */ function itemFromKind([rid, id, kind]: [number, string, ItemKind]): | Submenu | MenuItem @@ -156,18 +157,19 @@ function itemFromKind([rid, id, kind]: [number, string, ItemKind]): | IconMenuItem { switch (kind) { case 'Submenu': - return new Submenu(rid, id) + return new (Submenu as any)(rid, id) case 'Predefined': - return new PredefinedMenuItem(rid, id) + return new (PredefinedMenuItem as any)(rid, id) case 'Check': - return new CheckMenuItem(rid, id) + return new (CheckMenuItem as any)(rid, id) case 'Icon': - return new IconMenuItem(rid, id) + return new (IconMenuItem as any)(rid, id) case 'MenuItem': default: - return new MenuItem(rid, id) + return new (MenuItem as any)(rid, id) } } +/* eslint-enable @typescript-eslint/no-unsafe-return, @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-call */ async function newMenu( kind: ItemKind, @@ -212,7 +214,8 @@ class MenuItemBase extends Resource { return this.#kind } - constructor(rid: number, id: string, kind: ItemKind) { + /** @ignore */ + protected constructor(rid: number, id: string, kind: ItemKind) { super(rid) this.#id = id this.#kind = kind @@ -229,11 +232,11 @@ class MenuBase extends MenuItemBase { */ async append< T extends - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem >(items: T | T[]): Promise { return invoke('plugin:menu|append', { rid: this.rid, @@ -254,11 +257,11 @@ class MenuBase extends MenuItemBase { */ async prepend< T extends - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem >(items: T | T[]): Promise { return invoke('plugin:menu|prepend', { rid: this.rid, @@ -279,11 +282,11 @@ class MenuBase extends MenuItemBase { */ async insert< T extends - | Submenu - | MenuItem - | PredefinedMenuItem - | CheckMenuItem - | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem >(items: T | T[], position: number): Promise { return invoke('plugin:menu|insert', { rid: this.rid, @@ -386,7 +389,8 @@ interface MenuOptions { * on Windows and Linux or as a global menu in the menubar on macOS. */ class Menu extends MenuBase { - constructor(rid: number, id: string) { + /** @ignore */ + protected constructor(rid: number, id: string) { super(rid, id, 'Menu') } @@ -490,7 +494,8 @@ interface MenuItemOptions { /** A menu item inside a {@linkcode Menu} or {@linkcode Submenu} and contains only text. */ class MenuItem extends MenuItemBase4 { - constructor(rid: number, id: string) { + /** @ignore */ + protected constructor(rid: number, id: string) { super(rid, id, 'MenuItem') } @@ -504,12 +509,13 @@ type SubmenuOptions = Omit & MenuOptions // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging -interface Submenu extends MenuItemBase3 {} +interface Submenu extends MenuItemBase3 { } /** A type that is a submenu inside a {@linkcode Menu} or {@linkcode Submenu}. */ // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging class Submenu extends MenuBase { - constructor(rid: number, id: string) { + /** @ignore */ + protected constructor(rid: number, id: string) { super(rid, id, 'Submenu') } @@ -635,30 +641,31 @@ interface PredefinedMenuItemOptions { text?: string /** The predefined item type */ item: - | 'Separator' - | 'Copy' - | 'Cut' - | 'Paste' - | 'SelectAll' - | 'Undo' - | 'Redo' - | 'Minimize' - | 'Maximize' - | 'Fullscreen' - | 'Hide' - | 'HideOthers' - | 'ShowAll' - | 'CloseWindow' - | 'Quit' - | 'Services' - | { - About: AboutMetadata | null - } + | 'Separator' + | 'Copy' + | 'Cut' + | 'Paste' + | 'SelectAll' + | 'Undo' + | 'Redo' + | 'Minimize' + | 'Maximize' + | 'Fullscreen' + | 'Hide' + | 'HideOthers' + | 'ShowAll' + | 'CloseWindow' + | 'Quit' + | 'Services' + | { + About: AboutMetadata | null + } } /** A predefined (native) menu item which has a predfined behavior by the OS or by tauri. */ class PredefinedMenuItem extends MenuItemBase2 { - constructor(rid: number, id: string) { + /** @ignore */ + protected constructor(rid: number, id: string) { super(rid, id, 'MenuItem') } @@ -684,7 +691,8 @@ interface CheckMenuItemOptions extends MenuItemOptions { * that corresponds to a checked and unchecked states. */ class CheckMenuItem extends MenuItemBase4 { - constructor(rid: number, id: string) { + /** @ignore */ + protected constructor(rid: number, id: string) { super(rid, id, 'Check') } @@ -730,7 +738,8 @@ interface IconMenuItemOptions extends MenuItemOptions { * and usually contains an icon and a text. */ class IconMenuItem extends MenuItemBase4 { - constructor(rid: number, id: string) { + /** @ignore */ + protected constructor(rid: number, id: string) { super(rid, id, 'Icon') } From e974000e2068eaf9fd3e22ee9261c06d297dea06 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Mon, 23 Oct 2023 18:14:05 -0300 Subject: [PATCH 31/64] basic tray example --- core/tauri/scripts/bundle.global.js | 2 +- core/tauri/src/tray/plugin.rs | 12 +++-- examples/api/src-tauri/Cargo.lock | 6 +-- examples/api/src/App.svelte | 7 ++- examples/api/src/views/Tray.svelte | 65 ++++++++++++++++++++++++++++ examples/api/src/views/Window.svelte | 1 - tooling/api/src/tray.ts | 4 +- 7 files changed, 82 insertions(+), 15 deletions(-) create mode 100644 examples/api/src/views/Tray.svelte diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 36102d07783..7317f15ae51 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var G=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)G(t,n,{get:e[n],enumerable:!0})},_e=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of we(e))!Pe.call(t,l)&&l!==n&&G(t,l,{get:()=>e[l],enumerable:!(r=ye(e,l))||r.enumerable});return t};var ve=t=>_e(G({},"__esModule",{value:!0}),t);var re=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var m=(t,e,n)=>(re(t,e,"read from private field"),n?n.call(t):e.get(t)),b=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},y=(t,e,n,r)=>(re(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var mn={};d(mn,{app:()=>K,dpi:()=>B,event:()=>$,menu:()=>te,path:()=>Y,primitives:()=>N,tray:()=>ee,window:()=>J});var K={};d(K,{getName:()=>Se,getTauriVersion:()=>Ie,getVersion:()=>Me,hide:()=>Ce,show:()=>Ae});var N={};d(N,{Channel:()=>p,PluginListener:()=>O,addPluginListener:()=>fe,convertFileSrc:()=>ke,invoke:()=>i,transformCallback:()=>T});function T(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var w,p=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;b(this,w,()=>{});this.id=T(e=>{m(this,w).call(this,e)})}set onmessage(e){y(this,w,e)}get onmessage(){return m(this,w)}toJSON(){return`__CHANNEL__:${this.id}`}};w=new WeakMap;var O=class{constructor(e,n,r){this.plugin=e,this.event=n,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function fe(t,e,n){let r=new p;return r.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:r}).then(()=>new O(t,e,r.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function ke(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function Me(){return i("plugin:app|version")}async function Se(){return i("plugin:app|name")}async function Ie(){return i("plugin:app|tauri_version")}async function Ae(){return i("plugin:app|app_show")}async function Ce(){return i("plugin:app|app_hide")}var $={};d($,{TauriEvent:()=>j,emit:()=>q,listen:()=>x,once:()=>Q});var j=(c=>(c.WINDOW_RESIZED="tauri://resize",c.WINDOW_MOVED="tauri://move",c.WINDOW_CLOSE_REQUESTED="tauri://close-requested",c.WINDOW_CREATED="tauri://window-created",c.WINDOW_DESTROYED="tauri://destroyed",c.WINDOW_FOCUS="tauri://focus",c.WINDOW_BLUR="tauri://blur",c.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",c.WINDOW_THEME_CHANGED="tauri://theme-changed",c.WINDOW_FILE_DROP="tauri://file-drop",c.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",c.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",c))(j||{});async function se(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function x(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:T(e)}).then(r=>async()=>se(t,r))}async function Q(t,e,n){return x(t,r=>{e(r),se(t,r.id).catch(()=>{})},n)}async function q(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var J={};d(J,{CloseRequestedEvent:()=>D,Effect:()=>ce,EffectState:()=>de,LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h,ProgressBarStatus:()=>le,UserAttentionType:()=>ae,Window:()=>k,availableMonitors:()=>xe,currentMonitor:()=>Oe,getAll:()=>L,getCurrent:()=>ue,primaryMonitor:()=>Te});var B={};d(B,{LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h});var P=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},h=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new P(this.width/e,this.height/e)}},_=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},g=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new _(this.x/e,this.y/e)}};var ae=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(ae||{}),D=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},le=(u=>(u.None="none",u.Normal="normal",u.Indeterminate="indeterminate",u.Paused="paused",u.Error="error",u))(le||{});function ue(){return new k(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function L(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new k(t.label,{skip:!0}))}var oe=["tauri://created","tauri://error"],k=class t{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return L().some(n=>n.label===e)?new t(e,{skip:!0}):null}static getCurrent(){return ue()}static getAll(){return L()}static async getFocusedWindow(){for(let e of L())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):x(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):Q(e,n,{target:this.label})}async emit(e,n){if(oe.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return q(e,n,{target:this.label})}_handleTauriEvent(e,n){return oe.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value: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("plugin:window|set_size",{label:this.label,value:{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("plugin:window|set_min_size",{label:this.label,value: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("plugin:window|set_max_size",{label:this.label,value: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("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value: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("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=pe(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=me(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let r=new D(n);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),r=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",u=>{e({...u,payload:{type:"drop",paths:u.payload}})}),r=await this.listen("tauri://file-drop-hover",u=>{e({...u,payload:{type:"hover",paths:u.payload}})}),l=await this.listen("tauri://file-drop-cancelled",u=>{e({...u,payload:{type:"cancel"}})});return()=>{n(),r(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},ce=(a=>(a.AppearanceBased="appearanceBased",a.Light="light",a.Dark="dark",a.MediumLight="mediumLight",a.UltraDark="ultraDark",a.Titlebar="titlebar",a.Selection="selection",a.Menu="menu",a.Popover="popover",a.Sidebar="sidebar",a.HeaderView="headerView",a.Sheet="sheet",a.WindowBackground="windowBackground",a.HudWindow="hudWindow",a.FullScreenUI="fullScreenUI",a.Tooltip="tooltip",a.ContentBackground="contentBackground",a.UnderWindowBackground="underWindowBackground",a.UnderPageBackground="underPageBackground",a.Mica="mica",a.Blur="blur",a.Acrylic="acrylic",a.Tabbed="tabbed",a.TabbedDark="tabbedDark",a.TabbedLight="tabbedLight",a))(ce||{}),de=(r=>(r.FollowsWindowActiveState="followsWindowActiveState",r.Active="active",r.Inactive="inactive",r))(de||{});function Z(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:me(t.position),size:pe(t.size)}}function me(t){return new g(t.x,t.y)}function pe(t){return new h(t.width,t.height)}async function Oe(){return i("plugin:window|current_monitor").then(Z)}async function Te(){return i("plugin:window|primary_monitor").then(Z)}async function xe(){return i("plugin:window|available_monitors").then(t=>t.map(Z))}var Y={};d(Y,{BaseDirectory:()=>he,appCacheDir:()=>Ee,appConfigDir:()=>Le,appDataDir:()=>De,appLocalDataDir:()=>Fe,appLogDir:()=>en,audioDir:()=>Re,basename:()=>cn,cacheDir:()=>ze,configDir:()=>We,dataDir:()=>Ue,delimiter:()=>rn,desktopDir:()=>He,dirname:()=>ln,documentDir:()=>Ve,downloadDir:()=>Ge,executableDir:()=>Ne,extname:()=>un,fontDir:()=>Ke,homeDir:()=>je,isAbsolute:()=>dn,join:()=>an,localDataDir:()=>Qe,normalize:()=>on,pictureDir:()=>qe,publicDir:()=>$e,resolve:()=>sn,resolveResource:()=>Ze,resourceDir:()=>Be,runtimeDir:()=>Je,sep:()=>tn,tempDir:()=>nn,templateDir:()=>Ye,videoDir:()=>Xe});var he=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(he||{});async function Le(){return i("plugin:path|resolve_directory",{directory:13})}async function De(){return i("plugin:path|resolve_directory",{directory:14})}async function Fe(){return i("plugin:path|resolve_directory",{directory:15})}async function Ee(){return i("plugin:path|resolve_directory",{directory:16})}async function Re(){return i("plugin:path|resolve_directory",{directory:1})}async function ze(){return i("plugin:path|resolve_directory",{directory:2})}async function We(){return i("plugin:path|resolve_directory",{directory:3})}async function Ue(){return i("plugin:path|resolve_directory",{directory:4})}async function He(){return i("plugin:path|resolve_directory",{directory:18})}async function Ve(){return i("plugin:path|resolve_directory",{directory:6})}async function Ge(){return i("plugin:path|resolve_directory",{directory:7})}async function Ne(){return i("plugin:path|resolve_directory",{directory:19})}async function Ke(){return i("plugin:path|resolve_directory",{directory:20})}async function je(){return i("plugin:path|resolve_directory",{directory:21})}async function Qe(){return i("plugin:path|resolve_directory",{directory:5})}async function qe(){return i("plugin:path|resolve_directory",{directory:8})}async function $e(){return i("plugin:path|resolve_directory",{directory:9})}async function Be(){return i("plugin:path|resolve_directory",{directory:11})}async function Ze(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Je(){return i("plugin:path|resolve_directory",{directory:22})}async function Ye(){return i("plugin:path|resolve_directory",{directory:23})}async function Xe(){return i("plugin:path|resolve_directory",{directory:10})}async function en(){return i("plugin:path|resolve_directory",{directory:17})}async function nn(t){return i("plugin:path|resolve_directory",{directory:12})}function tn(){return window.__TAURI_INTERNALS__.plugins.path.sep}function rn(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function sn(...t){return i("plugin:path|resolve",{paths:t})}async function on(t){return i("plugin:path|normalize",{path:t})}async function an(...t){return i("plugin:path|join",{paths:t})}async function ln(t){return i("plugin:path|dirname",{path:t})}async function un(t){return i("plugin:path|extname",{path:t})}async function cn(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function dn(t){return i("plugin:path|isAbsolute",{path:t})}var ee={};d(ee,{TrayIcon:()=>X});var M,v=class{constructor(e){b(this,M,void 0);y(this,M,e)}get rid(){return m(this,M)}async close(){return i("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function ge(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)??Object.create(null))})})}var X=class t extends v{constructor(n,r){super(n);this.id=r}static async new(n){n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]);let r=new p;return n?.action&&(r.onmessage=n.action,delete n.action),i("plugin:tray|new",{options:n??{},handler:r}).then(([l,u])=>new t(l,u))}async setIcon(n){return i("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),i("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return i("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return i("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return i("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return i("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return i("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return i("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}};var te={};d(te,{CheckMenuItem:()=>H,IconMenuItem:()=>V,Menu:()=>ie,MenuItem:()=>W,NativeIcon:()=>be,PredefinedMenuItem:()=>U,Submenu:()=>I});var be=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(be||{});function ne([t,e,n]){switch(n){case"Submenu":return new I(t,e);case"Predefined":return new U(t,e);case"Check":return new H(t,e);case"Icon":return new V(t,e);case"MenuItem":default:return new W(t,e)}}async function f(t,e){let n=new p,r=null;return e&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&(r=e.items.map(l=>[l.rid,l.kind]))),i("plugin:menu|new",{kind:t,options:e?{...e,items:r}:void 0,handler:n})}var A,C,F=class extends v{constructor(n,r,l){super(n);b(this,A,void 0);b(this,C,void 0);y(this,A,r),y(this,C,l)}get id(){return m(this,A)}get kind(){return m(this,C)}};A=new WeakMap,C=new WeakMap;var E=class extends F{async append(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return i("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return i("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(r=>[r.rid,r.kind]),position:n})}async remove(e){return i("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return i("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(ne)}async items(){return i("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(ne))}async get(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?ne(n):null)}async popup(e,n){return i("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},ie=class t extends E{constructor(e,n){super(e,n,"Menu")}static async new(e){return f("Menu",e).then(([n,r])=>new t(n,r))}static async default(){return i("plugin:menu|default").then(([e,n])=>new t(e,n))}async setAsAppMenu(){return i("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new t(e[0],e[1]):null)}async setAsWindowMenu(e){return i("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new t(n[0],n[1]):null)}},R=class extends F{async text(){return i("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return i("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},z=class extends R{async isEnabled(){return i("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return i("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},S=class extends z{async setAccelerator(e){return i("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},W=class t extends S{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},I=class t extends E{constructor(e,n){super(e,n,"Submenu")}static async new(e){return f("Submenu",e).then(([n,r])=>new t(n,r))}async setAsWindowsMenuForNSApp(){return i("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return i("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};ge(I,z);var U=class t extends R{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},H=class t extends S{constructor(e,n){super(e,n,"Check")}static async new(e){return f("Check",e).then(([n,r])=>new t(n,r))}async isChecked(){return i("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return i("plugin:menu|set_checked",{rid:this.rid,checked:e})}},V=class t extends S{constructor(e,n){super(e,n,"Icon")}static async new(e){return f("Icon",e).then(([n,r])=>new t(n,r))}async setIcon(e){return i("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return i("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};return ve(mn);})(); +"use strict";var __TAURI_IIFE__=(()=>{var G=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)G(t,n,{get:e[n],enumerable:!0})},_e=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of we(e))!Pe.call(t,l)&&l!==n&&G(t,l,{get:()=>e[l],enumerable:!(r=ye(e,l))||r.enumerable});return t};var ve=t=>_e(G({},"__esModule",{value:!0}),t);var re=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var m=(t,e,n)=>(re(t,e,"read from private field"),n?n.call(t):e.get(t)),b=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},y=(t,e,n,r)=>(re(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var mn={};d(mn,{app:()=>K,dpi:()=>B,event:()=>$,menu:()=>te,path:()=>Y,primitives:()=>N,tray:()=>ee,window:()=>J});var K={};d(K,{getName:()=>Se,getTauriVersion:()=>Ie,getVersion:()=>Me,hide:()=>Ce,show:()=>Ae});var N={};d(N,{Channel:()=>p,PluginListener:()=>O,addPluginListener:()=>fe,convertFileSrc:()=>ke,invoke:()=>i,transformCallback:()=>T});function T(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var w,p=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;b(this,w,()=>{});this.id=T(e=>{m(this,w).call(this,e)})}set onmessage(e){y(this,w,e)}get onmessage(){return m(this,w)}toJSON(){return`__CHANNEL__:${this.id}`}};w=new WeakMap;var O=class{constructor(e,n,r){this.plugin=e,this.event=n,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function fe(t,e,n){let r=new p;return r.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:r}).then(()=>new O(t,e,r.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function ke(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function Me(){return i("plugin:app|version")}async function Se(){return i("plugin:app|name")}async function Ie(){return i("plugin:app|tauri_version")}async function Ae(){return i("plugin:app|app_show")}async function Ce(){return i("plugin:app|app_hide")}var $={};d($,{TauriEvent:()=>j,emit:()=>q,listen:()=>x,once:()=>Q});var j=(c=>(c.WINDOW_RESIZED="tauri://resize",c.WINDOW_MOVED="tauri://move",c.WINDOW_CLOSE_REQUESTED="tauri://close-requested",c.WINDOW_CREATED="tauri://window-created",c.WINDOW_DESTROYED="tauri://destroyed",c.WINDOW_FOCUS="tauri://focus",c.WINDOW_BLUR="tauri://blur",c.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",c.WINDOW_THEME_CHANGED="tauri://theme-changed",c.WINDOW_FILE_DROP="tauri://file-drop",c.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",c.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",c))(j||{});async function se(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function x(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:T(e)}).then(r=>async()=>se(t,r))}async function Q(t,e,n){return x(t,r=>{e(r),se(t,r.id).catch(()=>{})},n)}async function q(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var J={};d(J,{CloseRequestedEvent:()=>D,Effect:()=>ce,EffectState:()=>de,LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h,ProgressBarStatus:()=>le,UserAttentionType:()=>ae,Window:()=>k,availableMonitors:()=>xe,currentMonitor:()=>Oe,getAll:()=>L,getCurrent:()=>ue,primaryMonitor:()=>Te});var B={};d(B,{LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h});var P=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},h=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new P(this.width/e,this.height/e)}},_=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},g=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new _(this.x/e,this.y/e)}};var ae=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(ae||{}),D=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},le=(u=>(u.None="none",u.Normal="normal",u.Indeterminate="indeterminate",u.Paused="paused",u.Error="error",u))(le||{});function ue(){return new k(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function L(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new k(t.label,{skip:!0}))}var oe=["tauri://created","tauri://error"],k=class t{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return L().some(n=>n.label===e)?new t(e,{skip:!0}):null}static getCurrent(){return ue()}static getAll(){return L()}static async getFocusedWindow(){for(let e of L())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):x(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):Q(e,n,{target:this.label})}async emit(e,n){if(oe.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return q(e,n,{target:this.label})}_handleTauriEvent(e,n){return oe.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value: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("plugin:window|set_size",{label:this.label,value:{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("plugin:window|set_min_size",{label:this.label,value: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("plugin:window|set_max_size",{label:this.label,value: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("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value: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("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=pe(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=me(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let r=new D(n);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),r=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",u=>{e({...u,payload:{type:"drop",paths:u.payload}})}),r=await this.listen("tauri://file-drop-hover",u=>{e({...u,payload:{type:"hover",paths:u.payload}})}),l=await this.listen("tauri://file-drop-cancelled",u=>{e({...u,payload:{type:"cancel"}})});return()=>{n(),r(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},ce=(a=>(a.AppearanceBased="appearanceBased",a.Light="light",a.Dark="dark",a.MediumLight="mediumLight",a.UltraDark="ultraDark",a.Titlebar="titlebar",a.Selection="selection",a.Menu="menu",a.Popover="popover",a.Sidebar="sidebar",a.HeaderView="headerView",a.Sheet="sheet",a.WindowBackground="windowBackground",a.HudWindow="hudWindow",a.FullScreenUI="fullScreenUI",a.Tooltip="tooltip",a.ContentBackground="contentBackground",a.UnderWindowBackground="underWindowBackground",a.UnderPageBackground="underPageBackground",a.Mica="mica",a.Blur="blur",a.Acrylic="acrylic",a.Tabbed="tabbed",a.TabbedDark="tabbedDark",a.TabbedLight="tabbedLight",a))(ce||{}),de=(r=>(r.FollowsWindowActiveState="followsWindowActiveState",r.Active="active",r.Inactive="inactive",r))(de||{});function Z(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:me(t.position),size:pe(t.size)}}function me(t){return new g(t.x,t.y)}function pe(t){return new h(t.width,t.height)}async function Oe(){return i("plugin:window|current_monitor").then(Z)}async function Te(){return i("plugin:window|primary_monitor").then(Z)}async function xe(){return i("plugin:window|available_monitors").then(t=>t.map(Z))}var Y={};d(Y,{BaseDirectory:()=>he,appCacheDir:()=>Ee,appConfigDir:()=>Le,appDataDir:()=>De,appLocalDataDir:()=>Fe,appLogDir:()=>en,audioDir:()=>Re,basename:()=>cn,cacheDir:()=>ze,configDir:()=>We,dataDir:()=>Ue,delimiter:()=>rn,desktopDir:()=>He,dirname:()=>ln,documentDir:()=>Ve,downloadDir:()=>Ge,executableDir:()=>Ne,extname:()=>un,fontDir:()=>Ke,homeDir:()=>je,isAbsolute:()=>dn,join:()=>an,localDataDir:()=>Qe,normalize:()=>on,pictureDir:()=>qe,publicDir:()=>$e,resolve:()=>sn,resolveResource:()=>Ze,resourceDir:()=>Be,runtimeDir:()=>Je,sep:()=>tn,tempDir:()=>nn,templateDir:()=>Ye,videoDir:()=>Xe});var he=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(he||{});async function Le(){return i("plugin:path|resolve_directory",{directory:13})}async function De(){return i("plugin:path|resolve_directory",{directory:14})}async function Fe(){return i("plugin:path|resolve_directory",{directory:15})}async function Ee(){return i("plugin:path|resolve_directory",{directory:16})}async function Re(){return i("plugin:path|resolve_directory",{directory:1})}async function ze(){return i("plugin:path|resolve_directory",{directory:2})}async function We(){return i("plugin:path|resolve_directory",{directory:3})}async function Ue(){return i("plugin:path|resolve_directory",{directory:4})}async function He(){return i("plugin:path|resolve_directory",{directory:18})}async function Ve(){return i("plugin:path|resolve_directory",{directory:6})}async function Ge(){return i("plugin:path|resolve_directory",{directory:7})}async function Ne(){return i("plugin:path|resolve_directory",{directory:19})}async function Ke(){return i("plugin:path|resolve_directory",{directory:20})}async function je(){return i("plugin:path|resolve_directory",{directory:21})}async function Qe(){return i("plugin:path|resolve_directory",{directory:5})}async function qe(){return i("plugin:path|resolve_directory",{directory:8})}async function $e(){return i("plugin:path|resolve_directory",{directory:9})}async function Be(){return i("plugin:path|resolve_directory",{directory:11})}async function Ze(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Je(){return i("plugin:path|resolve_directory",{directory:22})}async function Ye(){return i("plugin:path|resolve_directory",{directory:23})}async function Xe(){return i("plugin:path|resolve_directory",{directory:10})}async function en(){return i("plugin:path|resolve_directory",{directory:17})}async function nn(t){return i("plugin:path|resolve_directory",{directory:12})}function tn(){return window.__TAURI_INTERNALS__.plugins.path.sep}function rn(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function sn(...t){return i("plugin:path|resolve",{paths:t})}async function on(t){return i("plugin:path|normalize",{path:t})}async function an(...t){return i("plugin:path|join",{paths:t})}async function ln(t){return i("plugin:path|dirname",{path:t})}async function un(t){return i("plugin:path|extname",{path:t})}async function cn(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function dn(t){return i("plugin:path|isAbsolute",{path:t})}var ee={};d(ee,{TrayIcon:()=>X});var M,v=class{constructor(e){b(this,M,void 0);y(this,M,e)}get rid(){return m(this,M)}async close(){return i("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function ge(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)??Object.create(null))})})}var X=class t extends v{constructor(n,r){super(n);this.id=r}static async new(n){n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]);let r=new p;return n?.action&&(r.onmessage=n.action,delete n.action),i("plugin:tray|new",{options:n??{},handler:r}).then(([l,u])=>new t(l,u))}async setIcon(n){return i("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(n){return n&&(n=[n.rid,n.kind]),i("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return i("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return i("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return i("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return i("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return i("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return i("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}};var te={};d(te,{CheckMenuItem:()=>H,IconMenuItem:()=>V,Menu:()=>ie,MenuItem:()=>W,NativeIcon:()=>be,PredefinedMenuItem:()=>U,Submenu:()=>I});var be=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(be||{});function ne([t,e,n]){switch(n){case"Submenu":return new I(t,e);case"Predefined":return new U(t,e);case"Check":return new H(t,e);case"Icon":return new V(t,e);case"MenuItem":default:return new W(t,e)}}async function f(t,e){let n=new p,r=null;return e&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&e.items&&(r=e.items.map(l=>[l.rid,l.kind]))),i("plugin:menu|new",{kind:t,options:e?{...e,items:r}:void 0,handler:n})}var A,C,F=class extends v{constructor(n,r,l){super(n);b(this,A,void 0);b(this,C,void 0);y(this,A,r),y(this,C,l)}get id(){return m(this,A)}get kind(){return m(this,C)}};A=new WeakMap,C=new WeakMap;var E=class extends F{async append(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return i("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return i("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(r=>[r.rid,r.kind]),position:n})}async remove(e){return i("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return i("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(ne)}async items(){return i("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(ne))}async get(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?ne(n):null)}async popup(e,n){return i("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},ie=class t extends E{constructor(e,n){super(e,n,"Menu")}static async new(e){return f("Menu",e).then(([n,r])=>new t(n,r))}static async default(){return i("plugin:menu|default").then(([e,n])=>new t(e,n))}async setAsAppMenu(){return i("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new t(e[0],e[1]):null)}async setAsWindowMenu(e){return i("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new t(n[0],n[1]):null)}},R=class extends F{async text(){return i("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return i("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},z=class extends R{async isEnabled(){return i("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return i("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},S=class extends z{async setAccelerator(e){return i("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},W=class t extends S{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},I=class t extends E{constructor(e,n){super(e,n,"Submenu")}static async new(e){return f("Submenu",e).then(([n,r])=>new t(n,r))}async setAsWindowsMenuForNSApp(){return i("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return i("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};ge(I,z);var U=class t extends R{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},H=class t extends S{constructor(e,n){super(e,n,"Check")}static async new(e){return f("Check",e).then(([n,r])=>new t(n,r))}async isChecked(){return i("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return i("plugin:menu|set_checked",{rid:this.rid,checked:e})}},V=class t extends S{constructor(e,n){super(e,n,"Icon")}static async new(e){return f("Icon",e).then(([n,r])=>new t(n,r))}async setIcon(e){return i("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return i("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};return ve(mn);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/tray/plugin.rs b/core/tauri/src/tray/plugin.rs index ef620ce2c89..308eb040254 100644 --- a/core/tauri/src/tray/plugin.rs +++ b/core/tauri/src/tray/plugin.rs @@ -13,7 +13,7 @@ use crate::{ plugin::{Builder, TauriPlugin}, resources::ResourceId, tray::TrayIconBuilder, - AppHandle, IconDto, Manager, Runtime, + AppHandle, IconDto, Runtime, }; use super::TrayIcon; @@ -35,7 +35,7 @@ struct TrayIconOptions { fn new( app: AppHandle, options: TrayIconOptions, - handler: Option, + handler: Channel, ) -> crate::Result<(ResourceId, String)> { let mut builder = if let Some(id) = options.id { TrayIconBuilder::::with_id(id) @@ -43,11 +43,9 @@ fn new( TrayIconBuilder::::new() }; - if let Some(handler) = handler { - builder = builder.on_tray_event(|tray, e| { - let _ = handler.send(e); - }); - } + builder = builder.on_tray_icon_event(move |_tray, e| { + let _ = handler.send(e); + }); let mut resources_table = app.manager.resources_table(); diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 4062cbc39f1..0aa2590b0fc 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -480,12 +480,12 @@ dependencies = [ [[package]] name = "cargo_toml" -version = "0.15.3" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "599aa35200ffff8f04c1925aa1acc92fa2e08874379ef42e210a80e527e60838" +checksum = "e3f9629bc6c4388ea699781dc988c2b99766d7679b151c81990b4fa1208fafd3" dependencies = [ "serde", - "toml 0.7.8", + "toml 0.8.2", ] [[package]] diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index e5e14bc6411..bf548b44ee3 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -8,7 +8,7 @@ import Window from './views/Window.svelte' import WebRTC from './views/WebRTC.svelte' import App from './views/App.svelte' - + import Tray from './views/Tray.svelte' document.addEventListener('keydown', (event) => { if (event.ctrlKey && event.key === 'b') { @@ -40,6 +40,11 @@ component: Window, icon: 'i-codicon-window' }, + { + label: 'Tray', + component: Tray, + icon: 'i-ph-broadcast' + }, { label: 'WebRTC', component: WebRTC, diff --git a/examples/api/src/views/Tray.svelte b/examples/api/src/views/Tray.svelte new file mode 100644 index 00000000000..bf10fc3e383 --- /dev/null +++ b/examples/api/src/views/Tray.svelte @@ -0,0 +1,65 @@ + + +
+
+ + + + + +
+ +
+ + + +
+ +
+ +
+
diff --git a/examples/api/src/views/Window.svelte b/examples/api/src/views/Window.svelte index e0795414971..d1b0a5359ca 100644 --- a/examples/api/src/views/Window.svelte +++ b/examples/api/src/views/Window.svelte @@ -10,7 +10,6 @@ ProgressBarStatus, Window } from '@tauri-apps/api/window' - import { invoke } from '@tauri-apps/api/primitives' const appWindow = getCurrent() diff --git a/tooling/api/src/tray.ts b/tooling/api/src/tray.ts index 2c93b5fccf7..4858fdcef48 100644 --- a/tooling/api/src/tray.ts +++ b/tooling/api/src/tray.ts @@ -63,7 +63,7 @@ export interface TrayIconOptions { /** The tray icon tooltip */ tooltip?: string /** - * The tooltip text + * The tray title * * #### Platform-specific * @@ -87,7 +87,7 @@ export interface TrayIconOptions { */ iconAsTemplate?: boolean /** Whether to show the tray menu on left click or not, default is `true`. **macOS only**. */ - menuOnLeftClieck?: boolean + menuOnLeftClick?: boolean /** A handler for an event on the tray icon. */ action?: (event: TrayIconEvent) => void } From 37fb32d2658c165b2a759227ec43002156bc1caa Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Tue, 24 Oct 2023 08:25:00 -0300 Subject: [PATCH 32/64] Update core/tauri/src/resources/mod.rs [skip ci] Co-authored-by: Fabian-Lars --- core/tauri/src/resources/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tauri/src/resources/mod.rs b/core/tauri/src/resources/mod.rs index bf176eee778..e178fed799a 100644 --- a/core/tauri/src/resources/mod.rs +++ b/core/tauri/src/resources/mod.rs @@ -95,7 +95,7 @@ impl ResourceTable { /// The resource type is erased at runtime and must be statically known /// when retrieving it through `get()`. /// - /// Returns an unique resource ID, which acts as a key for this resource. + /// Returns a unique resource ID, which acts as a key for this resource. pub(crate) fn add_arc(&mut self, resource: Arc) -> ResourceId { let resource = resource as Arc; self.add_arc_dyn(resource) From 7a50dc6c0a6b63598655ed2f8da5bc0916f31ce5 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 24 Oct 2023 09:30:24 -0300 Subject: [PATCH 33/64] basic menu example --- examples/api/src/App.svelte | 6 + .../api/src/components/MenuBuilder.svelte | 44 ++++++ .../api/src/components/MenuItemBuilder.svelte | 126 ++++++++++++++++++ examples/api/src/views/Menu.svelte | 19 +++ examples/api/src/views/Tray.svelte | 14 +- 5 files changed, 207 insertions(+), 2 deletions(-) create mode 100644 examples/api/src/components/MenuBuilder.svelte create mode 100644 examples/api/src/components/MenuItemBuilder.svelte create mode 100644 examples/api/src/views/Menu.svelte diff --git a/examples/api/src/App.svelte b/examples/api/src/App.svelte index bf548b44ee3..b26b3182e3e 100644 --- a/examples/api/src/App.svelte +++ b/examples/api/src/App.svelte @@ -8,6 +8,7 @@ import Window from './views/Window.svelte' import WebRTC from './views/WebRTC.svelte' import App from './views/App.svelte' + import Menu from './views/Menu.svelte' import Tray from './views/Tray.svelte' document.addEventListener('keydown', (event) => { @@ -40,6 +41,11 @@ component: Window, icon: 'i-codicon-window' }, + { + label: 'Menu', + component: Menu, + icon: 'i-ph-broadcast' + }, { label: 'Tray', component: Tray, diff --git a/examples/api/src/components/MenuBuilder.svelte b/examples/api/src/components/MenuBuilder.svelte new file mode 100644 index 00000000000..50c33506d05 --- /dev/null +++ b/examples/api/src/components/MenuBuilder.svelte @@ -0,0 +1,44 @@ + + +
+ + +
+ {#each items as item} +
+
+

{itemToString(item)}

+
+ {/each} +
+
diff --git a/examples/api/src/components/MenuItemBuilder.svelte b/examples/api/src/components/MenuItemBuilder.svelte new file mode 100644 index 00000000000..3ef257f06c1 --- /dev/null +++ b/examples/api/src/components/MenuItemBuilder.svelte @@ -0,0 +1,126 @@ + + +
+
+ {#each itemKinds as itemKind} + + {/each} +
+ +
+ {#if kind == 'Normal' || kind == 'Icon' || kind == 'Check'} + + {/if} + {#if kind == 'Icon'} + + {:else if kind == 'Predefined'} +
+ {#each predefinedOptions as predefinedOption} + + {/each} +
+ {/if} +
+ +
+ +
+
diff --git a/examples/api/src/views/Menu.svelte b/examples/api/src/views/Menu.svelte new file mode 100644 index 00000000000..0f50dc6e874 --- /dev/null +++ b/examples/api/src/views/Menu.svelte @@ -0,0 +1,19 @@ + + +
+ + +
diff --git a/examples/api/src/views/Tray.svelte b/examples/api/src/views/Tray.svelte index bf10fc3e383..f9a34577dff 100644 --- a/examples/api/src/views/Tray.svelte +++ b/examples/api/src/views/Tray.svelte @@ -1,5 +1,7 @@
- +
{#each items as item} diff --git a/examples/api/src/components/MenuItemBuilder.svelte b/examples/api/src/components/MenuItemBuilder.svelte index 3ef257f06c1..5d26570f5ca 100644 --- a/examples/api/src/components/MenuItemBuilder.svelte +++ b/examples/api/src/components/MenuItemBuilder.svelte @@ -45,21 +45,36 @@ async function create() { let options = null let item = null + + const t = text + switch (kind) { case 'Normal': - options = { text } + options = { + text, + action: (id) => dispatch('itemClick', { id, text: t }) + } item = await MenuItem.new(options) break case 'Icon': - options = { text, icon } + options = { + text, + icon, + action: (id) => dispatch('itemClick', { id, text: t }) + } item = await IconMenuItem.new(options) break case 'Check': - options = { text } + options = { + text, + action: (id) => dispatch('itemClick', { id, text: t }) + } item = await CheckMenuItem.new(options) break case 'Predefined': - options = { item: predefinedItem } + options = { + item: predefinedItem + } item = await PredefinedMenuItem.new(options) break } diff --git a/examples/api/src/views/Menu.svelte b/examples/api/src/views/Menu.svelte index 0f50dc6e874..b810943a752 100644 --- a/examples/api/src/views/Menu.svelte +++ b/examples/api/src/views/Menu.svelte @@ -11,9 +11,13 @@ }) await menu.setAsWindowMenu('main') } + + function onItemClick(event) { + onMessage(`Item ${event.detail.text} clicked`) + }
- +
diff --git a/examples/api/src/views/Tray.svelte b/examples/api/src/views/Tray.svelte index f9a34577dff..586b0ef7e0d 100644 --- a/examples/api/src/views/Tray.svelte +++ b/examples/api/src/views/Tray.svelte @@ -12,6 +12,10 @@ let menuOnLeftClick = true let menuItems = [] + function onItemClick(event) { + onMessage(`Item ${event.detail.text} clicked`) + } + async function create() { TrayIcon.new({ icon, @@ -64,7 +68,7 @@
- +
diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 10824e94bb9..67811a4c098 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -180,7 +180,7 @@ async function newMenu( | PredefinedMenuItemOptions | IconMenuItemOptions ): Promise<[number, string]> { - const handler = new Channel() + const handler = new Channel() let items: null | Array<[number, string]> = null if (opts) { if ('action' in opts && opts.action) { @@ -489,7 +489,7 @@ interface MenuItemOptions { /** Specify an accelerator for the new menu item. */ accelerator?: string /** Specify a handler to be called when this menu item is activated. */ - action?: () => void + action?: (id: string) => void } /** A menu item inside a {@linkcode Menu} or {@linkcode Submenu} and contains only text. */ From 1db6d626d20d73bf3f886a1c6b04ef960e44c898 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Tue, 24 Oct 2023 19:27:00 -0300 Subject: [PATCH 36/64] resolve TODOs, add popup example [skip ci] --- core/tauri/scripts/bundle.global.js | 2 +- core/tauri/src/menu/plugin.rs | 28 +++++++++++++++++++--------- examples/api/src/views/Menu.svelte | 13 +++++++++++-- tooling/api/src/menu.ts | 26 ++++++++++++++++++-------- 4 files changed, 49 insertions(+), 20 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index f21915b54b7..7ff3bb1bd23 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1,2 +1,2 @@ -"use strict";var __TAURI_IIFE__=(()=>{var G=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var d=(t,e)=>{for(var n in e)G(t,n,{get:e[n],enumerable:!0})},_e=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of we(e))!Pe.call(t,l)&&l!==n&&G(t,l,{get:()=>e[l],enumerable:!(r=ye(e,l))||r.enumerable});return t};var ve=t=>_e(G({},"__esModule",{value:!0}),t);var re=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var m=(t,e,n)=>(re(t,e,"read from private field"),n?n.call(t):e.get(t)),b=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},y=(t,e,n,r)=>(re(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var mn={};d(mn,{app:()=>K,dpi:()=>B,event:()=>$,menu:()=>te,path:()=>Y,primitives:()=>N,tray:()=>ee,window:()=>J});var K={};d(K,{getName:()=>Se,getTauriVersion:()=>Ie,getVersion:()=>Me,hide:()=>Ce,show:()=>Ae});var N={};d(N,{Channel:()=>p,PluginListener:()=>O,addPluginListener:()=>fe,convertFileSrc:()=>ke,invoke:()=>i,transformCallback:()=>T});function T(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var w,p=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;b(this,w,()=>{});this.id=T(e=>{m(this,w).call(this,e)})}set onmessage(e){y(this,w,e)}get onmessage(){return m(this,w)}toJSON(){return`__CHANNEL__:${this.id}`}};w=new WeakMap;var O=class{constructor(e,n,r){this.plugin=e,this.event=n,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function fe(t,e,n){let r=new p;return r.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:r}).then(()=>new O(t,e,r.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function ke(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function Me(){return i("plugin:app|version")}async function Se(){return i("plugin:app|name")}async function Ie(){return i("plugin:app|tauri_version")}async function Ae(){return i("plugin:app|app_show")}async function Ce(){return i("plugin:app|app_hide")}var $={};d($,{TauriEvent:()=>j,emit:()=>q,listen:()=>x,once:()=>Q});var j=(c=>(c.WINDOW_RESIZED="tauri://resize",c.WINDOW_MOVED="tauri://move",c.WINDOW_CLOSE_REQUESTED="tauri://close-requested",c.WINDOW_CREATED="tauri://window-created",c.WINDOW_DESTROYED="tauri://destroyed",c.WINDOW_FOCUS="tauri://focus",c.WINDOW_BLUR="tauri://blur",c.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",c.WINDOW_THEME_CHANGED="tauri://theme-changed",c.WINDOW_FILE_DROP="tauri://file-drop",c.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",c.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",c))(j||{});async function se(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function x(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:T(e)}).then(r=>async()=>se(t,r))}async function Q(t,e,n){return x(t,r=>{e(r),se(t,r.id).catch(()=>{})},n)}async function q(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var J={};d(J,{CloseRequestedEvent:()=>D,Effect:()=>ce,EffectState:()=>de,LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h,ProgressBarStatus:()=>le,UserAttentionType:()=>ae,Window:()=>k,availableMonitors:()=>xe,currentMonitor:()=>Oe,getAll:()=>L,getCurrent:()=>ue,primaryMonitor:()=>Te});var B={};d(B,{LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>g,PhysicalSize:()=>h});var P=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},h=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new P(this.width/e,this.height/e)}},_=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},g=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new _(this.x/e,this.y/e)}};var ae=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(ae||{}),D=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},le=(u=>(u.None="none",u.Normal="normal",u.Indeterminate="indeterminate",u.Paused="paused",u.Error="error",u))(le||{});function ue(){return new k(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function L(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new k(t.label,{skip:!0}))}var oe=["tauri://created","tauri://error"],k=class t{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return L().some(n=>n.label===e)?new t(e,{skip:!0}):null}static getCurrent(){return ue()}static getAll(){return L()}static async getFocusedWindow(){for(let e of L())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):x(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):Q(e,n,{target:this.label})}async emit(e,n){if(oe.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return q(e,n,{target:this.label})}_handleTauriEvent(e,n){return oe.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new g(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new h(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value: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("plugin:window|set_size",{label:this.label,value:{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("plugin:window|set_min_size",{label:this.label,value: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("plugin:window|set_max_size",{label:this.label,value: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("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value: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("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=pe(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=me(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let r=new D(n);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),r=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",u=>{e({...u,payload:{type:"drop",paths:u.payload}})}),r=await this.listen("tauri://file-drop-hover",u=>{e({...u,payload:{type:"hover",paths:u.payload}})}),l=await this.listen("tauri://file-drop-cancelled",u=>{e({...u,payload:{type:"cancel"}})});return()=>{n(),r(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},ce=(a=>(a.AppearanceBased="appearanceBased",a.Light="light",a.Dark="dark",a.MediumLight="mediumLight",a.UltraDark="ultraDark",a.Titlebar="titlebar",a.Selection="selection",a.Menu="menu",a.Popover="popover",a.Sidebar="sidebar",a.HeaderView="headerView",a.Sheet="sheet",a.WindowBackground="windowBackground",a.HudWindow="hudWindow",a.FullScreenUI="fullScreenUI",a.Tooltip="tooltip",a.ContentBackground="contentBackground",a.UnderWindowBackground="underWindowBackground",a.UnderPageBackground="underPageBackground",a.Mica="mica",a.Blur="blur",a.Acrylic="acrylic",a.Tabbed="tabbed",a.TabbedDark="tabbedDark",a.TabbedLight="tabbedLight",a))(ce||{}),de=(r=>(r.FollowsWindowActiveState="followsWindowActiveState",r.Active="active",r.Inactive="inactive",r))(de||{});function Z(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:me(t.position),size:pe(t.size)}}function me(t){return new g(t.x,t.y)}function pe(t){return new h(t.width,t.height)}async function Oe(){return i("plugin:window|current_monitor").then(Z)}async function Te(){return i("plugin:window|primary_monitor").then(Z)}async function xe(){return i("plugin:window|available_monitors").then(t=>t.map(Z))}var Y={};d(Y,{BaseDirectory:()=>he,appCacheDir:()=>Ee,appConfigDir:()=>Le,appDataDir:()=>De,appLocalDataDir:()=>Fe,appLogDir:()=>en,audioDir:()=>Re,basename:()=>cn,cacheDir:()=>ze,configDir:()=>We,dataDir:()=>Ue,delimiter:()=>rn,desktopDir:()=>He,dirname:()=>ln,documentDir:()=>Ve,downloadDir:()=>Ge,executableDir:()=>Ne,extname:()=>un,fontDir:()=>Ke,homeDir:()=>je,isAbsolute:()=>dn,join:()=>an,localDataDir:()=>Qe,normalize:()=>on,pictureDir:()=>qe,publicDir:()=>$e,resolve:()=>sn,resolveResource:()=>Ze,resourceDir:()=>Be,runtimeDir:()=>Je,sep:()=>tn,tempDir:()=>nn,templateDir:()=>Ye,videoDir:()=>Xe});var he=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(he||{});async function Le(){return i("plugin:path|resolve_directory",{directory:13})}async function De(){return i("plugin:path|resolve_directory",{directory:14})}async function Fe(){return i("plugin:path|resolve_directory",{directory:15})}async function Ee(){return i("plugin:path|resolve_directory",{directory:16})}async function Re(){return i("plugin:path|resolve_directory",{directory:1})}async function ze(){return i("plugin:path|resolve_directory",{directory:2})}async function We(){return i("plugin:path|resolve_directory",{directory:3})}async function Ue(){return i("plugin:path|resolve_directory",{directory:4})}async function He(){return i("plugin:path|resolve_directory",{directory:18})}async function Ve(){return i("plugin:path|resolve_directory",{directory:6})}async function Ge(){return i("plugin:path|resolve_directory",{directory:7})}async function Ne(){return i("plugin:path|resolve_directory",{directory:19})}async function Ke(){return i("plugin:path|resolve_directory",{directory:20})}async function je(){return i("plugin:path|resolve_directory",{directory:21})}async function Qe(){return i("plugin:path|resolve_directory",{directory:5})}async function qe(){return i("plugin:path|resolve_directory",{directory:8})}async function $e(){return i("plugin:path|resolve_directory",{directory:9})}async function Be(){return i("plugin:path|resolve_directory",{directory:11})}async function Ze(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Je(){return i("plugin:path|resolve_directory",{directory:22})}async function Ye(){return i("plugin:path|resolve_directory",{directory:23})}async function Xe(){return i("plugin:path|resolve_directory",{directory:10})}async function en(){return i("plugin:path|resolve_directory",{directory:17})}async function nn(t){return i("plugin:path|resolve_directory",{directory:12})}function tn(){return window.__TAURI_INTERNALS__.plugins.path.sep}function rn(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function sn(...t){return i("plugin:path|resolve",{paths:t})}async function on(t){return i("plugin:path|normalize",{path:t})}async function an(...t){return i("plugin:path|join",{paths:t})}async function ln(t){return i("plugin:path|dirname",{path:t})}async function un(t){return i("plugin:path|extname",{path:t})}async function cn(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function dn(t){return i("plugin:path|isAbsolute",{path:t})}var ee={};d(ee,{TrayIcon:()=>X});var M,v=class{constructor(e){b(this,M,void 0);y(this,M,e)}get rid(){return m(this,M)}async close(){return i("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function ge(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)??Object.create(null))})})}var X=class t extends v{constructor(n,r){super(n);this.id=r}static async new(n){n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),n?.icon&&(n.icon=typeof n.icon=="string"?n.icon:Array.from(n.icon));let r=new p;return n?.action&&(r.onmessage=n.action,delete n.action),i("plugin:tray|new",{options:n??{},handler:r}).then(([l,u])=>new t(l,u))}async setIcon(n){let r=null;return n&&(r=typeof n=="string"?n:Array.from(n)),i("plugin:tray|set_icon",{rid:this.rid,icon:r})}async setMenu(n){return n&&(n=[n.rid,n.kind]),i("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return i("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return i("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return i("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return i("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return i("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return i("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}};var te={};d(te,{CheckMenuItem:()=>H,IconMenuItem:()=>V,Menu:()=>ie,MenuItem:()=>W,NativeIcon:()=>be,PredefinedMenuItem:()=>U,Submenu:()=>I});var be=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(be||{});function ne([t,e,n]){switch(n){case"Submenu":return new I(t,e);case"Predefined":return new U(t,e);case"Check":return new H(t,e);case"Icon":return new V(t,e);case"MenuItem":default:return new W(t,e)}}async function f(t,e){let n=new p,r=null;return e&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&e.items&&(r=e.items.map(l=>[l.rid,l.kind]))),i("plugin:menu|new",{kind:t,options:e?{...e,items:r}:void 0,handler:n})}var A,C,F=class extends v{constructor(n,r,l){super(n);b(this,A,void 0);b(this,C,void 0);y(this,A,r),y(this,C,l)}get id(){return m(this,A)}get kind(){return m(this,C)}};A=new WeakMap,C=new WeakMap;var E=class extends F{async append(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return i("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return i("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(r=>[r.rid,r.kind]),position:n})}async remove(e){return i("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return i("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(ne)}async items(){return i("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(ne))}async get(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?ne(n):null)}async popup(e,n){return i("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:e,position:n})}},ie=class t extends E{constructor(e,n){super(e,n,"Menu")}static async new(e){return f("Menu",e).then(([n,r])=>new t(n,r))}static async default(){return i("plugin:menu|default").then(([e,n])=>new t(e,n))}async setAsAppMenu(){return i("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new t(e[0],e[1]):null)}async setAsWindowMenu(e){return i("plugin:menu|set_as_window_menu",{rid:this.rid,window:e}).then(n=>n?new t(n[0],n[1]):null)}},R=class extends F{async text(){return i("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return i("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},z=class extends R{async isEnabled(){return i("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return i("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},S=class extends z{async setAccelerator(e){return i("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},W=class t extends S{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},I=class t extends E{constructor(e,n){super(e,n,"Submenu")}static async new(e){return f("Submenu",e).then(([n,r])=>new t(n,r))}async setAsWindowsMenuForNSApp(){return i("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return i("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};ge(I,z);var U=class t extends R{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},H=class t extends S{constructor(e,n){super(e,n,"Check")}static async new(e){return f("Check",e).then(([n,r])=>new t(n,r))}async isChecked(){return i("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return i("plugin:menu|set_checked",{rid:this.rid,checked:e})}},V=class t extends S{constructor(e,n){super(e,n,"Icon")}static async new(e){return f("Icon",e).then(([n,r])=>new t(n,r))}async setIcon(e){return i("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return i("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};return ve(mn);})(); +"use strict";var __TAURI_IIFE__=(()=>{var G=Object.defineProperty;var ye=Object.getOwnPropertyDescriptor;var we=Object.getOwnPropertyNames;var Pe=Object.prototype.hasOwnProperty;var m=(t,e)=>{for(var n in e)G(t,n,{get:e[n],enumerable:!0})},_e=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of we(e))!Pe.call(t,l)&&l!==n&&G(t,l,{get:()=>e[l],enumerable:!(r=ye(e,l))||r.enumerable});return t};var ve=t=>_e(G({},"__esModule",{value:!0}),t);var re=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var p=(t,e,n)=>(re(t,e,"read from private field"),n?n.call(t):e.get(t)),b=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)},y=(t,e,n,r)=>(re(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);var mn={};m(mn,{app:()=>K,dpi:()=>B,event:()=>$,menu:()=>te,path:()=>Y,primitives:()=>N,tray:()=>ee,window:()=>J});var K={};m(K,{getName:()=>Se,getTauriVersion:()=>Ie,getVersion:()=>Me,hide:()=>Ce,show:()=>Ae});var N={};m(N,{Channel:()=>h,PluginListener:()=>O,addPluginListener:()=>fe,convertFileSrc:()=>ke,invoke:()=>i,transformCallback:()=>T});function T(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}var w,h=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;b(this,w,()=>{});this.id=T(e=>{p(this,w).call(this,e)})}set onmessage(e){y(this,w,e)}get onmessage(){return p(this,w)}toJSON(){return`__CHANNEL__:${this.id}`}};w=new WeakMap;var O=class{constructor(e,n,r){this.plugin=e,this.event=n,this.channelId=r}async unregister(){return i(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function fe(t,e,n){let r=new h;return r.onmessage=n,i(`plugin:${t}|register_listener`,{event:e,handler:r}).then(()=>new O(t,e,r.id))}async function i(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}function ke(t,e="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(t,e)}async function Me(){return i("plugin:app|version")}async function Se(){return i("plugin:app|name")}async function Ie(){return i("plugin:app|tauri_version")}async function Ae(){return i("plugin:app|app_show")}async function Ce(){return i("plugin:app|app_hide")}var $={};m($,{TauriEvent:()=>j,emit:()=>q,listen:()=>L,once:()=>Q});var j=(c=>(c.WINDOW_RESIZED="tauri://resize",c.WINDOW_MOVED="tauri://move",c.WINDOW_CLOSE_REQUESTED="tauri://close-requested",c.WINDOW_CREATED="tauri://window-created",c.WINDOW_DESTROYED="tauri://destroyed",c.WINDOW_FOCUS="tauri://focus",c.WINDOW_BLUR="tauri://blur",c.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",c.WINDOW_THEME_CHANGED="tauri://theme-changed",c.WINDOW_FILE_DROP="tauri://file-drop",c.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",c.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",c))(j||{});async function se(t,e){await i("plugin:event|unlisten",{event:t,eventId:e})}async function L(t,e,n){return i("plugin:event|listen",{event:t,windowLabel:n?.target,handler:T(e)}).then(r=>async()=>se(t,r))}async function Q(t,e,n){return L(t,r=>{e(r),se(t,r.id).catch(()=>{})},n)}async function q(t,e,n){await i("plugin:event|emit",{event:t,windowLabel:n?.target,payload:e})}var J={};m(J,{CloseRequestedEvent:()=>D,Effect:()=>ce,EffectState:()=>de,LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>d,PhysicalSize:()=>g,ProgressBarStatus:()=>le,UserAttentionType:()=>ae,Window:()=>k,availableMonitors:()=>Le,currentMonitor:()=>Oe,getAll:()=>x,getCurrent:()=>ue,primaryMonitor:()=>Te});var B={};m(B,{LogicalPosition:()=>_,LogicalSize:()=>P,PhysicalPosition:()=>d,PhysicalSize:()=>g});var P=class{constructor(e,n){this.type="Logical";this.width=e,this.height=n}},g=class{constructor(e,n){this.type="Physical";this.width=e,this.height=n}toLogical(e){return new P(this.width/e,this.height/e)}},_=class{constructor(e,n){this.type="Logical";this.x=e,this.y=n}},d=class{constructor(e,n){this.type="Physical";this.x=e,this.y=n}toLogical(e){return new _(this.x/e,this.y/e)}};var ae=(n=>(n[n.Critical=1]="Critical",n[n.Informational=2]="Informational",n))(ae||{}),D=class{constructor(e){this._preventDefault=!1;this.event=e.event,this.windowLabel=e.windowLabel,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}},le=(u=>(u.None="none",u.Normal="normal",u.Indeterminate="indeterminate",u.Paused="paused",u.Error="error",u))(le||{});function ue(){return new k(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function x(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new k(t.label,{skip:!0}))}var oe=["tauri://created","tauri://error"],k=class t{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||i("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async r=>this.emit("tauri://error",r))}static getByLabel(e){return x().some(n=>n.label===e)?new t(e,{skip:!0}):null}static getCurrent(){return ue()}static getAll(){return x()}static async getFocusedWindow(){for(let e of x())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):L(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{let r=this.listeners[e];r.splice(r.indexOf(n),1)}):Q(e,n,{target:this.label})}async emit(e,n){if(oe.includes(e)){for(let r of this.listeners[e]||[])r({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return q(e,n,{target:this.label})}_handleTauriEvent(e,n){return oe.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return i("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return i("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new d(e,n))}async outerPosition(){return i("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new d(e,n))}async innerSize(){return i("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new g(e,n))}async outerSize(){return i("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new g(e,n))}async isFullscreen(){return i("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return i("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return i("plugin:window|is_maximized",{label:this.label})}async isFocused(){return i("plugin:window|is_focused",{label:this.label})}async isDecorated(){return i("plugin:window|is_decorated",{label:this.label})}async isResizable(){return i("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return i("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return i("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return i("plugin:window|is_closable",{label:this.label})}async isVisible(){return i("plugin:window|is_visible",{label:this.label})}async title(){return i("plugin:window|title",{label:this.label})}async theme(){return i("plugin:window|theme",{label:this.label})}async center(){return i("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===1?n={type:"Critical"}:n={type:"Informational"}),i("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return i("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return i("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return i("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return i("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return i("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return i("plugin:window|maximize",{label:this.label})}async unmaximize(){return i("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return i("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return i("plugin:window|minimize",{label:this.label})}async unminimize(){return i("plugin:window|unminimize",{label:this.label})}async show(){return i("plugin:window|show",{label:this.label})}async hide(){return i("plugin:window|hide",{label:this.label})}async close(){return i("plugin:window|close",{label:this.label})}async setDecorations(e){return i("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return i("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return i("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return i("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return i("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return i("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return i("plugin:window|set_content_protected",{label:this.label,value: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("plugin:window|set_size",{label:this.label,value:{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("plugin:window|set_min_size",{label:this.label,value: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("plugin:window|set_max_size",{label:this.label,value: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("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return i("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return i("plugin:window|set_focus",{label:this.label})}async setIcon(e){return i("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return i("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return i("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return i("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return i("plugin:window|set_cursor_icon",{label:this.label,value: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("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return i("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return i("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return i("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen("tauri://resize",n=>{n.payload=pe(n.payload),e(n)})}async onMoved(e){return this.listen("tauri://move",n=>{n.payload=me(n.payload),e(n)})}async onCloseRequested(e){return this.listen("tauri://close-requested",n=>{let r=new D(n);Promise.resolve(e(r)).then(()=>{if(!r.isPreventDefault())return this.close()})})}async onFocusChanged(e){let n=await this.listen("tauri://focus",l=>{e({...l,payload:!0})}),r=await this.listen("tauri://blur",l=>{e({...l,payload:!1})});return()=>{n(),r()}}async onScaleChanged(e){return this.listen("tauri://scale-change",e)}async onFileDropEvent(e){let n=await this.listen("tauri://file-drop",u=>{e({...u,payload:{type:"drop",paths:u.payload}})}),r=await this.listen("tauri://file-drop-hover",u=>{e({...u,payload:{type:"hover",paths:u.payload}})}),l=await this.listen("tauri://file-drop-cancelled",u=>{e({...u,payload:{type:"cancel"}})});return()=>{n(),r(),l()}}async onThemeChanged(e){return this.listen("tauri://theme-changed",e)}},ce=(a=>(a.AppearanceBased="appearanceBased",a.Light="light",a.Dark="dark",a.MediumLight="mediumLight",a.UltraDark="ultraDark",a.Titlebar="titlebar",a.Selection="selection",a.Menu="menu",a.Popover="popover",a.Sidebar="sidebar",a.HeaderView="headerView",a.Sheet="sheet",a.WindowBackground="windowBackground",a.HudWindow="hudWindow",a.FullScreenUI="fullScreenUI",a.Tooltip="tooltip",a.ContentBackground="contentBackground",a.UnderWindowBackground="underWindowBackground",a.UnderPageBackground="underPageBackground",a.Mica="mica",a.Blur="blur",a.Acrylic="acrylic",a.Tabbed="tabbed",a.TabbedDark="tabbedDark",a.TabbedLight="tabbedLight",a))(ce||{}),de=(r=>(r.FollowsWindowActiveState="followsWindowActiveState",r.Active="active",r.Inactive="inactive",r))(de||{});function Z(t){return t===null?null:{name:t.name,scaleFactor:t.scaleFactor,position:me(t.position),size:pe(t.size)}}function me(t){return new d(t.x,t.y)}function pe(t){return new g(t.width,t.height)}async function Oe(){return i("plugin:window|current_monitor").then(Z)}async function Te(){return i("plugin:window|primary_monitor").then(Z)}async function Le(){return i("plugin:window|available_monitors").then(t=>t.map(Z))}var Y={};m(Y,{BaseDirectory:()=>he,appCacheDir:()=>Ee,appConfigDir:()=>xe,appDataDir:()=>De,appLocalDataDir:()=>Fe,appLogDir:()=>en,audioDir:()=>Re,basename:()=>cn,cacheDir:()=>ze,configDir:()=>We,dataDir:()=>Ue,delimiter:()=>rn,desktopDir:()=>He,dirname:()=>ln,documentDir:()=>Ve,downloadDir:()=>Ge,executableDir:()=>Ne,extname:()=>un,fontDir:()=>Ke,homeDir:()=>je,isAbsolute:()=>dn,join:()=>an,localDataDir:()=>Qe,normalize:()=>on,pictureDir:()=>qe,publicDir:()=>$e,resolve:()=>sn,resolveResource:()=>Ze,resourceDir:()=>Be,runtimeDir:()=>Je,sep:()=>tn,tempDir:()=>nn,templateDir:()=>Ye,videoDir:()=>Xe});var he=(o=>(o[o.Audio=1]="Audio",o[o.Cache=2]="Cache",o[o.Config=3]="Config",o[o.Data=4]="Data",o[o.LocalData=5]="LocalData",o[o.Document=6]="Document",o[o.Download=7]="Download",o[o.Picture=8]="Picture",o[o.Public=9]="Public",o[o.Video=10]="Video",o[o.Resource=11]="Resource",o[o.Temp=12]="Temp",o[o.AppConfig=13]="AppConfig",o[o.AppData=14]="AppData",o[o.AppLocalData=15]="AppLocalData",o[o.AppCache=16]="AppCache",o[o.AppLog=17]="AppLog",o[o.Desktop=18]="Desktop",o[o.Executable=19]="Executable",o[o.Font=20]="Font",o[o.Home=21]="Home",o[o.Runtime=22]="Runtime",o[o.Template=23]="Template",o))(he||{});async function xe(){return i("plugin:path|resolve_directory",{directory:13})}async function De(){return i("plugin:path|resolve_directory",{directory:14})}async function Fe(){return i("plugin:path|resolve_directory",{directory:15})}async function Ee(){return i("plugin:path|resolve_directory",{directory:16})}async function Re(){return i("plugin:path|resolve_directory",{directory:1})}async function ze(){return i("plugin:path|resolve_directory",{directory:2})}async function We(){return i("plugin:path|resolve_directory",{directory:3})}async function Ue(){return i("plugin:path|resolve_directory",{directory:4})}async function He(){return i("plugin:path|resolve_directory",{directory:18})}async function Ve(){return i("plugin:path|resolve_directory",{directory:6})}async function Ge(){return i("plugin:path|resolve_directory",{directory:7})}async function Ne(){return i("plugin:path|resolve_directory",{directory:19})}async function Ke(){return i("plugin:path|resolve_directory",{directory:20})}async function je(){return i("plugin:path|resolve_directory",{directory:21})}async function Qe(){return i("plugin:path|resolve_directory",{directory:5})}async function qe(){return i("plugin:path|resolve_directory",{directory:8})}async function $e(){return i("plugin:path|resolve_directory",{directory:9})}async function Be(){return i("plugin:path|resolve_directory",{directory:11})}async function Ze(t){return i("plugin:path|resolve_directory",{directory:11,path:t})}async function Je(){return i("plugin:path|resolve_directory",{directory:22})}async function Ye(){return i("plugin:path|resolve_directory",{directory:23})}async function Xe(){return i("plugin:path|resolve_directory",{directory:10})}async function en(){return i("plugin:path|resolve_directory",{directory:17})}async function nn(t){return i("plugin:path|resolve_directory",{directory:12})}function tn(){return window.__TAURI_INTERNALS__.plugins.path.sep}function rn(){return window.__TAURI_INTERNALS__.plugins.path.delimiter}async function sn(...t){return i("plugin:path|resolve",{paths:t})}async function on(t){return i("plugin:path|normalize",{path:t})}async function an(...t){return i("plugin:path|join",{paths:t})}async function ln(t){return i("plugin:path|dirname",{path:t})}async function un(t){return i("plugin:path|extname",{path:t})}async function cn(t,e){return i("plugin:path|basename",{path:t,ext:e})}async function dn(t){return i("plugin:path|isAbsolute",{path:t})}var ee={};m(ee,{TrayIcon:()=>X});var M,v=class{constructor(e){b(this,M,void 0);y(this,M,e)}get rid(){return p(this,M)}async close(){return i("plugin:resources|close",{rid:this.rid})}};M=new WeakMap;function ge(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(t.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)??Object.create(null))})})}var X=class t extends v{constructor(n,r){super(n);this.id=r}static async new(n){n?.menu&&(n.menu=[n.menu.rid,n.menu.kind]),n?.icon&&(n.icon=typeof n.icon=="string"?n.icon:Array.from(n.icon));let r=new h;return n?.action&&(r.onmessage=n.action,delete n.action),i("plugin:tray|new",{options:n??{},handler:r}).then(([l,u])=>new t(l,u))}async setIcon(n){let r=null;return n&&(r=typeof n=="string"?n:Array.from(n)),i("plugin:tray|set_icon",{rid:this.rid,icon:r})}async setMenu(n){return n&&(n=[n.rid,n.kind]),i("plugin:tray|set_menu",{rid:this.rid,menu:n})}async setTooltip(n){return i("plugin:tray|set_tooltip",{rid:this.rid,tooltip:n})}async setTitle(n){return i("plugin:tray|set_title",{rid:this.rid,title:n})}async setVisible(n){return i("plugin:tray|set_visible",{rid:this.rid,visible:n})}async setTempDirPath(n){return i("plugin:tray|set_temp_dir_path",{rid:this.rid,path:n})}async setIconAsTemplate(n){return i("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:n})}async setMenuOnLeftClick(n){return i("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:n})}};var te={};m(te,{CheckMenuItem:()=>H,IconMenuItem:()=>V,Menu:()=>ie,MenuItem:()=>W,NativeIcon:()=>be,PredefinedMenuItem:()=>U,Submenu:()=>I});var be=(s=>(s.Add="Add",s.Advanced="Advanced",s.Bluetooth="Bluetooth",s.Bookmarks="Bookmarks",s.Caution="Caution",s.ColorPanel="ColorPanel",s.ColumnView="ColumnView",s.Computer="Computer",s.EnterFullScreen="EnterFullScreen",s.Everyone="Everyone",s.ExitFullScreen="ExitFullScreen",s.FlowView="FlowView",s.Folder="Folder",s.FolderBurnable="FolderBurnable",s.FolderSmart="FolderSmart",s.FollowLinkFreestanding="FollowLinkFreestanding",s.FontPanel="FontPanel",s.GoLeft="GoLeft",s.GoRight="GoRight",s.Home="Home",s.IChatTheater="IChatTheater",s.IconView="IconView",s.Info="Info",s.InvalidDataFreestanding="InvalidDataFreestanding",s.LeftFacingTriangle="LeftFacingTriangle",s.ListView="ListView",s.LockLocked="LockLocked",s.LockUnlocked="LockUnlocked",s.MenuMixedState="MenuMixedState",s.MenuOnState="MenuOnState",s.MobileMe="MobileMe",s.MultipleDocuments="MultipleDocuments",s.Network="Network",s.Path="Path",s.PreferencesGeneral="PreferencesGeneral",s.QuickLook="QuickLook",s.RefreshFreestanding="RefreshFreestanding",s.Refresh="Refresh",s.Remove="Remove",s.RevealFreestanding="RevealFreestanding",s.RightFacingTriangle="RightFacingTriangle",s.Share="Share",s.Slideshow="Slideshow",s.SmartBadge="SmartBadge",s.StatusAvailable="StatusAvailable",s.StatusNone="StatusNone",s.StatusPartiallyAvailable="StatusPartiallyAvailable",s.StatusUnavailable="StatusUnavailable",s.StopProgressFreestanding="StopProgressFreestanding",s.StopProgress="StopProgress",s.TrashEmpty="TrashEmpty",s.TrashFull="TrashFull",s.User="User",s.UserAccounts="UserAccounts",s.UserGroup="UserGroup",s.UserGuest="UserGuest",s))(be||{});function ne([t,e,n]){switch(n){case"Submenu":return new I(t,e);case"Predefined":return new U(t,e);case"Check":return new H(t,e);case"Icon":return new V(t,e);case"MenuItem":default:return new W(t,e)}}async function f(t,e){let n=new h,r=null;return e&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&e.items&&(r=e.items.map(l=>[l.rid,l.kind]))),i("plugin:menu|new",{kind:t,options:e?{...e,items:r}:void 0,handler:n})}var A,C,F=class extends v{constructor(n,r,l){super(n);b(this,A,void 0);b(this,C,void 0);y(this,A,r),y(this,C,l)}get id(){return p(this,A)}get kind(){return p(this,C)}};A=new WeakMap,C=new WeakMap;var E=class extends F{async append(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return i("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return i("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(r=>[r.rid,r.kind]),position:n})}async remove(e){return i("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return i("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(ne)}async items(){return i("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(ne))}async get(e){return i("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?ne(n):null)}async popup(e,n){let r=null;return e&&(r={type:e instanceof d?"Physical":"Logical",data:e}),i("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:r})}},ie=class t extends E{constructor(e,n){super(e,n,"Menu")}static async new(e){return f("Menu",e).then(([n,r])=>new t(n,r))}static async default(){return i("plugin:menu|default").then(([e,n])=>new t(e,n))}async setAsAppMenu(){return i("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new t(e[0],e[1]):null)}async setAsWindowMenu(e){return i("plugin:menu|set_as_window_menu",{rid:this.rid,window:e?.label??null}).then(n=>n?new t(n[0],n[1]):null)}},R=class extends F{async text(){return i("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return i("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},z=class extends R{async isEnabled(){return i("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return i("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}},S=class extends z{async setAccelerator(e){return i("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},W=class t extends S{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},I=class t extends E{constructor(e,n){super(e,n,"Submenu")}static async new(e){return f("Submenu",e).then(([n,r])=>new t(n,r))}async setAsWindowsMenuForNSApp(){return i("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return i("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};ge(I,z);var U=class t extends R{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return f("MenuItem",e).then(([n,r])=>new t(n,r))}},H=class t extends S{constructor(e,n){super(e,n,"Check")}static async new(e){return f("Check",e).then(([n,r])=>new t(n,r))}async isChecked(){return i("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return i("plugin:menu|set_checked",{rid:this.rid,checked:e})}},V=class t extends S{constructor(e,n){super(e,n,"Icon")}static async new(e){return f("Icon",e).then(([n,r])=>new t(n,r))}async setIcon(e){return i("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return i("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}};return ve(mn);})(); window.__TAURI__ = __TAURI_IIFE__ diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index 874a8b9edf7..4df5217e51c 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -5,6 +5,7 @@ use std::{collections::HashMap, sync::Mutex}; use serde::{Deserialize, Serialize}; +use tauri_runtime::window::dpi::Position; use super::{sealed::ContextMenuBase, *}; use crate::{ @@ -12,7 +13,7 @@ use crate::{ ipc::Channel, plugin::{Builder, TauriPlugin}, resources::ResourceId, - AppHandle, IconDto, Manager, RunEvent, Runtime, State, + AppHandle, IconDto, Manager, RunEvent, Runtime, State, Window, }; use tauri_macros::do_menu_item; @@ -427,22 +428,26 @@ fn get( #[command(root = "crate")] fn popup( app: AppHandle, + current_window: Window, rid: ResourceId, kind: ItemKind, - window: String, - position: Option<(u32, u32)>, + window: Option, + at: Option, ) -> crate::Result<()> { - if let Some(window) = app.get_window(&window) { - let position = position.map(|p| crate::Position::Logical(p.into())); + let window = window + .map(|w| app.get_window(&w)) + .unwrap_or(Some(current_window)); + + if let Some(window) = window { let resources_table = app.manager.resources_table(); match kind { ItemKind::Menu => { let menu = resources_table.get::>(rid)?; - menu.popup_inner(window, position)?; + menu.popup_inner(window, at)?; } ItemKind::Submenu => { let submenu = resources_table.get::>(rid)?; - submenu.popup_inner(window, position)?; + submenu.popup_inner(window, at)?; } _ => unreachable!(), }; @@ -478,10 +483,15 @@ async fn set_as_app_menu( #[command(root = "crate")] async fn set_as_window_menu( app: AppHandle, + current_window: Window, rid: ResourceId, - window: String, + window: Option, ) -> crate::Result> { - if let Some(window) = app.get_window(&window) { + let window = window + .map(|w| app.get_window(&w)) + .unwrap_or(Some(current_window)); + + if let Some(window) = window { let mut resources_table = app.manager.resources_table(); let menu = resources_table.get::>(rid)?; if let Some(menu) = menu.set_as_window_menu(&window)? { diff --git a/examples/api/src/views/Menu.svelte b/examples/api/src/views/Menu.svelte index b810943a752..188dc3684e3 100644 --- a/examples/api/src/views/Menu.svelte +++ b/examples/api/src/views/Menu.svelte @@ -4,12 +4,20 @@ export let onMessage let items = [] + let menu = null async function create() { - const menu = await Menu.new({ + menu = await Menu.new({ items: items.map((i) => i.item) }) - await menu.setAsWindowMenu('main') + await menu.setAsWindowMenu() + } + + async function popup() { + if (!menu) { + await create() + } + menu.popup() } function onItemClick(event) { @@ -20,4 +28,5 @@
+
diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 67811a4c098..c7311289cc5 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -2,8 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +import { PhysicalPosition } from './dpi' +import type { LogicalPosition } from './dpi' import { Resource, applyMixins } from './internal' import { Channel, invoke } from './primitives' +import type { Window } from './window' /** * Menu types and utilities. @@ -358,19 +361,27 @@ class MenuBase extends MenuItemBase { }).then((r) => (r ? itemFromKind(r) : null)) } - // TODO change to logical position - // TODO use window type after migrating window back to core /** * Popup this menu as a context menu on the specified window. * * If the position, is provided, it is relative to the window's top-left corner. */ - async popup(window: string, position?: [number, number]): Promise { + async popup( + at?: PhysicalPosition | LogicalPosition, + window?: Window + ): Promise { + let atValue = null + if (at) { + atValue = { + type: at instanceof PhysicalPosition ? 'Physical' : 'Logical', + data: at + } + } return invoke('plugin:menu|popup', { rid: this.rid, kind: this.kind, - window, - position + window: window?.label ?? null, + at: atValue }) } } @@ -418,7 +429,6 @@ class Menu extends MenuBase { }).then((r) => (r ? new Menu(r[0], r[1]) : null)) } - // TODO use window type after migrating window back to core /** * Sets the window menu and returns the previous one. * @@ -427,10 +437,10 @@ class Menu extends MenuBase { * - **macOS:** Unsupported. The menu on macOS is app-wide and not specific to one * window, if you need to set it, use {@linkcode Menu.setAsAppMenu} instead. */ - async setAsWindowMenu(window: string): Promise { + async setAsWindowMenu(window?: Window): Promise { return invoke<[number, string] | null>('plugin:menu|set_as_window_menu', { rid: this.rid, - window + window: window?.label ?? null }).then((r) => (r ? new Menu(r[0], r[1]) : null)) } } From c235e6f3812dec4ee6d87ddaa5b871b2638e373f Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Thu, 26 Oct 2023 14:26:28 -0300 Subject: [PATCH 37/64] camelcase [skip ci] --- core/tauri/src/tray/mod.rs | 1 + examples/api/src-tauri/Cargo.lock | 100 ++++-------------------------- 2 files changed, 14 insertions(+), 87 deletions(-) diff --git a/core/tauri/src/tray/mod.rs b/core/tauri/src/tray/mod.rs index 5159f5c0c46..6a2cf22e850 100644 --- a/core/tauri/src/tray/mod.rs +++ b/core/tauri/src/tray/mod.rs @@ -54,6 +54,7 @@ impl Default for ClickType { /// - **Linux**: Unsupported. The event is not emmited even though the icon is shown, /// the icon will still show a context menu on right click. #[derive(Debug, Clone, Default, Serialize)] +#[serde(rename_all = "camelCase")] pub struct TrayIconEvent { /// Id of the tray icon which triggered this event. pub id: TrayIconId, diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index f23ef979aaf..a35b4452df6 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -3368,7 +3368,7 @@ dependencies = [ "url", "uuid", "windows 0.51.1", - "windows-implement 0.51.1", + "windows-implement", "x11-dl", "zbus", ] @@ -3436,9 +3436,9 @@ dependencies = [ "url", "uuid", "webkit2gtk", - "webview2-com 0.25.0", + "webview2-com", "window-vibrancy", - "windows 0.48.0", + "windows 0.51.1", ] [[package]] @@ -3535,7 +3535,7 @@ dependencies = [ "tauri-utils", "thiserror", "url", - "windows 0.48.0", + "windows 0.51.1", ] [[package]] @@ -3551,8 +3551,8 @@ dependencies = [ "tauri-runtime", "tauri-utils", "webkit2gtk", - "webview2-com 0.25.0", - "windows 0.48.0", + "webview2-com", + "windows 0.51.1", "wry", ] @@ -4199,19 +4199,6 @@ dependencies = [ "system-deps", ] -[[package]] -name = "webview2-com" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79e563ffe8e84d42e43ffacbace8780c0244fc8910346f334613559d92e203ad" -dependencies = [ - "webview2-com-macros", - "webview2-com-sys 0.25.0", - "windows 0.48.0", - "windows-implement 0.48.0", - "windows-interface 0.48.0", -] - [[package]] name = "webview2-com" version = "0.27.0" @@ -4219,11 +4206,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cd15556ff1d1d6bc850dbb362762bae86069773dd30177c90d3bfa917080dc73" dependencies = [ "webview2-com-macros", - "webview2-com-sys 0.27.0", + "webview2-com-sys", "windows 0.51.1", "windows-core", - "windows-implement 0.51.1", - "windows-interface 0.51.1", + "windows-implement", + "windows-interface", ] [[package]] @@ -4237,21 +4224,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "webview2-com-sys" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d39576804304cf9ead192467ef47f7859a1a12fec3bd459d5ba34b8cd65ed5" -dependencies = [ - "regex", - "serde", - "serde_json", - "thiserror", - "windows 0.48.0", - "windows-bindgen", - "windows-metadata", -] - [[package]] name = "webview2-com-sys" version = "0.27.0" @@ -4324,8 +4296,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-implement 0.48.0", - "windows-interface 0.48.0", "windows-targets 0.48.5", ] @@ -4336,21 +4306,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca229916c5ee38c2f2bc1e9d8f04df975b4bd93f9955dc69fabb5d91270045c9" dependencies = [ "windows-core", - "windows-implement 0.51.1", - "windows-interface 0.51.1", + "windows-implement", + "windows-interface", "windows-targets 0.48.5", ] -[[package]] -name = "windows-bindgen" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fe21a77bc54b7312dbd66f041605e098990c98be48cd52967b85b5e60e75ae6" -dependencies = [ - "windows-metadata", - "windows-tokens", -] - [[package]] name = "windows-core" version = "0.51.1" @@ -4360,17 +4320,6 @@ dependencies = [ "windows-targets 0.48.5", ] -[[package]] -name = "windows-implement" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2ee588991b9e7e6c8338edf3333fbe4da35dc72092643958ebb43f0ab2c49c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "windows-implement" version = "0.51.1" @@ -4382,17 +4331,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "windows-interface" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6fb8df20c9bcaa8ad6ab513f7b40104840c8867d5751126e4df3b08388d0cc7" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "windows-interface" version = "0.51.1" @@ -4404,12 +4342,6 @@ dependencies = [ "syn 2.0.38", ] -[[package]] -name = "windows-metadata" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422ee0e5f0e2cc372bb6addbfff9a8add712155cd743df9c15f6ab000f31432d" - [[package]] name = "windows-sys" version = "0.45.0" @@ -4458,12 +4390,6 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] -[[package]] -name = "windows-tokens" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34c9a3b28cb41db7385546f7f9a8179348dffc89923dde66857b1ba5312f6b4" - [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -4608,9 +4534,9 @@ dependencies = [ "url", "webkit2gtk", "webkit2gtk-sys", - "webview2-com 0.27.0", + "webview2-com", "windows 0.51.1", - "windows-implement 0.51.1", + "windows-implement", ] [[package]] From 21825484913b20ff1a2dfdf0659ef072283c851e Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Thu, 26 Oct 2023 14:42:21 -0300 Subject: [PATCH 38/64] popup freezes on macos :( gotta be async --- core/tauri/src/menu/plugin.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index 4df5217e51c..771396e9bf9 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -426,7 +426,7 @@ fn get( } #[command(root = "crate")] -fn popup( +async fn popup( app: AppHandle, current_window: Window, rid: ResourceId, From 0d32edf92325b358e2a9908c4cb4a975ff7b7153 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Thu, 26 Oct 2023 14:43:19 -0300 Subject: [PATCH 39/64] fix menu example on macos --- examples/api/dist/assets/index.js | 60 +++++++++++++++--------------- examples/api/src/views/Menu.svelte | 16 ++++++-- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 45cb1ea96e9..88196348384 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,9 +1,9 @@ -var wr=Object.defineProperty;var yr=(t,e,n)=>e in t?wr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var gt=(t,e,n)=>(yr(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const h of a.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function te(){}function tr(t){return t()}function Ss(){return Object.create(null)}function ke(t){t.forEach(tr)}function nr(t){return typeof t=="function"}function qe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Il;function vr(t,e){return t===e?!0:(Il||(Il=document.createElement("a")),Il.href=e,t===Il.href)}function kr(t){return Object.keys(t).length===0}function Cr(t,...e){if(t==null){for(const i of e)i(void 0);return te}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Sr(t,e,n){t.$$.on_destroy.push(Cr(e,n))}function l(t,e){t.appendChild(e)}function C(t,e,n){t.insertBefore(e,n||null)}function v(t){t.parentNode&&t.parentNode.removeChild(t)}function Je(t,e){for(let n=0;nt.removeEventListener(e,n,i)}function Ls(t){return function(e){return e.preventDefault(),t.call(this,e)}}function o(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function X(t){return t===""?null:+t}function Mr(t){return Array.from(t.childNodes)}function ie(t,e){e=""+e,t.data!==e&&(t.data=e)}function z(t,e){t.value=e??""}function lt(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function Qe(t,e,n){for(let i=0;i{const s=t.$$.callbacks[e];if(s){const a=Pr(e,n,{cancelable:i});return s.slice().forEach(h=>{h.call(t,a)}),!a.defaultPrevented}return!0}}const tn=[],On=[];let nn=[];const Mi=[],Er=Promise.resolve();let Pi=!1;function Or(){Pi||(Pi=!0,Er.then(rr))}function wt(t){nn.push(t)}function sr(t){Mi.push(t)}const Ci=new Set;let xt=0;function rr(){if(xt!==0)return;const t=En;do{try{for(;xtt.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),nn=e}const Fl=new Set;let zt;function Wr(){zt={r:0,c:[],p:zt}}function Dr(){zt.r||ke(zt.c),zt=zt.p}function sn(t,e){t&&t.i&&(Fl.delete(t),t.i(e))}function zn(t,e,n,i){if(t&&t.o){if(Fl.has(t))return;Fl.add(t),zt.c.push(()=>{Fl.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function de(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function ar(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function Tn(t){t&&t.c()}function rn(t,e,n){const{fragment:i,after_update:s}=t.$$;i&&i.m(e,n),wt(()=>{const a=t.$$.on_mount.map(tr).filter(nr);t.$$.on_destroy?t.$$.on_destroy.push(...a):ke(a),t.$$.on_mount=[]}),s.forEach(wt)}function an(t,e){const n=t.$$;n.fragment!==null&&(Tr(n.after_update),ke(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Rr(t,e){t.$$.dirty[0]===-1&&(tn.push(t),Or(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const W=y.length?y[0]:k;return d.ctx&&s(d.ctx[g],d.ctx[g]=W)&&(!d.skip_bound&&d.bound[g]&&d.bound[g](W),b&&Rr(t,g)),k}):[],d.update(),b=!0,ke(d.before_update),d.fragment=i?i(d.ctx):!1,e.target){if(e.hydrate){const g=Mr(e.target);d.fragment&&d.fragment.l(g),g.forEach(v)}else d.fragment&&d.fragment.c();e.intro&&sn(t.$$.fragment),rn(t,e.target,e.anchor),rr()}An(u)}class $e{constructor(){gt(this,"$$");gt(this,"$$set")}$destroy(){an(this,1),this.$destroy=te}$on(e,n){if(!nr(n))return te;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!kr(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Ir="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ir);const en=[];function Fr(t,e=te){let n;const i=new Set;function s(c){if(qe(t,c)&&(t=c,n)){const u=!en.length;for(const d of i)d[1](),en.push(d,t);if(u){for(let d=0;d{i.delete(d),i.size===0&&n&&(n(),n=null)}}return{set:s,update:a,subscribe:h}}function Wn(t,e,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:e.get(t)}function Nl(t,e,n,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(t,n):s?s.value=n:e.set(t,n),n}var Pn;function or(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}class ur{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,Pn.set(this,()=>{}),this.id=or(e=>{Wn(this,Pn,"f").call(this,e)})}set onmessage(e){Nl(this,Pn,e,"f")}get onmessage(){return Wn(this,Pn,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}Pn=new WeakMap;async function m(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}async function Hr(){return m("plugin:app|version")}async function Br(){return m("plugin:app|name")}async function Ur(){return m("plugin:app|tauri_version")}async function jr(){return m("plugin:app|app_show")}async function Nr(){return m("plugin:app|app_hide")}function Vr(t){let e,n,i,s,a,h,c,u,d,b,g,k,y,W,T,A,S,P,M,B,K,I,N,ne;return{c(){e=r("div"),n=r("p"),n.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 +var wr=Object.defineProperty;var yr=(t,e,n)=>e in t?wr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _t=(t,e,n)=>(yr(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))i(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const h of a.addedNodes)h.tagName==="LINK"&&h.rel==="modulepreload"&&i(h)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function te(){}function tr(t){return t()}function Ss(){return Object.create(null)}function ke(t){t.forEach(tr)}function nr(t){return typeof t=="function"}function qe(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Fl;function vr(t,e){return t===e?!0:(Fl||(Fl=document.createElement("a")),Fl.href=e,t===Fl.href)}function kr(t){return Object.keys(t).length===0}function Cr(t,...e){if(t==null){for(const i of e)i(void 0);return te}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Sr(t,e,n){t.$$.on_destroy.push(Cr(e,n))}function l(t,e){t.appendChild(e)}function C(t,e,n){t.insertBefore(e,n||null)}function k(t){t.parentNode&&t.parentNode.removeChild(t)}function Je(t,e){for(let n=0;nt.removeEventListener(e,n,i)}function Ls(t){return function(e){return e.preventDefault(),t.call(this,e)}}function o(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function X(t){return t===""?null:+t}function Mr(t){return Array.from(t.childNodes)}function ie(t,e){e=""+e,t.data!==e&&(t.data=e)}function z(t,e){t.value=e??""}function lt(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function Qe(t,e,n){for(let i=0;i{const s=t.$$.callbacks[e];if(s){const a=Pr(e,n,{cancelable:i});return s.slice().forEach(h=>{h.call(t,a)}),!a.defaultPrevented}return!0}}const tn=[],On=[];let nn=[];const Mi=[],Er=Promise.resolve();let Pi=!1;function Or(){Pi||(Pi=!0,Er.then(rr))}function wt(t){nn.push(t)}function sr(t){Mi.push(t)}const Ci=new Set;let xt=0;function rr(){if(xt!==0)return;const t=En;do{try{for(;xtt.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),nn=e}const Hl=new Set;let zt;function Wr(){zt={r:0,c:[],p:zt}}function Dr(){zt.r||ke(zt.c),zt=zt.p}function sn(t,e){t&&t.i&&(Hl.delete(t),t.i(e))}function zn(t,e,n,i){if(t&&t.o){if(Hl.has(t))return;Hl.add(t),zt.c.push(()=>{Hl.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function de(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function ar(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function Tn(t){t&&t.c()}function rn(t,e,n){const{fragment:i,after_update:s}=t.$$;i&&i.m(e,n),wt(()=>{const a=t.$$.on_mount.map(tr).filter(nr);t.$$.on_destroy?t.$$.on_destroy.push(...a):ke(a),t.$$.on_mount=[]}),s.forEach(wt)}function an(t,e){const n=t.$$;n.fragment!==null&&(Tr(n.after_update),ke(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Rr(t,e){t.$$.dirty[0]===-1&&(tn.push(t),Or(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const W=b.length?b[0]:v;return d.ctx&&s(d.ctx[_],d.ctx[_]=W)&&(!d.skip_bound&&d.bound[_]&&d.bound[_](W),y&&Rr(t,_)),v}):[],d.update(),y=!0,ke(d.before_update),d.fragment=i?i(d.ctx):!1,e.target){if(e.hydrate){const _=Mr(e.target);d.fragment&&d.fragment.l(_),_.forEach(k)}else d.fragment&&d.fragment.c();e.intro&&sn(t.$$.fragment),rn(t,e.target,e.anchor),rr()}An(u)}class $e{constructor(){_t(this,"$$");_t(this,"$$set")}$destroy(){an(this,1),this.$destroy=te}$on(e,n){if(!nr(n))return te;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!kr(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Ir="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ir);const en=[];function Fr(t,e=te){let n;const i=new Set;function s(c){if(qe(t,c)&&(t=c,n)){const u=!en.length;for(const d of i)d[1](),en.push(d,t);if(u){for(let d=0;d{i.delete(d),i.size===0&&n&&(n(),n=null)}}return{set:s,update:a,subscribe:h}}function Wn(t,e,n,i){if(n==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?i:n==="a"?i.call(t):i?i.value:e.get(t)}function Vl(t,e,n,i,s){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?s.call(t,n):s?s.value=n:e.set(t,n),n}var Pn;function or(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}class ur{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,Pn.set(this,()=>{}),this.id=or(e=>{Wn(this,Pn,"f").call(this,e)})}set onmessage(e){Vl(this,Pn,e,"f")}get onmessage(){return Wn(this,Pn,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}Pn=new WeakMap;async function m(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}async function Hr(){return m("plugin:app|version")}async function Br(){return m("plugin:app|name")}async function Ur(){return m("plugin:app|tauri_version")}async function jr(){return m("plugin:app|app_show")}async function Nr(){return m("plugin:app|app_hide")}function Vr(t){let e,n,i,s,a,h,c,u,d,y,_,v,b,W,T,A,S,P,M,B,K,I,N,ne;return{c(){e=r("div"),n=r("p"),n.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.`,i=p(),s=r("br"),a=p(),h=r("br"),c=p(),u=r("pre"),d=w(" App name: "),b=r("code"),g=w(t[2]),k=w(` - App version: `),y=r("code"),W=w(t[0]),T=w(` + tests.`,i=p(),s=r("br"),a=p(),h=r("br"),c=p(),u=r("pre"),d=w(" App name: "),y=r("code"),_=w(t[2]),v=w(` + App version: `),b=r("code"),W=w(t[0]),T=w(` Tauri version: `),A=r("code"),S=w(t[1]),P=w(` - `),M=p(),B=r("br"),K=p(),I=r("button"),I.textContent="Context menu",o(I,"class","btn")},m(U,Y){C(U,e,Y),l(e,n),l(e,i),l(e,s),l(e,a),l(e,h),l(e,c),l(e,u),l(u,d),l(u,b),l(b,g),l(u,k),l(u,y),l(y,W),l(u,T),l(u,A),l(A,S),l(u,P),l(e,M),l(e,B),l(e,K),l(e,I),N||(ne=L(I,"click",t[3]),N=!0)},p(U,[Y]){Y&4&&ie(g,U[2]),Y&1&&ie(W,U[0]),Y&2&&ie(S,U[1])},i:te,o:te,d(U){U&&v(e),N=!1,ne()}}}function qr(t,e,n){let i="1.0.0",s="1.0.0",a="Unknown";Br().then(c=>{n(2,a=c)}),Hr().then(c=>{n(0,i=c)}),Ur().then(c=>{n(1,s=c)});function h(){m("popup_context_menu")}return[i,s,a,h]}class Gr extends $e{constructor(e){super(),Ze(this,e,qr,Vr,qe,{})}}var Te;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"})(Te||(Te={}));async function cr(t,e){await m("plugin:event|unlisten",{event:t,eventId:e})}async function zi(t,e,n){return m("plugin:event|listen",{event:t,windowLabel:n==null?void 0:n.target,handler:or(e)}).then(i=>async()=>cr(t,i))}async function Kr(t,e,n){return zi(t,i=>{e(i),cr(t,i.id).catch(()=>{})},n)}async function dr(t,e,n){await m("plugin:event|emit",{event:t,windowLabel:n==null?void 0:n.target,payload:e})}function Xr(t){let e,n,i,s,a,h,c,u;return{c(){e=r("div"),n=r("button"),n.textContent="Call Log API",i=p(),s=r("button"),s.textContent="Call Request (async) API",a=p(),h=r("button"),h.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(h,"class","btn"),o(h,"id","event")},m(d,b){C(d,e,b),l(e,n),l(e,i),l(e,s),l(e,a),l(e,h),c||(u=[L(n,"click",t[0]),L(s,"click",t[1]),L(h,"click",t[2])],c=!0)},p:te,i:te,o:te,d(d){d&&v(e),c=!1,ke(u)}}}function Yr(t,e,n){let{onMessage:i}=e,s;jl(async()=>{s=await zi("rust-event",i)}),lr(()=>{s&&s()});function a(){m("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function h(){m("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function c(){dr("js-event","this is the payload string")}return t.$$set=u=>{"onMessage"in u&&n(3,i=u.onMessage)},[a,h,c,i]}class Qr extends $e{constructor(e){super(),Ze(this,e,Yr,Xr,qe,{onMessage:3})}}class Ai{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class ln{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new Ai(this.width/e,this.height/e)}}class Jr{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class bt{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new Jr(this.x/e,this.y/e)}}var Vl;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(Vl||(Vl={}));class Zr{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}}var ql;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(ql||(ql={}));function fr(){return new Dn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function Si(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new Dn(t.label,{skip:!0}))}const Ps=["tauri://created","tauri://error"];class Dn{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n!=null&&n.skip||m("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static getByLabel(e){return Si().some(n=>n.label===e)?new Dn(e,{skip:!0}):null}static getCurrent(){return fr()}static getAll(){return Si()}static async getFocusedWindow(){for(const e of Si())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)}):zi(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)}):Kr(e,n,{target:this.label})}async emit(e,n){if(Ps.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return dr(e,n,{target:this.label})}_handleTauriEvent(e,n){return Ps.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return m("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return m("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new bt(e,n))}async outerPosition(){return m("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new bt(e,n))}async innerSize(){return m("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new ln(e,n))}async outerSize(){return m("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new ln(e,n))}async isFullscreen(){return m("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return m("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return m("plugin:window|is_maximized",{label:this.label})}async isFocused(){return m("plugin:window|is_focused",{label:this.label})}async isDecorated(){return m("plugin:window|is_decorated",{label:this.label})}async isResizable(){return m("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return m("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return m("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return m("plugin:window|is_closable",{label:this.label})}async isVisible(){return m("plugin:window|is_visible",{label:this.label})}async title(){return m("plugin:window|title",{label:this.label})}async theme(){return m("plugin:window|theme",{label:this.label})}async center(){return m("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===Vl.Critical?n={type:"Critical"}:n={type:"Informational"}),m("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return m("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return m("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return m("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return m("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return m("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return m("plugin:window|maximize",{label:this.label})}async unmaximize(){return m("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return m("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return m("plugin:window|minimize",{label:this.label})}async unminimize(){return m("plugin:window|unminimize",{label:this.label})}async show(){return m("plugin:window|show",{label:this.label})}async hide(){return m("plugin:window|hide",{label:this.label})}async close(){return m("plugin:window|close",{label:this.label})}async setDecorations(e){return m("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return m("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return m("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return m("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return m("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return m("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return m("plugin:window|set_content_protected",{label:this.label,value: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 m("plugin:window|set_size",{label:this.label,value:{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 m("plugin:window|set_min_size",{label:this.label,value: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 m("plugin:window|set_max_size",{label:this.label,value: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 m("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return m("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return m("plugin:window|set_focus",{label:this.label})}async setIcon(e){return m("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return m("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return m("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return m("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return m("plugin:window|set_cursor_icon",{label:this.label,value: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 m("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return m("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return m("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return m("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(Te.WINDOW_RESIZED,n=>{n.payload=xr(n.payload),e(n)})}async onMoved(e){return this.listen(Te.WINDOW_MOVED,n=>{n.payload=$r(n.payload),e(n)})}async onCloseRequested(e){return this.listen(Te.WINDOW_CLOSE_REQUESTED,n=>{const i=new Zr(n);Promise.resolve(e(i)).then(()=>{if(!i.isPreventDefault())return this.close()})})}async onFocusChanged(e){const n=await this.listen(Te.WINDOW_FOCUS,s=>{e({...s,payload:!0})}),i=await this.listen(Te.WINDOW_BLUR,s=>{e({...s,payload:!1})});return()=>{n(),i()}}async onScaleChanged(e){return this.listen(Te.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(Te.WINDOW_FILE_DROP,a=>{e({...a,payload:{type:"drop",paths:a.payload}})}),i=await this.listen(Te.WINDOW_FILE_DROP_HOVER,a=>{e({...a,payload:{type:"hover",paths:a.payload}})}),s=await this.listen(Te.WINDOW_FILE_DROP_CANCELLED,a=>{e({...a,payload:{type:"cancel"}})});return()=>{n(),i(),s()}}async onThemeChanged(e){return this.listen(Te.WINDOW_THEME_CHANGED,e)}}var Gl;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(Gl||(Gl={}));var Kl;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(Kl||(Kl={}));function $r(t){return new bt(t.x,t.y)}function xr(t){return new ln(t.width,t.height)}function As(t,e,n){const i=t.slice();return i[105]=e[n],i}function Es(t,e,n){const i=t.slice();return i[108]=e[n],i}function Os(t,e,n){const i=t.slice();return i[111]=e[n],i}function zs(t,e,n){const i=t.slice();return i[114]=e[n],i}function Ts(t,e,n){const i=t.slice();return i[117]=e[n],i}function Ws(t){let e,n,i,s,a,h,c=de(Object.keys(t[1])),u=[];for(let d=0;dt[59].call(i))},m(d,b){C(d,e,b),C(d,n,b),C(d,i,b),l(i,s);for(let g=0;g{n(2,a=c)}),Hr().then(c=>{n(0,i=c)}),Ur().then(c=>{n(1,s=c)});function h(){m("popup_context_menu")}return[i,s,a,h]}class Gr extends $e{constructor(e){super(),Ze(this,e,qr,Vr,qe,{})}}var Te;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"})(Te||(Te={}));async function cr(t,e){await m("plugin:event|unlisten",{event:t,eventId:e})}async function zi(t,e,n){return m("plugin:event|listen",{event:t,windowLabel:n==null?void 0:n.target,handler:or(e)}).then(i=>async()=>cr(t,i))}async function Kr(t,e,n){return zi(t,i=>{e(i),cr(t,i.id).catch(()=>{})},n)}async function dr(t,e,n){await m("plugin:event|emit",{event:t,windowLabel:n==null?void 0:n.target,payload:e})}function Xr(t){let e,n,i,s,a,h,c,u;return{c(){e=r("div"),n=r("button"),n.textContent="Call Log API",i=p(),s=r("button"),s.textContent="Call Request (async) API",a=p(),h=r("button"),h.textContent="Send event to Rust",o(n,"class","btn"),o(n,"id","log"),o(s,"class","btn"),o(s,"id","request"),o(h,"class","btn"),o(h,"id","event")},m(d,y){C(d,e,y),l(e,n),l(e,i),l(e,s),l(e,a),l(e,h),c||(u=[L(n,"click",t[0]),L(s,"click",t[1]),L(h,"click",t[2])],c=!0)},p:te,i:te,o:te,d(d){d&&k(e),c=!1,ke(u)}}}function Yr(t,e,n){let{onMessage:i}=e,s;Nl(async()=>{s=await zi("rust-event",i)}),lr(()=>{s&&s()});function a(){m("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function h(){m("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function c(){dr("js-event","this is the payload string")}return t.$$set=u=>{"onMessage"in u&&n(3,i=u.onMessage)},[a,h,c,i]}class Qr extends $e{constructor(e){super(),Ze(this,e,Yr,Xr,qe,{onMessage:3})}}class Ai{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class ln{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new Ai(this.width/e,this.height/e)}}class Jr{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class bt{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new Jr(this.x/e,this.y/e)}}var ql;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(ql||(ql={}));class Zr{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}}var Gl;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(Gl||(Gl={}));function fr(){return new Dn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function Si(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new Dn(t.label,{skip:!0}))}const Ps=["tauri://created","tauri://error"];class Dn{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n!=null&&n.skip||m("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async i=>this.emit("tauri://error",i))}static getByLabel(e){return Si().some(n=>n.label===e)?new Dn(e,{skip:!0}):null}static getCurrent(){return fr()}static getAll(){return Si()}static async getFocusedWindow(){for(const e of Si())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)}):zi(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)}):Kr(e,n,{target:this.label})}async emit(e,n){if(Ps.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return dr(e,n,{target:this.label})}_handleTauriEvent(e,n){return Ps.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return m("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return m("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new bt(e,n))}async outerPosition(){return m("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new bt(e,n))}async innerSize(){return m("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new ln(e,n))}async outerSize(){return m("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new ln(e,n))}async isFullscreen(){return m("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return m("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return m("plugin:window|is_maximized",{label:this.label})}async isFocused(){return m("plugin:window|is_focused",{label:this.label})}async isDecorated(){return m("plugin:window|is_decorated",{label:this.label})}async isResizable(){return m("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return m("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return m("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return m("plugin:window|is_closable",{label:this.label})}async isVisible(){return m("plugin:window|is_visible",{label:this.label})}async title(){return m("plugin:window|title",{label:this.label})}async theme(){return m("plugin:window|theme",{label:this.label})}async center(){return m("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===ql.Critical?n={type:"Critical"}:n={type:"Informational"}),m("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return m("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return m("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return m("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return m("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return m("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return m("plugin:window|maximize",{label:this.label})}async unmaximize(){return m("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return m("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return m("plugin:window|minimize",{label:this.label})}async unminimize(){return m("plugin:window|unminimize",{label:this.label})}async show(){return m("plugin:window|show",{label:this.label})}async hide(){return m("plugin:window|hide",{label:this.label})}async close(){return m("plugin:window|close",{label:this.label})}async setDecorations(e){return m("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return m("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return m("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return m("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return m("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return m("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return m("plugin:window|set_content_protected",{label:this.label,value: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 m("plugin:window|set_size",{label:this.label,value:{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 m("plugin:window|set_min_size",{label:this.label,value: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 m("plugin:window|set_max_size",{label:this.label,value: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 m("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return m("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return m("plugin:window|set_focus",{label:this.label})}async setIcon(e){return m("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return m("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return m("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return m("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return m("plugin:window|set_cursor_icon",{label:this.label,value: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 m("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return m("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return m("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return m("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(Te.WINDOW_RESIZED,n=>{n.payload=xr(n.payload),e(n)})}async onMoved(e){return this.listen(Te.WINDOW_MOVED,n=>{n.payload=$r(n.payload),e(n)})}async onCloseRequested(e){return this.listen(Te.WINDOW_CLOSE_REQUESTED,n=>{const i=new Zr(n);Promise.resolve(e(i)).then(()=>{if(!i.isPreventDefault())return this.close()})})}async onFocusChanged(e){const n=await this.listen(Te.WINDOW_FOCUS,s=>{e({...s,payload:!0})}),i=await this.listen(Te.WINDOW_BLUR,s=>{e({...s,payload:!1})});return()=>{n(),i()}}async onScaleChanged(e){return this.listen(Te.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(Te.WINDOW_FILE_DROP,a=>{e({...a,payload:{type:"drop",paths:a.payload}})}),i=await this.listen(Te.WINDOW_FILE_DROP_HOVER,a=>{e({...a,payload:{type:"hover",paths:a.payload}})}),s=await this.listen(Te.WINDOW_FILE_DROP_CANCELLED,a=>{e({...a,payload:{type:"cancel"}})});return()=>{n(),i(),s()}}async onThemeChanged(e){return this.listen(Te.WINDOW_THEME_CHANGED,e)}}var Kl;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(Kl||(Kl={}));var Xl;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(Xl||(Xl={}));function $r(t){return new bt(t.x,t.y)}function xr(t){return new ln(t.width,t.height)}function As(t,e,n){const i=t.slice();return i[105]=e[n],i}function Es(t,e,n){const i=t.slice();return i[108]=e[n],i}function Os(t,e,n){const i=t.slice();return i[111]=e[n],i}function zs(t,e,n){const i=t.slice();return i[114]=e[n],i}function Ts(t,e,n){const i=t.slice();return i[117]=e[n],i}function Ws(t){let e,n,i,s,a,h,c=de(Object.keys(t[1])),u=[];for(let d=0;dt[59].call(i))},m(d,y){C(d,e,y),C(d,n,y),C(d,i,y),l(i,s);for(let _=0;_e in t?wr(t,e,{enumerable:!0,config `),se=r("input"),ee=p(),O=r("label"),J=w(`Has decorations `),F=r("input"),he=p(),Me=r("label"),we=w(`Always on top `),me=r("input"),We=p(),Pe=r("label"),De=w(`Always on bottom - `),_e=r("input"),ge=p(),Se=r("label"),Ae=w(`Content protected + `),ge=r("input"),_e=p(),Se=r("label"),Ae=w(`Content protected `),ce=r("input"),Le=p(),re=r("label"),Re=w(`Fullscreen - `),Ie=r("input"),Ee=p(),ae=r("br"),D=p(),x=r("div"),H=r("div"),Oe=r("div"),In=w(`X - `),Fe=r("input"),Fn=p(),Wt=r("div"),Hn=w(`Y - `),He=r("input"),Bn=p(),it=r("div"),Dt=r("div"),Un=w(`Width - `),Be=r("input"),jn=p(),Rt=r("div"),Nn=w(`Height - `),Ue=r("input"),Vn=p(),st=r("div"),It=r("div"),qn=w(`Min width - `),Ge=r("input"),Gn=p(),Ft=r("div"),Kn=w(`Min height - `),Ke=r("input"),Xn=p(),rt=r("div"),Ht=r("div"),Yn=w(`Max width - `),je=r("input"),Qn=p(),Bt=r("div"),Jn=w(`Max height - `),Ne=r("input"),un=p(),cn=r("br"),dn=p(),ze=r("div"),at=r("div"),Xe=r("div"),V=r("div"),V.textContent="Inner Size",fn=p(),yt=r("span"),hn=w("Width: "),Ut=w(vt),pn=p(),kt=r("span"),mn=w("Height: "),jt=w(Ct),_n=p(),Ve=r("div"),St=r("div"),St.textContent="Outer Size",gn=p(),Lt=r("span"),bn=w("Width: "),Nt=w(Mt),wn=p(),Pt=r("span"),yn=w("Height: "),Vt=w(At),Zn=p(),qt=r("div"),ot=r("div"),$n=r("div"),$n.textContent="Inner Logical Size",Di=p(),xn=r("span"),Ri=w("Width: "),Zl=w(el),Ii=p(),tl=r("span"),Fi=w("Height: "),$l=w(nl),Hi=p(),ut=r("div"),ll=r("div"),ll.textContent="Outer Logical Size",Bi=p(),il=r("span"),Ui=w("Width: "),xl=w(sl),ji=p(),rl=r("span"),Ni=w("Height: "),ei=w(al),Vi=p(),Gt=r("div"),ct=r("div"),ol=r("div"),ol.textContent="Inner Position",qi=p(),ul=r("span"),Gi=w("x: "),ti=w(cl),Ki=p(),dl=r("span"),Xi=w("y: "),ni=w(fl),Yi=p(),dt=r("div"),hl=r("div"),hl.textContent="Outer Position",Qi=p(),pl=r("span"),Ji=w("x: "),li=w(ml),Zi=p(),_l=r("span"),$i=w("y: "),ii=w(gl),xi=p(),Kt=r("div"),ft=r("div"),bl=r("div"),bl.textContent="Inner Logical Position",es=p(),wl=r("span"),ts=w("x: "),si=w(yl),ns=p(),vl=r("span"),ls=w("y: "),ri=w(kl),is=p(),ht=r("div"),Cl=r("div"),Cl.textContent="Outer Logical Position",ss=p(),Sl=r("span"),rs=w("x: "),ai=w(Ll),as=p(),Ml=r("span"),os=w("y: "),oi=w(Pl),ui=p(),ci=r("br"),di=p(),vn=r("h4"),vn.textContent="Cursor",fi=p(),xe=r("div"),Al=r("label"),Xt=r("input"),us=w(` - Grab`),cs=p(),El=r("label"),Yt=r("input"),ds=w(` - Visible`),fs=p(),Ol=r("label"),Qt=r("input"),hs=w(` - Ignore events`),hi=p(),et=r("div"),zl=r("label"),ps=w(`Icon - `),tt=r("select");for(let f=0;ft[83].call(tt)),o(pt,"class","input"),o(pt,"type","number"),o(mt,"class","input"),o(mt,"type","number"),o(et,"class","flex gap-2"),o(_t,"class","input grow"),o(_t,"id","title"),o(Cn,"class","btn"),o(Cn,"type","submit"),o(Et,"class","flex gap-1"),o(kn,"class","flex flex-col gap-1"),o(nt,"class","input"),t[26]===void 0&&wt(()=>t[87].call(nt)),o(Ye,"class","input"),o(Ye,"type","number"),o(Ye,"min","0"),o(Ye,"max","100"),o(Jt,"class","flex gap-2"),o(Sn,"class","flex flex-col gap-1")},m(f,_){C(f,e,_),C(f,n,_),C(f,i,_),l(i,s),l(i,a),l(i,h),l(h,c),z(c,t[43]),l(h,u),l(h,d),C(f,b,_),C(f,g,_),C(f,k,_),C(f,y,_),l(y,W),l(y,T),l(y,A),l(y,S),l(y,P),l(y,M),l(y,B),C(f,K,_),C(f,I,_),l(I,N),l(N,ne),l(N,U),U.checked=t[6],l(I,Y),l(I,le),l(le,E),l(le,R),R.checked=t[2],l(I,j),l(I,Q),l(Q,ue),l(Q,Z),Z.checked=t[3],l(I,be),l(I,Ce),l(Ce,fe),l(Ce,oe),oe.checked=t[4],l(I,$),l(I,pe),l(pe,G),l(pe,se),se.checked=t[5],l(I,ee),l(I,O),l(O,J),l(O,F),F.checked=t[7],l(I,he),l(I,Me),l(Me,we),l(Me,me),me.checked=t[8],l(I,We),l(I,Pe),l(Pe,De),l(Pe,_e),_e.checked=t[9],l(I,ge),l(I,Se),l(Se,Ae),l(Se,ce),ce.checked=t[10],l(I,Le),l(I,re),l(re,Re),l(re,Ie),Ie.checked=t[11],C(f,Ee,_),C(f,ae,_),C(f,D,_),C(f,x,_),l(x,H),l(H,Oe),l(Oe,In),l(Oe,Fe),z(Fe,t[18]),l(H,Fn),l(H,Wt),l(Wt,Hn),l(Wt,He),z(He,t[19]),l(x,Bn),l(x,it),l(it,Dt),l(Dt,Un),l(Dt,Be),z(Be,t[12]),l(it,jn),l(it,Rt),l(Rt,Nn),l(Rt,Ue),z(Ue,t[13]),l(x,Vn),l(x,st),l(st,It),l(It,qn),l(It,Ge),z(Ge,t[14]),l(st,Gn),l(st,Ft),l(Ft,Kn),l(Ft,Ke),z(Ke,t[15]),l(x,Xn),l(x,rt),l(rt,Ht),l(Ht,Yn),l(Ht,je),z(je,t[16]),l(rt,Qn),l(rt,Bt),l(Bt,Jn),l(Bt,Ne),z(Ne,t[17]),C(f,un,_),C(f,cn,_),C(f,dn,_),C(f,ze,_),l(ze,at),l(at,Xe),l(Xe,V),l(Xe,fn),l(Xe,yt),l(yt,hn),l(yt,Ut),l(Xe,pn),l(Xe,kt),l(kt,mn),l(kt,jt),l(at,_n),l(at,Ve),l(Ve,St),l(Ve,gn),l(Ve,Lt),l(Lt,bn),l(Lt,Nt),l(Ve,wn),l(Ve,Pt),l(Pt,yn),l(Pt,Vt),l(ze,Zn),l(ze,qt),l(qt,ot),l(ot,$n),l(ot,Di),l(ot,xn),l(xn,Ri),l(xn,Zl),l(ot,Ii),l(ot,tl),l(tl,Fi),l(tl,$l),l(qt,Hi),l(qt,ut),l(ut,ll),l(ut,Bi),l(ut,il),l(il,Ui),l(il,xl),l(ut,ji),l(ut,rl),l(rl,Ni),l(rl,ei),l(ze,Vi),l(ze,Gt),l(Gt,ct),l(ct,ol),l(ct,qi),l(ct,ul),l(ul,Gi),l(ul,ti),l(ct,Ki),l(ct,dl),l(dl,Xi),l(dl,ni),l(Gt,Yi),l(Gt,dt),l(dt,hl),l(dt,Qi),l(dt,pl),l(pl,Ji),l(pl,li),l(dt,Zi),l(dt,_l),l(_l,$i),l(_l,ii),l(ze,xi),l(ze,Kt),l(Kt,ft),l(ft,bl),l(ft,es),l(ft,wl),l(wl,ts),l(wl,si),l(ft,ns),l(ft,vl),l(vl,ls),l(vl,ri),l(Kt,is),l(Kt,ht),l(ht,Cl),l(ht,ss),l(ht,Sl),l(Sl,rs),l(Sl,ai),l(ht,as),l(ht,Ml),l(Ml,os),l(Ml,oi),C(f,ui,_),C(f,ci,_),C(f,di,_),C(f,vn,_),C(f,fi,_),C(f,xe,_),l(xe,Al),l(Al,Xt),Xt.checked=t[20],l(Al,us),l(xe,cs),l(xe,El),l(El,Yt),Yt.checked=t[21],l(El,ds),l(xe,fs),l(xe,Ol),l(Ol,Qt),Qt.checked=t[25],l(Ol,hs),C(f,hi,_),C(f,et,_),l(et,zl),l(zl,ps),l(zl,tt);for(let q=0;qt[83].call(tt)),o(pt,"class","input"),o(pt,"type","number"),o(mt,"class","input"),o(mt,"type","number"),o(et,"class","flex gap-2"),o(gt,"class","input grow"),o(gt,"id","title"),o(Cn,"class","btn"),o(Cn,"type","submit"),o(Et,"class","flex gap-1"),o(kn,"class","flex flex-col gap-1"),o(nt,"class","input"),t[26]===void 0&&wt(()=>t[87].call(nt)),o(Ye,"class","input"),o(Ye,"type","number"),o(Ye,"min","0"),o(Ye,"max","100"),o(Jt,"class","flex gap-2"),o(Sn,"class","flex flex-col gap-1")},m(f,g){C(f,e,g),C(f,n,g),C(f,i,g),l(i,s),l(i,a),l(i,h),l(h,c),z(c,t[43]),l(h,u),l(h,d),C(f,y,g),C(f,_,g),C(f,v,g),C(f,b,g),l(b,W),l(b,T),l(b,A),l(b,S),l(b,P),l(b,M),l(b,B),C(f,K,g),C(f,I,g),l(I,N),l(N,ne),l(N,U),U.checked=t[6],l(I,Y),l(I,le),l(le,E),l(le,R),R.checked=t[2],l(I,j),l(I,Q),l(Q,ue),l(Q,Z),Z.checked=t[3],l(I,be),l(I,Ce),l(Ce,fe),l(Ce,oe),oe.checked=t[4],l(I,$),l(I,pe),l(pe,G),l(pe,se),se.checked=t[5],l(I,ee),l(I,O),l(O,J),l(O,F),F.checked=t[7],l(I,he),l(I,Me),l(Me,we),l(Me,me),me.checked=t[8],l(I,We),l(I,Pe),l(Pe,De),l(Pe,ge),ge.checked=t[9],l(I,_e),l(I,Se),l(Se,Ae),l(Se,ce),ce.checked=t[10],l(I,Le),l(I,re),l(re,Re),l(re,Ie),Ie.checked=t[11],C(f,Ee,g),C(f,ae,g),C(f,D,g),C(f,x,g),l(x,H),l(H,Oe),l(Oe,Fn),l(Oe,Fe),z(Fe,t[18]),l(H,Hn),l(H,Wt),l(Wt,Bn),l(Wt,He),z(He,t[19]),l(x,Un),l(x,it),l(it,Dt),l(Dt,jn),l(Dt,Be),z(Be,t[12]),l(it,Nn),l(it,Rt),l(Rt,Vn),l(Rt,Ue),z(Ue,t[13]),l(x,qn),l(x,st),l(st,It),l(It,Gn),l(It,Ge),z(Ge,t[14]),l(st,Kn),l(st,Ft),l(Ft,Xn),l(Ft,Ke),z(Ke,t[15]),l(x,Yn),l(x,rt),l(rt,Ht),l(Ht,Qn),l(Ht,je),z(je,t[16]),l(rt,Jn),l(rt,Bt),l(Bt,Zn),l(Bt,Ne),z(Ne,t[17]),C(f,un,g),C(f,cn,g),C(f,dn,g),C(f,ze,g),l(ze,at),l(at,Xe),l(Xe,V),l(Xe,fn),l(Xe,yt),l(yt,hn),l(yt,Ut),l(Xe,pn),l(Xe,kt),l(kt,mn),l(kt,jt),l(at,gn),l(at,Ve),l(Ve,St),l(Ve,_n),l(Ve,Lt),l(Lt,bn),l(Lt,Nt),l(Ve,wn),l(Ve,Pt),l(Pt,yn),l(Pt,Vt),l(ze,$n),l(ze,qt),l(qt,ot),l(ot,xn),l(ot,Di),l(ot,el),l(el,Ri),l(el,Zl),l(ot,Ii),l(ot,nl),l(nl,Fi),l(nl,$l),l(qt,Hi),l(qt,ut),l(ut,il),l(ut,Bi),l(ut,sl),l(sl,Ui),l(sl,xl),l(ut,ji),l(ut,al),l(al,Ni),l(al,ei),l(ze,Vi),l(ze,Gt),l(Gt,ct),l(ct,ul),l(ct,qi),l(ct,cl),l(cl,Gi),l(cl,ti),l(ct,Ki),l(ct,fl),l(fl,Xi),l(fl,ni),l(Gt,Yi),l(Gt,dt),l(dt,pl),l(dt,Qi),l(dt,ml),l(ml,Ji),l(ml,li),l(dt,Zi),l(dt,_l),l(_l,$i),l(_l,ii),l(ze,xi),l(ze,Kt),l(Kt,ft),l(ft,wl),l(ft,es),l(ft,yl),l(yl,ts),l(yl,si),l(ft,ns),l(ft,kl),l(kl,ls),l(kl,ri),l(Kt,is),l(Kt,ht),l(ht,Sl),l(ht,ss),l(ht,Ll),l(Ll,rs),l(Ll,ai),l(ht,as),l(ht,Pl),l(Pl,os),l(Pl,oi),C(f,ui,g),C(f,ci,g),C(f,di,g),C(f,vn,g),C(f,fi,g),C(f,xe,g),l(xe,El),l(El,Xt),Xt.checked=t[20],l(El,us),l(xe,cs),l(xe,Ol),l(Ol,Yt),Yt.checked=t[21],l(Ol,ds),l(xe,fs),l(xe,zl),l(zl,Qt),Qt.checked=t[25],l(zl,hs),C(f,hi,g),C(f,et,g),l(et,Tl),l(Tl,ps),l(Tl,tt);for(let q=0;qt[89].call(a)),o(d,"class","input"),t[37]===void 0&&wt(()=>t[90].call(d)),o(y,"class","input"),o(y,"type","number"),o(n,"class","flex"),lt(M,"max-width","120px"),o(M,"class","input"),o(M,"type","number"),o(M,"placeholder","R"),lt(K,"max-width","120px"),o(K,"class","input"),o(K,"type","number"),o(K,"placeholder","G"),lt(N,"max-width","120px"),o(N,"class","input"),o(N,"type","number"),o(N,"placeholder","B"),lt(U,"max-width","120px"),o(U,"class","input"),o(U,"type","number"),o(U,"placeholder","A"),o(P,"class","flex"),o(T,"class","flex"),o(E,"class","btn"),lt(E,"width","80px"),o(le,"class","flex"),o(fe,"class","btn"),lt(fe,"width","80px"),o(j,"class","flex"),o(e,"class","flex flex-col gap-1")},m(O,J){C(O,e,J),l(e,n),l(n,i),l(i,s),l(i,a);for(let F=0;F=1,b,g,k,y=d&&Ws(t),W=t[1][t[0]]&&Rs(t);return{c(){e=r("div"),n=r("div"),i=r("input"),s=p(),a=r("button"),a.textContent="New window",h=p(),c=r("br"),u=p(),y&&y.c(),b=p(),W&&W.c(),o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","New Window label.."),o(a,"class","btn"),o(n,"class","flex gap-1"),o(e,"class","flex flex-col children:grow gap-2")},m(T,A){C(T,e,A),l(e,n),l(n,i),z(i,t[28]),l(n,s),l(n,a),l(e,h),l(e,c),l(e,u),y&&y.m(e,null),l(e,b),W&&W.m(e,null),g||(k=[L(i,"input",t[58]),L(a,"click",t[53])],g=!0)},p(T,A){A[0]&268435456&&i.value!==T[28]&&z(i,T[28]),A[0]&2&&(d=Object.keys(T[1]).length>=1),d?y?y.p(T,A):(y=Ws(T),y.c(),y.m(e,b)):y&&(y.d(1),y=null),T[1][T[0]]?W?W.p(T,A):(W=Rs(T),W.c(),W.m(e,null)):W&&(W.d(1),W=null)},i:te,o:te,d(T){T&&v(e),y&&y.d(),W&&W.d(),g=!1,ke(k)}}}function na(t,e,n){const i=fr();let s=i.label;const a={[i.label]:i},h=["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"],c=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],u=navigator.appVersion.includes("Windows"),d=navigator.appVersion.includes("Macintosh");let b=u?c:Object.keys(Gl).map(V=>Gl[V]).filter(V=>!c.includes(V));const g=Object.keys(Kl).map(V=>Kl[V]),k=Object.keys(ql).map(V=>ql[V]);let{onMessage:y}=e;const W=document.querySelector("main");let T,A=!0,S=!0,P=!0,M=!0,B=!1,K=!0,I=!1,N=!1,ne=!0,U=!1,Y=null,le=null,E=null,R=null,j=null,Q=null,ue=null,Z=null,be=1,Ce=new bt(ue,Z),fe=new bt(ue,Z),oe=new ln(Y,le),$=new ln(Y,le),pe,G,se=!1,ee=!0,O=null,J=null,F="default",he=!1,Me="Awesome Tauri Example!",we=[],me,We,Pe,De,_e,ge,Se,Ae="none",ce=0,Le;function re(){a[s].setTitle(Me)}function Re(){a[s].hide(),setTimeout(a[s].show,2e3)}function Ie(){a[s].minimize(),setTimeout(a[s].unminimize,2e3)}function Ee(){if(!T)return;const V=new Dn(T);n(1,a[T]=V,a),V.once("tauri://error",function(){y("Error creating new webview")})}function ae(){a[s].innerSize().then(V=>{n(32,oe=V),n(12,Y=oe.width),n(13,le=oe.height)}),a[s].outerSize().then(V=>{n(33,$=V)})}function D(){a[s].innerPosition().then(V=>{n(30,Ce=V)}),a[s].outerPosition().then(V=>{n(31,fe=V),n(18,ue=fe.x),n(19,Z=fe.y)})}async function x(V){V&&(pe&&pe(),G&&G(),G=await V.listen("tauri://move",D),pe=await V.listen("tauri://resize",ae))}async function H(){await a[s].minimize(),await a[s].requestUserAttention(Vl.Critical),await new Promise(V=>setTimeout(V,3e3)),await a[s].requestUserAttention(null)}async function Oe(){we.includes(me)||n(35,we=[...we,me]);const V={effects:we,state:We,radius:Pe};Number.isInteger(De)&&Number.isInteger(_e)&&Number.isInteger(ge)&&Number.isInteger(Se)&&(V.color=[De,_e,ge,Se]),W.classList.remove("bg-primary"),W.classList.remove("dark:bg-darkPrimary"),await a[s].clearEffects(),await a[s].setEffects(V)}async function In(){n(35,we=[]),await a[s].clearEffects(),W.classList.add("bg-primary"),W.classList.add("dark:bg-darkPrimary")}function Fe(){T=this.value,n(28,T)}function Fn(){s=Mn(this),n(0,s),n(1,a)}function Wt(){Le=this.value,n(43,Le)}const Hn=()=>a[s].center();function He(){B=this.checked,n(6,B)}function Bn(){A=this.checked,n(2,A)}function it(){S=this.checked,n(3,S)}function Dt(){P=this.checked,n(4,P)}function Un(){M=this.checked,n(5,M)}function Be(){K=this.checked,n(7,K)}function jn(){I=this.checked,n(8,I)}function Rt(){N=this.checked,n(9,N)}function Nn(){ne=this.checked,n(10,ne)}function Ue(){U=this.checked,n(11,U)}function Vn(){ue=X(this.value),n(18,ue)}function st(){Z=X(this.value),n(19,Z)}function It(){Y=X(this.value),n(12,Y)}function qn(){le=X(this.value),n(13,le)}function Ge(){E=X(this.value),n(14,E)}function Gn(){R=X(this.value),n(15,R)}function Ft(){j=X(this.value),n(16,j)}function Kn(){Q=X(this.value),n(17,Q)}function Ke(){se=this.checked,n(20,se)}function Xn(){ee=this.checked,n(21,ee)}function rt(){he=this.checked,n(25,he)}function Ht(){F=Mn(this),n(24,F),n(44,h)}function Yn(){O=X(this.value),n(22,O)}function je(){J=X(this.value),n(23,J)}function Qn(){Me=this.value,n(34,Me)}function Bt(){Ae=Mn(this),n(26,Ae),n(49,k)}function Jn(){ce=X(this.value),n(27,ce)}function Ne(){me=Mn(this),n(36,me),n(47,b)}function un(){We=Mn(this),n(37,We),n(48,g)}function cn(){Pe=X(this.value),n(38,Pe)}function dn(){De=X(this.value),n(39,De)}function ze(){_e=X(this.value),n(40,_e)}function at(){ge=X(this.value),n(41,ge)}function Xe(){Se=X(this.value),n(42,Se)}return t.$$set=V=>{"onMessage"in V&&n(57,y=V.onMessage)},t.$$.update=()=>{var V,fn,yt,hn,vt,Ut,pn,kt,mn,Ct,jt,_n,Ve,St,gn,Lt,bn,Mt,Nt,wn,Pt,yn,At,Vt;t.$$.dirty[0]&3&&(a[s],D(),ae()),t.$$.dirty[0]&7&&((V=a[s])==null||V.setResizable(A)),t.$$.dirty[0]&11&&((fn=a[s])==null||fn.setMaximizable(S)),t.$$.dirty[0]&19&&((yt=a[s])==null||yt.setMinimizable(P)),t.$$.dirty[0]&35&&((hn=a[s])==null||hn.setClosable(M)),t.$$.dirty[0]&67&&(B?(vt=a[s])==null||vt.maximize():(Ut=a[s])==null||Ut.unmaximize()),t.$$.dirty[0]&131&&((pn=a[s])==null||pn.setDecorations(K)),t.$$.dirty[0]&259&&((kt=a[s])==null||kt.setAlwaysOnTop(I)),t.$$.dirty[0]&515&&((mn=a[s])==null||mn.setAlwaysOnBottom(N)),t.$$.dirty[0]&1027&&((Ct=a[s])==null||Ct.setContentProtected(ne)),t.$$.dirty[0]&2051&&((jt=a[s])==null||jt.setFullscreen(U)),t.$$.dirty[0]&12291&&Y&&le&&((_n=a[s])==null||_n.setSize(new ln(Y,le))),t.$$.dirty[0]&49155&&(E&&R?(Ve=a[s])==null||Ve.setMinSize(new Ai(E,R)):(St=a[s])==null||St.setMinSize(null)),t.$$.dirty[0]&196611&&(j>800&&Q>400?(gn=a[s])==null||gn.setMaxSize(new Ai(j,Q)):(Lt=a[s])==null||Lt.setMaxSize(null)),t.$$.dirty[0]&786435&&ue!==null&&Z!==null&&((bn=a[s])==null||bn.setPosition(new bt(ue,Z))),t.$$.dirty[0]&3&&((Mt=a[s])==null||Mt.scaleFactor().then(Zn=>n(29,be=Zn))),t.$$.dirty[0]&3&&x(a[s]),t.$$.dirty[0]&1048579&&((Nt=a[s])==null||Nt.setCursorGrab(se)),t.$$.dirty[0]&2097155&&((wn=a[s])==null||wn.setCursorVisible(ee)),t.$$.dirty[0]&16777219&&((Pt=a[s])==null||Pt.setCursorIcon(F)),t.$$.dirty[0]&12582915&&O!==null&&J!==null&&((yn=a[s])==null||yn.setCursorPosition(new bt(O,J))),t.$$.dirty[0]&33554435&&((At=a[s])==null||At.setIgnoreCursorEvents(he)),t.$$.dirty[0]&201326595&&((Vt=a[s])==null||Vt.setProgressBar({status:Ae,progress:ce}))},[s,a,A,S,P,M,B,K,I,N,ne,U,Y,le,E,R,j,Q,ue,Z,se,ee,O,J,F,he,Ae,ce,T,be,Ce,fe,oe,$,Me,we,me,We,Pe,De,_e,ge,Se,Le,h,u,d,b,g,k,re,Re,Ie,Ee,H,Oe,In,y,Fe,Fn,Wt,Hn,He,Bn,it,Dt,Un,Be,jn,Rt,Nn,Ue,Vn,st,It,qn,Ge,Gn,Ft,Kn,Ke,Xn,rt,Ht,Yn,je,Qn,Bt,Jn,Ne,un,cn,dn,ze,at,Xe]}class la extends $e{constructor(e){super(),Ze(this,e,na,ta,qe,{onMessage:57},null,[-1,-1,-1,-1])}}function ia(t){let e;return{c(){e=r("div"),e.innerHTML='
Not available for Linux
',o(e,"class","flex flex-col gap-2")},m(n,i){C(n,e,i)},p:te,i:te,o:te,d(n){n&&v(e)}}}function sa(t,e,n){let{onMessage:i}=e;const s=window.constraints={audio:!0,video:!0};function a(c){const u=document.querySelector("video"),d=c.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${d[0].label}`),window.stream=c,u.srcObject=c}function h(c){if(c.name==="ConstraintNotSatisfiedError"){const u=s.video;i(`The resolution ${u.width.exact}x${u.height.exact} px is not supported by your device.`)}else c.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: ${c.name}`,c)}return jl(async()=>{try{const c=await navigator.mediaDevices.getUserMedia(s);a(c)}catch(c){h(c)}}),lr(()=>{window.stream.getTracks().forEach(function(c){c.stop()})}),t.$$set=c=>{"onMessage"in c&&n(0,i=c.onMessage)},[i]}class ra extends $e{constructor(e){super(),Ze(this,e,sa,ia,qe,{onMessage:0})}}function aa(t){let e,n,i,s,a,h;return{c(){e=r("div"),n=r("button"),n.textContent="Show",i=p(),s=r("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(c,u){C(c,e,u),l(e,n),l(e,i),l(e,s),a||(h=[L(n,"click",t[0]),L(s,"click",t[1])],a=!0)},p:te,i:te,o:te,d(c){c&&v(e),a=!1,ke(h)}}}function oa(t,e,n){let{onMessage:i}=e;function s(){a().then(()=>{setTimeout(()=>{jr().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function a(){return Nr().then(()=>i("Hide app")).catch(i)}return t.$$set=h=>{"onMessage"in h&&n(2,i=h.onMessage)},[s,a,i]}class ua extends $e{constructor(e){super(),Ze(this,e,oa,aa,qe,{onMessage:2})}}var Hl;class hr{get rid(){return Wn(this,Hl,"f")}constructor(e){Hl.set(this,void 0),Nl(this,Hl,e,"f")}async close(){return m("plugin:resources|close",{rid:this.rid})}}Hl=new WeakMap;function ca(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{Object.defineProperty(t.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i)??Object.create(null))})})}var Bl,Ul,Us;(function(t){t.Add="Add",t.Advanced="Advanced",t.Bluetooth="Bluetooth",t.Bookmarks="Bookmarks",t.Caution="Caution",t.ColorPanel="ColorPanel",t.ColumnView="ColumnView",t.Computer="Computer",t.EnterFullScreen="EnterFullScreen",t.Everyone="Everyone",t.ExitFullScreen="ExitFullScreen",t.FlowView="FlowView",t.Folder="Folder",t.FolderBurnable="FolderBurnable",t.FolderSmart="FolderSmart",t.FollowLinkFreestanding="FollowLinkFreestanding",t.FontPanel="FontPanel",t.GoLeft="GoLeft",t.GoRight="GoRight",t.Home="Home",t.IChatTheater="IChatTheater",t.IconView="IconView",t.Info="Info",t.InvalidDataFreestanding="InvalidDataFreestanding",t.LeftFacingTriangle="LeftFacingTriangle",t.ListView="ListView",t.LockLocked="LockLocked",t.LockUnlocked="LockUnlocked",t.MenuMixedState="MenuMixedState",t.MenuOnState="MenuOnState",t.MobileMe="MobileMe",t.MultipleDocuments="MultipleDocuments",t.Network="Network",t.Path="Path",t.PreferencesGeneral="PreferencesGeneral",t.QuickLook="QuickLook",t.RefreshFreestanding="RefreshFreestanding",t.Refresh="Refresh",t.Remove="Remove",t.RevealFreestanding="RevealFreestanding",t.RightFacingTriangle="RightFacingTriangle",t.Share="Share",t.Slideshow="Slideshow",t.SmartBadge="SmartBadge",t.StatusAvailable="StatusAvailable",t.StatusNone="StatusNone",t.StatusPartiallyAvailable="StatusPartiallyAvailable",t.StatusUnavailable="StatusUnavailable",t.StopProgressFreestanding="StopProgressFreestanding",t.StopProgress="StopProgress",t.TrashEmpty="TrashEmpty",t.TrashFull="TrashFull",t.User="User",t.UserAccounts="UserAccounts",t.UserGroup="UserGroup",t.UserGuest="UserGuest"})(Us||(Us={}));function Li([t,e,n]){switch(n){case"Submenu":return new Yl(t,e);case"Predefined":return new Ql(t,e);case"Check":return new Rn(t,e);case"Icon":return new Jl(t,e);case"MenuItem":default:return new Xl(t,e)}}async function on(t,e){const n=new ur;let i=null;return e&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&e.items&&(i=e.items.map(s=>[s.rid,s.kind]))),m("plugin:menu|new",{kind:t,options:e?{...e,items:i}:void 0,handler:n})}class pr extends hr{get id(){return Wn(this,Bl,"f")}get kind(){return Wn(this,Ul,"f")}constructor(e,n,i){super(e),Bl.set(this,void 0),Ul.set(this,void 0),Nl(this,Bl,n,"f"),Nl(this,Ul,i,"f")}}Bl=new WeakMap,Ul=new WeakMap;class mr extends pr{async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(i=>[i.rid,i.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(Li)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(Li))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?Li(n):null)}async popup(e,n){let i=null;return e&&(i={type:e instanceof bt?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:i})}}class Tt extends mr{constructor(e,n){super(e,n,"Menu")}static async new(e){return on("Menu",e).then(([n,i])=>new Tt(n,i))}static async default(){return m("plugin:menu|default").then(([e,n])=>new Tt(e,n))}async setAsAppMenu(){return m("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new Tt(e[0],e[1]):null)}async setAsWindowMenu(e){return m("plugin:menu|set_as_window_menu",{rid:this.rid,window:(e==null?void 0:e.label)??null}).then(n=>n?new Tt(n[0],n[1]):null)}}class _r extends pr{async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}}class gr extends _r{async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}}class Ti extends gr{async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}}class Xl extends Ti{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return on("MenuItem",e).then(([n,i])=>new Xl(n,i))}}class Yl extends mr{constructor(e,n){super(e,n,"Submenu")}static async new(e){return on("Submenu",e).then(([n,i])=>new Yl(n,i))}async setAsWindowsMenuForNSApp(){return m("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return m("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}}ca(Yl,gr);class Ql extends _r{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return on("MenuItem",e).then(([n,i])=>new Ql(n,i))}}class Rn extends Ti{constructor(e,n){super(e,n,"Check")}static async new(e){return on("Check",e).then(([n,i])=>new Rn(n,i))}async isChecked(){return m("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return m("plugin:menu|set_checked",{rid:this.rid,checked:e})}}class Jl extends Ti{constructor(e,n){super(e,n,"Icon")}static async new(e){return on("Icon",e).then(([n,i])=>new Jl(n,i))}async setIcon(e){return m("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return m("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}}function js(t,e,n){const i=t.slice();return i[14]=e[n],i[15]=e,i[16]=n,i}function Ns(t,e,n){const i=t.slice();return i[17]=e[n],i[18]=e,i[19]=n,i}function Vs(t){let e,n,i,s,a=t[17]+"",h,c,u,d;function b(){t[8].call(n,t[18],t[19])}return{c(){e=r("label"),n=r("input"),s=p(),h=w(a),c=p(),n.checked=i=t[0]===t[17],o(n,"type","radio"),o(n,"name","kind")},m(g,k){C(g,e,k),l(e,n),z(n,t[17]),l(e,s),l(e,h),l(e,c),u||(d=[L(n,"change",t[5]),L(n,"change",b)],u=!0)},p(g,k){t=g,k&9&&i!==(i=t[0]===t[17])&&(n.checked=i),k&8&&z(n,t[17]),k&8&&a!==(a=t[17]+"")&&ie(h,a)},d(g){g&&v(e),u=!1,ke(d)}}}function qs(t){let e,n,i;return{c(){e=r("input"),o(e,"class","input grow"),o(e,"type","text"),o(e,"placeholder","Text")},m(s,a){C(s,e,a),z(e,t[1]),n||(i=L(e,"input",t[9]),n=!0)},p(s,a){a&2&&e.value!==s[1]&&z(e,s[1])},d(s){s&&v(e),n=!1,i()}}}function da(t){let e,n=de(t[4]),i=[];for(let s=0;si("itemClick",{id:B,text:M})},P=await Xl.new(S);break;case"Icon":S={text:a,icon:h,action:B=>i("itemClick",{id:B,text:M})},P=await Jl.new(S);break;case"Check":S={text:a,action:B=>i("itemClick",{id:B,text:M})},P=await Rn.new(S);break;case"Predefined":S={item:c},P=await Ql.new(S);break}i("new",{item:P,options:S}),n(1,a=""),c=""}function y(S,P){S[P]=this.value,n(3,u)}function W(){a=this.value,n(1,a)}function T(){h=this.value,n(2,h)}function A(S,P){S[P]=this.value,n(4,d)}return[s,a,h,u,d,b,g,k,y,W,T,A]}class ma extends $e{constructor(e){super(),Ze(this,e,pa,ha,qe,{})}}function Ks(t,e,n){const i=t.slice();return i[5]=e[n],i}function Xs(t){let e,n,i,s,a,h=Ys(t[5])+"",c,u;return{c(){e=r("div"),n=r("div"),s=p(),a=r("p"),c=w(h),u=p(),o(n,"class",i=t[3](t[5])),o(e,"class","flex flex-row gap-1")},m(d,b){C(d,e,b),l(e,n),l(e,s),l(e,a),l(a,c),l(e,u)},p(d,b){b&1&&i!==(i=d[3](d[5]))&&o(n,"class",i),b&1&&h!==(h=Ys(d[5])+"")&&ie(c,h)},d(d){d&&v(e)}}}function _a(t){let e,n,i,s,a;n=new ma({}),n.$on("new",t[1]),n.$on("itemClick",t[2]);let h=de(t[0]),c=[];for(let u=0;u{"items"in u&&n(0,i=u.items)},[i,a,h,c]}class br extends $e{constructor(e){super(),Ze(this,e,ga,_a,qe,{items:0})}}function ba(t){let e,n,i,s,a,h,c,u,d,b;function g(y){t[5](y)}let k={};return t[0]!==void 0&&(k.items=t[0]),n=new br({props:k}),On.push(()=>ar(n,"items",g)),n.$on("itemClick",t[3]),{c(){e=r("div"),Tn(n.$$.fragment),s=p(),a=r("button"),a.textContent="Create menu",h=p(),c=r("button"),c.textContent="Popup",o(a,"class","btn"),o(c,"class","btn")},m(y,W){C(y,e,W),rn(n,e,null),l(e,s),l(e,a),l(e,h),l(e,c),u=!0,d||(b=[L(a,"click",t[1]),L(c,"click",t[2])],d=!0)},p(y,[W]){const T={};!i&&W&1&&(i=!0,T.items=y[0],sr(()=>i=!1)),n.$set(T)},i(y){u||(sn(n.$$.fragment,y),u=!0)},o(y){zn(n.$$.fragment,y),u=!1},d(y){y&&v(e),an(n),d=!1,ke(b)}}}function wa(t,e,n){let{onMessage:i}=e,s=[],a=null;async function h(){a=await Tt.new({items:s.map(b=>b.item)}),await a.setAsWindowMenu()}async function c(){a||await h(),a.popup()}function u(b){i(`Item ${b.detail.text} clicked`)}function d(b){s=b,n(0,s)}return t.$$set=b=>{"onMessage"in b&&n(4,i=b.onMessage)},[s,h,c,u,i,d]}class ya extends $e{constructor(e){super(),Ze(this,e,wa,ba,qe,{onMessage:4})}}class Wi extends hr{constructor(e,n){super(e),this.id=n}static async new(e){e!=null&&e.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e!=null&&e.icon&&(e.icon=typeof e.icon=="string"?e.icon:Array.from(e.icon));const n=new ur;return e!=null&&e.action&&(n.onmessage=e.action,delete e.action),m("plugin:tray|new",{options:e??{},handler:n}).then(([i,s])=>new Wi(i,s))}async setIcon(e){let n=null;return e&&(n=typeof e=="string"?e:Array.from(e)),m("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),m("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return m("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return m("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return m("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return m("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return m("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return m("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}function va(t){let e,n,i,s,a,h,c,u,d,b,g,k,y,W,T,A,S,P,M,B,K,I,N,ne,U,Y;function le(R){t[14](R)}let E={};return t[5]!==void 0&&(E.items=t[5]),M=new br({props:E}),On.push(()=>ar(M,"items",le)),M.$on("itemClick",t[6]),{c(){e=r("div"),n=r("div"),i=r("input"),s=p(),a=r("input"),h=p(),c=r("label"),u=w(`Menu on left click - `),d=r("input"),b=p(),g=r("div"),k=r("input"),y=p(),W=r("label"),T=w(`Icon as template - `),A=r("input"),S=p(),P=r("div"),Tn(M.$$.fragment),K=p(),I=r("div"),N=r("button"),N.textContent="Create tray",o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","Title"),o(a,"class","input grow"),o(a,"type","text"),o(a,"placeholder","Tooltip"),o(d,"type","checkbox"),o(n,"class","flex gap-1"),o(k,"class","input grow"),o(k,"type","text"),o(k,"placeholder","Icon path"),o(A,"type","checkbox"),o(g,"class","flex gap-1"),o(P,"class","flex children:grow"),o(N,"class","btn"),o(N,"title","Creates the tray icon"),o(I,"class","flex"),o(e,"class","flex flex-col children:grow gap-2")},m(R,j){C(R,e,j),l(e,n),l(n,i),z(i,t[2]),l(n,s),l(n,a),z(a,t[1]),l(n,h),l(n,c),l(c,u),l(c,d),d.checked=t[4],l(e,b),l(e,g),l(g,k),z(k,t[0]),l(g,y),l(g,W),l(W,T),l(W,A),A.checked=t[3],l(e,S),l(e,P),rn(M,P,null),l(e,K),l(e,I),l(I,N),ne=!0,U||(Y=[L(i,"input",t[9]),L(a,"input",t[10]),L(d,"change",t[11]),L(k,"input",t[12]),L(A,"change",t[13]),L(N,"click",t[7])],U=!0)},p(R,[j]){j&4&&i.value!==R[2]&&z(i,R[2]),j&2&&a.value!==R[1]&&z(a,R[1]),j&16&&(d.checked=R[4]),j&1&&k.value!==R[0]&&z(k,R[0]),j&8&&(A.checked=R[3]);const Q={};!B&&j&32&&(B=!0,Q.items=R[5],sr(()=>B=!1)),M.$set(Q)},i(R){ne||(sn(M.$$.fragment,R),ne=!0)},o(R){zn(M.$$.fragment,R),ne=!1},d(R){R&&v(e),an(M),U=!1,ke(Y)}}}function ka(t,e,n){let{onMessage:i}=e,s=null,a=null,h=null,c=!1,u=!0,d=[];function b(P){i(`Item ${P.detail.text} clicked`)}async function g(){Wi.new({icon:s,tooltip:a,title:h,iconAsTemplate:c,menuOnLeftClick:u,menu:await Tt.new({items:d.map(P=>P.item)}),action:P=>i(P)}).catch(i)}function k(){h=this.value,n(2,h)}function y(){a=this.value,n(1,a)}function W(){u=this.checked,n(4,u)}function T(){s=this.value,n(0,s)}function A(){c=this.checked,n(3,c)}function S(P){d=P,n(5,d)}return t.$$set=P=>{"onMessage"in P&&n(8,i=P.onMessage)},[s,a,h,c,u,d,b,g,i,k,y,W,T,A,S]}class Ca extends $e{constructor(e){super(),Ze(this,e,ka,va,qe,{onMessage:8})}}function Qs(t,e,n){const i=t.slice();return i[25]=e[n],i}function Js(t,e,n){const i=t.slice();return i[28]=e[n],i}function Sa(t){let e;return{c(){e=r("span"),o(e,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){C(n,e,i)},d(n){n&&v(e)}}}function La(t){let e;return{c(){e=r("span"),o(e,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){C(n,e,i)},d(n){n&&v(e)}}}function Ma(t){let e,n;return{c(){e=w(`Switch to Dark mode - `),n=r("div"),o(n,"class","i-ph-moon")},m(i,s){C(i,e,s),C(i,n,s)},d(i){i&&(v(e),v(n))}}}function Pa(t){let e,n;return{c(){e=w(`Switch to Light mode - `),n=r("div"),o(n,"class","i-ph-sun")},m(i,s){C(i,e,s),C(i,n,s)},d(i){i&&(v(e),v(n))}}}function Aa(t){let e,n,i,s,a,h,c;function u(){return t[14](t[28])}return{c(){e=r("a"),n=r("div"),i=p(),s=r("p"),s.textContent=`${t[28].label}`,o(n,"class",t[28].icon+" mr-2"),o(e,"href","##"),o(e,"class",a="nv "+(t[1]===t[28]?"nv_selected":""))},m(d,b){C(d,e,b),l(e,n),l(e,i),l(e,s),h||(c=L(e,"click",u),h=!0)},p(d,b){t=d,b&2&&a!==(a="nv "+(t[1]===t[28]?"nv_selected":""))&&o(e,"class",a)},d(d){d&&v(e),h=!1,c()}}}function Zs(t){let e,n=t[28]&&Aa(t);return{c(){n&&n.c(),e=Ei()},m(i,s){n&&n.m(i,s),C(i,e,s)},p(i,s){i[28]&&n.p(i,s)},d(i){i&&v(e),n&&n.d(i)}}}function $s(t){let e,n=t[25].html+"",i;return{c(){e=new Ar(!1),i=Ei(),e.a=i},m(s,a){e.m(n,s,a),C(s,i,a)},p(s,a){a&16&&n!==(n=s[25].html+"")&&e.p(n)},d(s){s&&(v(i),e.d())}}}function Ea(t){let e,n,i,s,a,h,c,u,d,b,g,k,y,W,T,A,S,P,M,B,K,I,N,ne,U,Y,le,E,R,j,Q,ue,Z=t[1].label+"",be,Ce,fe,oe,$,pe,G,se,ee,O,J,F,he,Me,we,me,We,Pe;function De(D,x){return D[0]?La:Sa}let _e=De(t),ge=_e(t);function Se(D,x){return D[2]?Pa:Ma}let Ae=Se(t),ce=Ae(t),Le=de(t[5]),re=[];for(let D=0;Dt[89].call(a)),o(d,"class","input"),t[37]===void 0&&wt(()=>t[90].call(d)),o(b,"class","input"),o(b,"type","number"),o(n,"class","flex"),lt(M,"max-width","120px"),o(M,"class","input"),o(M,"type","number"),o(M,"placeholder","R"),lt(K,"max-width","120px"),o(K,"class","input"),o(K,"type","number"),o(K,"placeholder","G"),lt(N,"max-width","120px"),o(N,"class","input"),o(N,"type","number"),o(N,"placeholder","B"),lt(U,"max-width","120px"),o(U,"class","input"),o(U,"type","number"),o(U,"placeholder","A"),o(P,"class","flex"),o(T,"class","flex"),o(E,"class","btn"),lt(E,"width","80px"),o(le,"class","flex"),o(fe,"class","btn"),lt(fe,"width","80px"),o(j,"class","flex"),o(e,"class","flex flex-col gap-1")},m(O,J){C(O,e,J),l(e,n),l(n,i),l(i,s),l(i,a);for(let F=0;F=1,y,_,v,b=d&&Ws(t),W=t[1][t[0]]&&Rs(t);return{c(){e=r("div"),n=r("div"),i=r("input"),s=p(),a=r("button"),a.textContent="New window",h=p(),c=r("br"),u=p(),b&&b.c(),y=p(),W&&W.c(),o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","New Window label.."),o(a,"class","btn"),o(n,"class","flex gap-1"),o(e,"class","flex flex-col children:grow gap-2")},m(T,A){C(T,e,A),l(e,n),l(n,i),z(i,t[28]),l(n,s),l(n,a),l(e,h),l(e,c),l(e,u),b&&b.m(e,null),l(e,y),W&&W.m(e,null),_||(v=[L(i,"input",t[58]),L(a,"click",t[53])],_=!0)},p(T,A){A[0]&268435456&&i.value!==T[28]&&z(i,T[28]),A[0]&2&&(d=Object.keys(T[1]).length>=1),d?b?b.p(T,A):(b=Ws(T),b.c(),b.m(e,y)):b&&(b.d(1),b=null),T[1][T[0]]?W?W.p(T,A):(W=Rs(T),W.c(),W.m(e,null)):W&&(W.d(1),W=null)},i:te,o:te,d(T){T&&k(e),b&&b.d(),W&&W.d(),_=!1,ke(v)}}}function na(t,e,n){const i=fr();let s=i.label;const a={[i.label]:i},h=["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"],c=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],u=navigator.appVersion.includes("Windows"),d=navigator.appVersion.includes("Macintosh");let y=u?c:Object.keys(Kl).map(V=>Kl[V]).filter(V=>!c.includes(V));const _=Object.keys(Xl).map(V=>Xl[V]),v=Object.keys(Gl).map(V=>Gl[V]);let{onMessage:b}=e;const W=document.querySelector("main");let T,A=!0,S=!0,P=!0,M=!0,B=!1,K=!0,I=!1,N=!1,ne=!0,U=!1,Y=null,le=null,E=null,R=null,j=null,Q=null,ue=null,Z=null,be=1,Ce=new bt(ue,Z),fe=new bt(ue,Z),oe=new ln(Y,le),$=new ln(Y,le),pe,G,se=!1,ee=!0,O=null,J=null,F="default",he=!1,Me="Awesome Tauri Example!",we=[],me,We,Pe,De,ge,_e,Se,Ae="none",ce=0,Le;function re(){a[s].setTitle(Me)}function Re(){a[s].hide(),setTimeout(a[s].show,2e3)}function Ie(){a[s].minimize(),setTimeout(a[s].unminimize,2e3)}function Ee(){if(!T)return;const V=new Dn(T);n(1,a[T]=V,a),V.once("tauri://error",function(){b("Error creating new webview")})}function ae(){a[s].innerSize().then(V=>{n(32,oe=V),n(12,Y=oe.width),n(13,le=oe.height)}),a[s].outerSize().then(V=>{n(33,$=V)})}function D(){a[s].innerPosition().then(V=>{n(30,Ce=V)}),a[s].outerPosition().then(V=>{n(31,fe=V),n(18,ue=fe.x),n(19,Z=fe.y)})}async function x(V){V&&(pe&&pe(),G&&G(),G=await V.listen("tauri://move",D),pe=await V.listen("tauri://resize",ae))}async function H(){await a[s].minimize(),await a[s].requestUserAttention(ql.Critical),await new Promise(V=>setTimeout(V,3e3)),await a[s].requestUserAttention(null)}async function Oe(){we.includes(me)||n(35,we=[...we,me]);const V={effects:we,state:We,radius:Pe};Number.isInteger(De)&&Number.isInteger(ge)&&Number.isInteger(_e)&&Number.isInteger(Se)&&(V.color=[De,ge,_e,Se]),W.classList.remove("bg-primary"),W.classList.remove("dark:bg-darkPrimary"),await a[s].clearEffects(),await a[s].setEffects(V)}async function Fn(){n(35,we=[]),await a[s].clearEffects(),W.classList.add("bg-primary"),W.classList.add("dark:bg-darkPrimary")}function Fe(){T=this.value,n(28,T)}function Hn(){s=Mn(this),n(0,s),n(1,a)}function Wt(){Le=this.value,n(43,Le)}const Bn=()=>a[s].center();function He(){B=this.checked,n(6,B)}function Un(){A=this.checked,n(2,A)}function it(){S=this.checked,n(3,S)}function Dt(){P=this.checked,n(4,P)}function jn(){M=this.checked,n(5,M)}function Be(){K=this.checked,n(7,K)}function Nn(){I=this.checked,n(8,I)}function Rt(){N=this.checked,n(9,N)}function Vn(){ne=this.checked,n(10,ne)}function Ue(){U=this.checked,n(11,U)}function qn(){ue=X(this.value),n(18,ue)}function st(){Z=X(this.value),n(19,Z)}function It(){Y=X(this.value),n(12,Y)}function Gn(){le=X(this.value),n(13,le)}function Ge(){E=X(this.value),n(14,E)}function Kn(){R=X(this.value),n(15,R)}function Ft(){j=X(this.value),n(16,j)}function Xn(){Q=X(this.value),n(17,Q)}function Ke(){se=this.checked,n(20,se)}function Yn(){ee=this.checked,n(21,ee)}function rt(){he=this.checked,n(25,he)}function Ht(){F=Mn(this),n(24,F),n(44,h)}function Qn(){O=X(this.value),n(22,O)}function je(){J=X(this.value),n(23,J)}function Jn(){Me=this.value,n(34,Me)}function Bt(){Ae=Mn(this),n(26,Ae),n(49,v)}function Zn(){ce=X(this.value),n(27,ce)}function Ne(){me=Mn(this),n(36,me),n(47,y)}function un(){We=Mn(this),n(37,We),n(48,_)}function cn(){Pe=X(this.value),n(38,Pe)}function dn(){De=X(this.value),n(39,De)}function ze(){ge=X(this.value),n(40,ge)}function at(){_e=X(this.value),n(41,_e)}function Xe(){Se=X(this.value),n(42,Se)}return t.$$set=V=>{"onMessage"in V&&n(57,b=V.onMessage)},t.$$.update=()=>{var V,fn,yt,hn,vt,Ut,pn,kt,mn,Ct,jt,gn,Ve,St,_n,Lt,bn,Mt,Nt,wn,Pt,yn,At,Vt;t.$$.dirty[0]&3&&(a[s],D(),ae()),t.$$.dirty[0]&7&&((V=a[s])==null||V.setResizable(A)),t.$$.dirty[0]&11&&((fn=a[s])==null||fn.setMaximizable(S)),t.$$.dirty[0]&19&&((yt=a[s])==null||yt.setMinimizable(P)),t.$$.dirty[0]&35&&((hn=a[s])==null||hn.setClosable(M)),t.$$.dirty[0]&67&&(B?(vt=a[s])==null||vt.maximize():(Ut=a[s])==null||Ut.unmaximize()),t.$$.dirty[0]&131&&((pn=a[s])==null||pn.setDecorations(K)),t.$$.dirty[0]&259&&((kt=a[s])==null||kt.setAlwaysOnTop(I)),t.$$.dirty[0]&515&&((mn=a[s])==null||mn.setAlwaysOnBottom(N)),t.$$.dirty[0]&1027&&((Ct=a[s])==null||Ct.setContentProtected(ne)),t.$$.dirty[0]&2051&&((jt=a[s])==null||jt.setFullscreen(U)),t.$$.dirty[0]&12291&&Y&&le&&((gn=a[s])==null||gn.setSize(new ln(Y,le))),t.$$.dirty[0]&49155&&(E&&R?(Ve=a[s])==null||Ve.setMinSize(new Ai(E,R)):(St=a[s])==null||St.setMinSize(null)),t.$$.dirty[0]&196611&&(j>800&&Q>400?(_n=a[s])==null||_n.setMaxSize(new Ai(j,Q)):(Lt=a[s])==null||Lt.setMaxSize(null)),t.$$.dirty[0]&786435&&ue!==null&&Z!==null&&((bn=a[s])==null||bn.setPosition(new bt(ue,Z))),t.$$.dirty[0]&3&&((Mt=a[s])==null||Mt.scaleFactor().then($n=>n(29,be=$n))),t.$$.dirty[0]&3&&x(a[s]),t.$$.dirty[0]&1048579&&((Nt=a[s])==null||Nt.setCursorGrab(se)),t.$$.dirty[0]&2097155&&((wn=a[s])==null||wn.setCursorVisible(ee)),t.$$.dirty[0]&16777219&&((Pt=a[s])==null||Pt.setCursorIcon(F)),t.$$.dirty[0]&12582915&&O!==null&&J!==null&&((yn=a[s])==null||yn.setCursorPosition(new bt(O,J))),t.$$.dirty[0]&33554435&&((At=a[s])==null||At.setIgnoreCursorEvents(he)),t.$$.dirty[0]&201326595&&((Vt=a[s])==null||Vt.setProgressBar({status:Ae,progress:ce}))},[s,a,A,S,P,M,B,K,I,N,ne,U,Y,le,E,R,j,Q,ue,Z,se,ee,O,J,F,he,Ae,ce,T,be,Ce,fe,oe,$,Me,we,me,We,Pe,De,ge,_e,Se,Le,h,u,d,y,_,v,re,Re,Ie,Ee,H,Oe,Fn,b,Fe,Hn,Wt,Bn,He,Un,it,Dt,jn,Be,Nn,Rt,Vn,Ue,qn,st,It,Gn,Ge,Kn,Ft,Xn,Ke,Yn,rt,Ht,Qn,je,Jn,Bt,Zn,Ne,un,cn,dn,ze,at,Xe]}class la extends $e{constructor(e){super(),Ze(this,e,na,ta,qe,{onMessage:57},null,[-1,-1,-1,-1])}}function ia(t){let e;return{c(){e=r("div"),e.innerHTML='
Not available for Linux
',o(e,"class","flex flex-col gap-2")},m(n,i){C(n,e,i)},p:te,i:te,o:te,d(n){n&&k(e)}}}function sa(t,e,n){let{onMessage:i}=e;const s=window.constraints={audio:!0,video:!0};function a(c){const u=document.querySelector("video"),d=c.getVideoTracks();i("Got stream with constraints:",s),i(`Using video device: ${d[0].label}`),window.stream=c,u.srcObject=c}function h(c){if(c.name==="ConstraintNotSatisfiedError"){const u=s.video;i(`The resolution ${u.width.exact}x${u.height.exact} px is not supported by your device.`)}else c.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: ${c.name}`,c)}return Nl(async()=>{try{const c=await navigator.mediaDevices.getUserMedia(s);a(c)}catch(c){h(c)}}),lr(()=>{window.stream.getTracks().forEach(function(c){c.stop()})}),t.$$set=c=>{"onMessage"in c&&n(0,i=c.onMessage)},[i]}class ra extends $e{constructor(e){super(),Ze(this,e,sa,ia,qe,{onMessage:0})}}function aa(t){let e,n,i,s,a,h;return{c(){e=r("div"),n=r("button"),n.textContent="Show",i=p(),s=r("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(c,u){C(c,e,u),l(e,n),l(e,i),l(e,s),a||(h=[L(n,"click",t[0]),L(s,"click",t[1])],a=!0)},p:te,i:te,o:te,d(c){c&&k(e),a=!1,ke(h)}}}function oa(t,e,n){let{onMessage:i}=e;function s(){a().then(()=>{setTimeout(()=>{jr().then(()=>i("Shown app")).catch(i)},2e3)}).catch(i)}function a(){return Nr().then(()=>i("Hide app")).catch(i)}return t.$$set=h=>{"onMessage"in h&&n(2,i=h.onMessage)},[s,a,i]}class ua extends $e{constructor(e){super(),Ze(this,e,oa,aa,qe,{onMessage:2})}}var Bl;class hr{get rid(){return Wn(this,Bl,"f")}constructor(e){Bl.set(this,void 0),Vl(this,Bl,e,"f")}async close(){return m("plugin:resources|close",{rid:this.rid})}}Bl=new WeakMap;function ca(t,e){(Array.isArray(e)?e:[e]).forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(i=>{Object.defineProperty(t.prototype,i,Object.getOwnPropertyDescriptor(n.prototype,i)??Object.create(null))})})}var Ul,jl,Us;(function(t){t.Add="Add",t.Advanced="Advanced",t.Bluetooth="Bluetooth",t.Bookmarks="Bookmarks",t.Caution="Caution",t.ColorPanel="ColorPanel",t.ColumnView="ColumnView",t.Computer="Computer",t.EnterFullScreen="EnterFullScreen",t.Everyone="Everyone",t.ExitFullScreen="ExitFullScreen",t.FlowView="FlowView",t.Folder="Folder",t.FolderBurnable="FolderBurnable",t.FolderSmart="FolderSmart",t.FollowLinkFreestanding="FollowLinkFreestanding",t.FontPanel="FontPanel",t.GoLeft="GoLeft",t.GoRight="GoRight",t.Home="Home",t.IChatTheater="IChatTheater",t.IconView="IconView",t.Info="Info",t.InvalidDataFreestanding="InvalidDataFreestanding",t.LeftFacingTriangle="LeftFacingTriangle",t.ListView="ListView",t.LockLocked="LockLocked",t.LockUnlocked="LockUnlocked",t.MenuMixedState="MenuMixedState",t.MenuOnState="MenuOnState",t.MobileMe="MobileMe",t.MultipleDocuments="MultipleDocuments",t.Network="Network",t.Path="Path",t.PreferencesGeneral="PreferencesGeneral",t.QuickLook="QuickLook",t.RefreshFreestanding="RefreshFreestanding",t.Refresh="Refresh",t.Remove="Remove",t.RevealFreestanding="RevealFreestanding",t.RightFacingTriangle="RightFacingTriangle",t.Share="Share",t.Slideshow="Slideshow",t.SmartBadge="SmartBadge",t.StatusAvailable="StatusAvailable",t.StatusNone="StatusNone",t.StatusPartiallyAvailable="StatusPartiallyAvailable",t.StatusUnavailable="StatusUnavailable",t.StopProgressFreestanding="StopProgressFreestanding",t.StopProgress="StopProgress",t.TrashEmpty="TrashEmpty",t.TrashFull="TrashFull",t.User="User",t.UserAccounts="UserAccounts",t.UserGroup="UserGroup",t.UserGuest="UserGuest"})(Us||(Us={}));function Li([t,e,n]){switch(n){case"Submenu":return new Rn(t,e);case"Predefined":return new Ql(t,e);case"Check":return new In(t,e);case"Icon":return new Jl(t,e);case"MenuItem":default:return new Yl(t,e)}}async function on(t,e){const n=new ur;let i=null;return e&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&e.items&&(i=e.items.map(s=>[s.rid,s.kind]))),m("plugin:menu|new",{kind:t,options:e?{...e,items:i}:void 0,handler:n})}class pr extends hr{get id(){return Wn(this,Ul,"f")}get kind(){return Wn(this,jl,"f")}constructor(e,n,i){super(e),Ul.set(this,void 0),jl.set(this,void 0),Vl(this,Ul,n,"f"),Vl(this,jl,i,"f")}}Ul=new WeakMap,jl=new WeakMap;class mr extends pr{async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(i=>[i.rid,i.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(Li)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(Li))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?Li(n):null)}async popup(e,n){let i=null;return e&&(i={type:e instanceof bt?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:i})}}class Tt extends mr{constructor(e,n){super(e,n,"Menu")}static async new(e){return on("Menu",e).then(([n,i])=>new Tt(n,i))}static async default(){return m("plugin:menu|default").then(([e,n])=>new Tt(e,n))}async setAsAppMenu(){return m("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new Tt(e[0],e[1]):null)}async setAsWindowMenu(e){return m("plugin:menu|set_as_window_menu",{rid:this.rid,window:(e==null?void 0:e.label)??null}).then(n=>n?new Tt(n[0],n[1]):null)}}class gr extends pr{async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}}class _r extends gr{async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}}class Ti extends _r{async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}}class Yl extends Ti{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return on("MenuItem",e).then(([n,i])=>new Yl(n,i))}}class Rn extends mr{constructor(e,n){super(e,n,"Submenu")}static async new(e){return on("Submenu",e).then(([n,i])=>new Rn(n,i))}async setAsWindowsMenuForNSApp(){return m("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return m("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}}ca(Rn,_r);class Ql extends gr{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return on("MenuItem",e).then(([n,i])=>new Ql(n,i))}}class In extends Ti{constructor(e,n){super(e,n,"Check")}static async new(e){return on("Check",e).then(([n,i])=>new In(n,i))}async isChecked(){return m("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return m("plugin:menu|set_checked",{rid:this.rid,checked:e})}}class Jl extends Ti{constructor(e,n){super(e,n,"Icon")}static async new(e){return on("Icon",e).then(([n,i])=>new Jl(n,i))}async setIcon(e){return m("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return m("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}}function js(t,e,n){const i=t.slice();return i[14]=e[n],i[15]=e,i[16]=n,i}function Ns(t,e,n){const i=t.slice();return i[17]=e[n],i[18]=e,i[19]=n,i}function Vs(t){let e,n,i,s,a=t[17]+"",h,c,u,d;function y(){t[8].call(n,t[18],t[19])}return{c(){e=r("label"),n=r("input"),s=p(),h=w(a),c=p(),n.checked=i=t[0]===t[17],o(n,"type","radio"),o(n,"name","kind")},m(_,v){C(_,e,v),l(e,n),z(n,t[17]),l(e,s),l(e,h),l(e,c),u||(d=[L(n,"change",t[5]),L(n,"change",y)],u=!0)},p(_,v){t=_,v&9&&i!==(i=t[0]===t[17])&&(n.checked=i),v&8&&z(n,t[17]),v&8&&a!==(a=t[17]+"")&&ie(h,a)},d(_){_&&k(e),u=!1,ke(d)}}}function qs(t){let e,n,i;return{c(){e=r("input"),o(e,"class","input grow"),o(e,"type","text"),o(e,"placeholder","Text")},m(s,a){C(s,e,a),z(e,t[1]),n||(i=L(e,"input",t[9]),n=!0)},p(s,a){a&2&&e.value!==s[1]&&z(e,s[1])},d(s){s&&k(e),n=!1,i()}}}function da(t){let e,n=de(t[4]),i=[];for(let s=0;si("itemClick",{id:B,text:M})},P=await Yl.new(S);break;case"Icon":S={text:a,icon:h,action:B=>i("itemClick",{id:B,text:M})},P=await Jl.new(S);break;case"Check":S={text:a,action:B=>i("itemClick",{id:B,text:M})},P=await In.new(S);break;case"Predefined":S={item:c},P=await Ql.new(S);break}i("new",{item:P,options:S}),n(1,a=""),c=""}function b(S,P){S[P]=this.value,n(3,u)}function W(){a=this.value,n(1,a)}function T(){h=this.value,n(2,h)}function A(S,P){S[P]=this.value,n(4,d)}return[s,a,h,u,d,y,_,v,b,W,T,A]}class ma extends $e{constructor(e){super(),Ze(this,e,pa,ha,qe,{})}}function Ks(t,e,n){const i=t.slice();return i[5]=e[n],i}function Xs(t){let e,n,i,s,a,h=Ys(t[5])+"",c,u;return{c(){e=r("div"),n=r("div"),s=p(),a=r("p"),c=w(h),u=p(),o(n,"class",i=t[3](t[5])),o(e,"class","flex flex-row gap-1")},m(d,y){C(d,e,y),l(e,n),l(e,s),l(e,a),l(a,c),l(e,u)},p(d,y){y&1&&i!==(i=d[3](d[5]))&&o(n,"class",i),y&1&&h!==(h=Ys(d[5])+"")&&ie(c,h)},d(d){d&&k(e)}}}function ga(t){let e,n,i,s,a;n=new ma({}),n.$on("new",t[1]),n.$on("itemClick",t[2]);let h=de(t[0]),c=[];for(let u=0;u{"items"in u&&n(0,i=u.items)},[i,a,h,c]}class br extends $e{constructor(e){super(),Ze(this,e,_a,ga,qe,{items:0})}}function ba(t){let e,n,i,s,a,h,c,u,d,y;function _(b){t[5](b)}let v={};return t[0]!==void 0&&(v.items=t[0]),n=new br({props:v}),On.push(()=>ar(n,"items",_)),n.$on("itemClick",t[3]),{c(){e=r("div"),Tn(n.$$.fragment),s=p(),a=r("button"),a.textContent="Create menu",h=p(),c=r("button"),c.textContent="Popup",o(a,"class","btn"),o(c,"class","btn")},m(b,W){C(b,e,W),rn(n,e,null),l(e,s),l(e,a),l(e,h),l(e,c),u=!0,d||(y=[L(a,"click",t[1]),L(c,"click",t[2])],d=!0)},p(b,[W]){const T={};!i&&W&1&&(i=!0,T.items=b[0],sr(()=>i=!1)),n.$set(T)},i(b){u||(sn(n.$$.fragment,b),u=!0)},o(b){zn(n.$$.fragment,b),u=!1},d(b){b&&k(e),an(n),d=!1,ke(y)}}}function wa(t,e,n){let{onMessage:i}=e,s=[],a=null,h=0;const c=navigator.userAgent.includes("Macintosh");async function u(){const v=await Rn.new({text:"app",items:s.map(b=>b.item)});h=s.length,a=await Tt.new({items:[v]}),await(c?a.setAsAppMenu():a.setAsWindowMenu())}async function d(){(!a||h!==s.length)&&await u(),a.popup()}function y(v){i(`Item ${v.detail.text} clicked`)}function _(v){s=v,n(0,s)}return t.$$set=v=>{"onMessage"in v&&n(4,i=v.onMessage)},[s,u,d,y,i,_]}class ya extends $e{constructor(e){super(),Ze(this,e,wa,ba,qe,{onMessage:4})}}class Wi extends hr{constructor(e,n){super(e),this.id=n}static async new(e){e!=null&&e.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e!=null&&e.icon&&(e.icon=typeof e.icon=="string"?e.icon:Array.from(e.icon));const n=new ur;return e!=null&&e.action&&(n.onmessage=e.action,delete e.action),m("plugin:tray|new",{options:e??{},handler:n}).then(([i,s])=>new Wi(i,s))}async setIcon(e){let n=null;return e&&(n=typeof e=="string"?e:Array.from(e)),m("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),m("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return m("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return m("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return m("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return m("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return m("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return m("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}function va(t){let e,n,i,s,a,h,c,u,d,y,_,v,b,W,T,A,S,P,M,B,K,I,N,ne,U,Y;function le(R){t[14](R)}let E={};return t[5]!==void 0&&(E.items=t[5]),M=new br({props:E}),On.push(()=>ar(M,"items",le)),M.$on("itemClick",t[6]),{c(){e=r("div"),n=r("div"),i=r("input"),s=p(),a=r("input"),h=p(),c=r("label"),u=w(`Menu on left click + `),d=r("input"),y=p(),_=r("div"),v=r("input"),b=p(),W=r("label"),T=w(`Icon as template + `),A=r("input"),S=p(),P=r("div"),Tn(M.$$.fragment),K=p(),I=r("div"),N=r("button"),N.textContent="Create tray",o(i,"class","input grow"),o(i,"type","text"),o(i,"placeholder","Title"),o(a,"class","input grow"),o(a,"type","text"),o(a,"placeholder","Tooltip"),o(d,"type","checkbox"),o(n,"class","flex gap-1"),o(v,"class","input grow"),o(v,"type","text"),o(v,"placeholder","Icon path"),o(A,"type","checkbox"),o(_,"class","flex gap-1"),o(P,"class","flex children:grow"),o(N,"class","btn"),o(N,"title","Creates the tray icon"),o(I,"class","flex"),o(e,"class","flex flex-col children:grow gap-2")},m(R,j){C(R,e,j),l(e,n),l(n,i),z(i,t[2]),l(n,s),l(n,a),z(a,t[1]),l(n,h),l(n,c),l(c,u),l(c,d),d.checked=t[4],l(e,y),l(e,_),l(_,v),z(v,t[0]),l(_,b),l(_,W),l(W,T),l(W,A),A.checked=t[3],l(e,S),l(e,P),rn(M,P,null),l(e,K),l(e,I),l(I,N),ne=!0,U||(Y=[L(i,"input",t[9]),L(a,"input",t[10]),L(d,"change",t[11]),L(v,"input",t[12]),L(A,"change",t[13]),L(N,"click",t[7])],U=!0)},p(R,[j]){j&4&&i.value!==R[2]&&z(i,R[2]),j&2&&a.value!==R[1]&&z(a,R[1]),j&16&&(d.checked=R[4]),j&1&&v.value!==R[0]&&z(v,R[0]),j&8&&(A.checked=R[3]);const Q={};!B&&j&32&&(B=!0,Q.items=R[5],sr(()=>B=!1)),M.$set(Q)},i(R){ne||(sn(M.$$.fragment,R),ne=!0)},o(R){zn(M.$$.fragment,R),ne=!1},d(R){R&&k(e),an(M),U=!1,ke(Y)}}}function ka(t,e,n){let{onMessage:i}=e,s=null,a=null,h=null,c=!1,u=!0,d=[];function y(P){i(`Item ${P.detail.text} clicked`)}async function _(){Wi.new({icon:s,tooltip:a,title:h,iconAsTemplate:c,menuOnLeftClick:u,menu:await Tt.new({items:d.map(P=>P.item)}),action:P=>i(P)}).catch(i)}function v(){h=this.value,n(2,h)}function b(){a=this.value,n(1,a)}function W(){u=this.checked,n(4,u)}function T(){s=this.value,n(0,s)}function A(){c=this.checked,n(3,c)}function S(P){d=P,n(5,d)}return t.$$set=P=>{"onMessage"in P&&n(8,i=P.onMessage)},[s,a,h,c,u,d,y,_,i,v,b,W,T,A,S]}class Ca extends $e{constructor(e){super(),Ze(this,e,ka,va,qe,{onMessage:8})}}function Qs(t,e,n){const i=t.slice();return i[25]=e[n],i}function Js(t,e,n){const i=t.slice();return i[28]=e[n],i}function Sa(t){let e;return{c(){e=r("span"),o(e,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,i){C(n,e,i)},d(n){n&&k(e)}}}function La(t){let e;return{c(){e=r("span"),o(e,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,i){C(n,e,i)},d(n){n&&k(e)}}}function Ma(t){let e,n;return{c(){e=w(`Switch to Dark mode + `),n=r("div"),o(n,"class","i-ph-moon")},m(i,s){C(i,e,s),C(i,n,s)},d(i){i&&(k(e),k(n))}}}function Pa(t){let e,n;return{c(){e=w(`Switch to Light mode + `),n=r("div"),o(n,"class","i-ph-sun")},m(i,s){C(i,e,s),C(i,n,s)},d(i){i&&(k(e),k(n))}}}function Aa(t){let e,n,i,s,a,h,c;function u(){return t[14](t[28])}return{c(){e=r("a"),n=r("div"),i=p(),s=r("p"),s.textContent=`${t[28].label}`,o(n,"class",t[28].icon+" mr-2"),o(e,"href","##"),o(e,"class",a="nv "+(t[1]===t[28]?"nv_selected":""))},m(d,y){C(d,e,y),l(e,n),l(e,i),l(e,s),h||(c=L(e,"click",u),h=!0)},p(d,y){t=d,y&2&&a!==(a="nv "+(t[1]===t[28]?"nv_selected":""))&&o(e,"class",a)},d(d){d&&k(e),h=!1,c()}}}function Zs(t){let e,n=t[28]&&Aa(t);return{c(){n&&n.c(),e=Ei()},m(i,s){n&&n.m(i,s),C(i,e,s)},p(i,s){i[28]&&n.p(i,s)},d(i){i&&k(e),n&&n.d(i)}}}function $s(t){let e,n=t[25].html+"",i;return{c(){e=new Ar(!1),i=Ei(),e.a=i},m(s,a){e.m(n,s,a),C(s,i,a)},p(s,a){a&16&&n!==(n=s[25].html+"")&&e.p(n)},d(s){s&&(k(i),e.d())}}}function Ea(t){let e,n,i,s,a,h,c,u,d,y,_,v,b,W,T,A,S,P,M,B,K,I,N,ne,U,Y,le,E,R,j,Q,ue,Z=t[1].label+"",be,Ce,fe,oe,$,pe,G,se,ee,O,J,F,he,Me,we,me,We,Pe;function De(D,x){return D[0]?La:Sa}let ge=De(t),_e=ge(t);function Se(D,x){return D[2]?Pa:Ma}let Ae=Se(t),ce=Ae(t),Le=de(t[5]),re=[];for(let D=0;D`,S=p(),P=r("a"),P.innerHTML=`GitHub `,M=p(),B=r("a"),B.innerHTML=`Source - `,K=p(),I=r("br"),N=p(),ne=r("div"),U=p(),Y=r("br"),le=p(),E=r("div");for(let D=0;D
',Me=p(),we=r("div");for(let D=0;D{an(H,1)}),Dr()}Re?($=Ms(Re,Ie(D)),Tn($.$$.fragment),sn($.$$.fragment,1),rn($,oe,null)):$=null}if(x&16){Ee=de(D[4]);let H;for(H=0;H{E.ctrlKey&&E.key==="b"&&m("toggle_menu")});const s=navigator.userAgent.toLowerCase(),a=s.includes("android")||s.includes("iphone"),h=[{label:"Welcome",component:Gr,icon:"i-ph-hand-waving"},{label:"Communication",component:Qr,icon:"i-codicon-radio-tower"},!a&&{label:"App",component:ua,icon:"i-codicon-hubot"},{label:"Window",component:la,icon:"i-codicon-window"},{label:"Menu",component:ya,icon:"i-ph-broadcast"},{label:"Tray",component:Ca,icon:"i-ph-broadcast"},{label:"WebRTC",component:ra,icon:"i-ph-broadcast"}];let c=h[0];function u(E){n(1,c=E)}let d;jl(()=>{n(2,d=localStorage&&localStorage.getItem("theme")=="dark"),er(d)});function b(){n(2,d=!d),er(d)}let g=Fr([]);Sr(t,g,E=>n(4,i=E));function k(E){g.update(R=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof E=="string"?E:JSON.stringify(E,null,1))+"
"},...R])}function y(E){g.update(R=>[{html:`
[${new Date().toLocaleTimeString()}]: `+E+"
"},...R])}function W(){g.update(()=>[])}let T,A,S;function P(E){S=E.clientY;const R=window.getComputedStyle(T);A=parseInt(R.height,10);const j=ue=>{const Z=ue.clientY-S,be=A-Z;n(3,T.style.height=`${be{document.removeEventListener("mouseup",Q),document.removeEventListener("mousemove",j)};document.addEventListener("mouseup",Q),document.addEventListener("mousemove",j)}let M=!1,B,K,I=!1,N=0,ne=0;const U=(E,R,j)=>Math.min(Math.max(R,E),j);jl(()=>{n(13,B=document.querySelector("#sidebar")),K=document.querySelector("#sidebarToggle"),document.addEventListener("click",E=>{K.contains(E.target)?n(0,M=!M):M&&!B.contains(E.target)&&n(0,M=!1)}),document.addEventListener("touchstart",E=>{if(K.contains(E.target))return;const R=E.touches[0].clientX;(0{if(I){const R=E.touches[0].clientX;ne=R;const j=(R-N)/10;B.style.setProperty("--translate-x",`-${U(0,M?0-j:18.75-j,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(I){const E=(ne-N)/10;n(0,M=M?E>-(18.75/2):E>18.75/2)}I=!1})});const Y=E=>{u(E),n(0,M=!1)};function le(E){On[E?"unshift":"push"](()=>{T=E,n(3,T)})}return t.$$.update=()=>{if(t.$$.dirty&1){const E=document.querySelector("#sidebar");E&&Oa(E,M)}},[M,c,d,T,i,h,u,b,g,k,y,W,P,B,Y,le]}class Ta extends $e{constructor(e){super(),Ze(this,e,za,Ea,qe,{})}}new Ta({target:document.querySelector("#app")}); + `,K=p(),I=r("br"),N=p(),ne=r("div"),U=p(),Y=r("br"),le=p(),E=r("div");for(let D=0;D
',Me=p(),we=r("div");for(let D=0;D{an(H,1)}),Dr()}Re?($=Ms(Re,Ie(D)),Tn($.$$.fragment),sn($.$$.fragment,1),rn($,oe,null)):$=null}if(x&16){Ee=de(D[4]);let H;for(H=0;H{E.ctrlKey&&E.key==="b"&&m("toggle_menu")});const s=navigator.userAgent.toLowerCase(),a=s.includes("android")||s.includes("iphone"),h=[{label:"Welcome",component:Gr,icon:"i-ph-hand-waving"},{label:"Communication",component:Qr,icon:"i-codicon-radio-tower"},!a&&{label:"App",component:ua,icon:"i-codicon-hubot"},{label:"Window",component:la,icon:"i-codicon-window"},{label:"Menu",component:ya,icon:"i-ph-broadcast"},{label:"Tray",component:Ca,icon:"i-ph-broadcast"},{label:"WebRTC",component:ra,icon:"i-ph-broadcast"}];let c=h[0];function u(E){n(1,c=E)}let d;Nl(()=>{n(2,d=localStorage&&localStorage.getItem("theme")=="dark"),er(d)});function y(){n(2,d=!d),er(d)}let _=Fr([]);Sr(t,_,E=>n(4,i=E));function v(E){_.update(R=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof E=="string"?E:JSON.stringify(E,null,1))+"
"},...R])}function b(E){_.update(R=>[{html:`
[${new Date().toLocaleTimeString()}]: `+E+"
"},...R])}function W(){_.update(()=>[])}let T,A,S;function P(E){S=E.clientY;const R=window.getComputedStyle(T);A=parseInt(R.height,10);const j=ue=>{const Z=ue.clientY-S,be=A-Z;n(3,T.style.height=`${be{document.removeEventListener("mouseup",Q),document.removeEventListener("mousemove",j)};document.addEventListener("mouseup",Q),document.addEventListener("mousemove",j)}let M=!1,B,K,I=!1,N=0,ne=0;const U=(E,R,j)=>Math.min(Math.max(R,E),j);Nl(()=>{n(13,B=document.querySelector("#sidebar")),K=document.querySelector("#sidebarToggle"),document.addEventListener("click",E=>{K.contains(E.target)?n(0,M=!M):M&&!B.contains(E.target)&&n(0,M=!1)}),document.addEventListener("touchstart",E=>{if(K.contains(E.target))return;const R=E.touches[0].clientX;(0{if(I){const R=E.touches[0].clientX;ne=R;const j=(R-N)/10;B.style.setProperty("--translate-x",`-${U(0,M?0-j:18.75-j,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(I){const E=(ne-N)/10;n(0,M=M?E>-(18.75/2):E>18.75/2)}I=!1})});const Y=E=>{u(E),n(0,M=!1)};function le(E){On[E?"unshift":"push"](()=>{T=E,n(3,T)})}return t.$$.update=()=>{if(t.$$.dirty&1){const E=document.querySelector("#sidebar");E&&Oa(E,M)}},[M,c,d,T,i,h,u,y,_,v,b,W,P,B,Y,le]}class Ta extends $e{constructor(e){super(),Ze(this,e,za,Ea,qe,{})}}new Ta({target:document.querySelector("#app")}); diff --git a/examples/api/src/views/Menu.svelte b/examples/api/src/views/Menu.svelte index 188dc3684e3..1f90de1eedc 100644 --- a/examples/api/src/views/Menu.svelte +++ b/examples/api/src/views/Menu.svelte @@ -1,20 +1,28 @@ -
-
+
+
{#each itemKinds as itemKind} -
-
+
+ +
{#if kind == 'Normal' || kind == 'Icon' || kind == 'Check'} + {:else if kind == 'Check'} +
+ + +
{:else if kind == 'Predefined'} -
+
{#each predefinedOptions as predefinedOption} -
{/if}
-
+
+ +
diff --git a/examples/api/src/views/WebRTC.svelte b/examples/api/src/views/WebRTC.svelte index e0f9862a5ec..f646b2dc69e 100644 --- a/examples/api/src/views/WebRTC.svelte +++ b/examples/api/src/views/WebRTC.svelte @@ -42,7 +42,7 @@ }) onDestroy(() => { - window.stream.getTracks().forEach(function (track) { + window.stream?.getTracks().forEach(function (track) { track.stop() }) }) diff --git a/examples/api/src/views/Window.svelte b/examples/api/src/views/Window.svelte index d1b0a5359ca..7e31d7f4f8d 100644 --- a/examples/api/src/views/Window.svelte +++ b/examples/api/src/views/Window.svelte @@ -308,9 +308,9 @@ {#if windowMap[selectedWindow]}
- +
- +
From 423c8116f7aaef65cb4d6172025539bbdb72e6cc Mon Sep 17 00:00:00 2001 From: amrbashir Date: Wed, 15 Nov 2023 05:04:17 +0200 Subject: [PATCH 51/64] licesne and lint --- tooling/api/src/menu/base.ts | 4 ++-- tooling/api/src/menu/menu.ts | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tooling/api/src/menu/base.ts b/tooling/api/src/menu/base.ts index 02388b43c0b..351c5f0bc51 100644 --- a/tooling/api/src/menu/base.ts +++ b/tooling/api/src/menu/base.ts @@ -15,7 +15,7 @@ export type ItemKind = export async function newMenu( kind: ItemKind, - opts?: any + opts?: { action?: () => void; items: { rid: number; kind: string }[] } ): Promise<[number, string]> { const handler = new Channel() let items: null | Array<[number, string]> = null @@ -26,7 +26,7 @@ export async function newMenu( } if ('items' in opts && opts.items) { - items = opts.items.map((i: any) => [i.rid, i.kind]) + items = opts.items.map((i) => [i.rid, i.kind]) } } diff --git a/tooling/api/src/menu/menu.ts b/tooling/api/src/menu/menu.ts index 792ed1246e9..573208e5308 100644 --- a/tooling/api/src/menu/menu.ts +++ b/tooling/api/src/menu/menu.ts @@ -1,3 +1,7 @@ +// Copyright 2019-2023 Tauri Programme within The Commons Conservancy +// SPDX-License-Identifier: Apache-2.0 +// SPDX-License-Identifier: MIT + import { type CheckMenuItem, type IconMenuItem, From 6d210bedd89262ee5cc501fbc0628a3efec7875b Mon Sep 17 00:00:00 2001 From: amrbashir Date: Wed, 15 Nov 2023 05:14:00 +0200 Subject: [PATCH 52/64] fix build --- core/tauri/scripts/bundle.global.js | 2 +- examples/api/dist/assets/index.js | 2 +- tooling/api/src/menu/base.ts | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 52cbce22005..72cc95cdc10 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1 +1 @@ -var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i;function r(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=r((e=>{n(this,i,"f").call(this,e)}))}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}i=new WeakMap;class s{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var o=Object.freeze({__proto__:null,Channel:a,PluginListener:s,addPluginListener:async function(e,n,t){const i=new a;return i.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:i}).then((()=>new s(e,n,i.id)))},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:l,transformCallback:r});var u,c=Object.freeze({__proto__:null,getName:async function(){return l("plugin:app|name")},getTauriVersion:async function(){return l("plugin:app|tauri_version")},getVersion:async function(){return l("plugin:app|version")},hide:async function(){return l("plugin:app|app_hide")},show:async function(){return l("plugin:app|app_show")}});async function d(e,n){await l("plugin:event|unlisten",{event:e,eventId:n})}async function p(e,n,t){return l("plugin:event|listen",{event:e,windowLabel:t?.target,handler:r(n)}).then((n=>async()=>d(e,n)))}async function h(e,n,t){return p(e,(t=>{n(t),d(e,t.id).catch((()=>{}))}),t)}async function y(e,n,t){await l("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}!function(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"}(u||(u={}));var g=Object.freeze({__proto__:null,get TauriEvent(){return u},emit:y,listen:p,once:h});class w{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class _{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new w(this.width/e,this.height/e)}}class m{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class b{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new m(this.x/e,this.y/e)}}var f,v,k=Object.freeze({__proto__:null,LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(f||(f={}));class D{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}}function I(){return new L(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function A(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new L(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(v||(v={}));const E=["tauri://created","tauri://error"];class L{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||l("plugin:window|create",{options:{...n,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return A().some((n=>n.label===e))?new L(e,{skip:!0}):null}static getCurrent(){return I()}static getAll(){return A()}static async getFocusedWindow(){for(const e of A())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):p(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):h(e,n,{target:this.label})}async emit(e,n){if(E.includes(e)){for(const t of this.listeners[e]||[])t({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return y(e,n,{target:this.label})}_handleTauriEvent(e,n){return!!E.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return l("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return l("plugin:window|inner_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async outerPosition(){return l("plugin:window|outer_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async innerSize(){return l("plugin:window|inner_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async outerSize(){return l("plugin:window|outer_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async isFullscreen(){return l("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return l("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return l("plugin:window|is_maximized",{label:this.label})}async isFocused(){return l("plugin:window|is_focused",{label:this.label})}async isDecorated(){return l("plugin:window|is_decorated",{label:this.label})}async isResizable(){return l("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return l("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return l("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return l("plugin:window|is_closable",{label:this.label})}async isVisible(){return l("plugin:window|is_visible",{label:this.label})}async title(){return l("plugin:window|title",{label:this.label})}async theme(){return l("plugin:window|theme",{label:this.label})}async center(){return l("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===f.Critical?{type:"Critical"}:{type:"Informational"}),l("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return l("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return l("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return l("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return l("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return l("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return l("plugin:window|maximize",{label:this.label})}async unmaximize(){return l("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return l("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return l("plugin:window|minimize",{label:this.label})}async unminimize(){return l("plugin:window|unminimize",{label:this.label})}async show(){return l("plugin:window|show",{label:this.label})}async hide(){return l("plugin:window|hide",{label:this.label})}async close(){return l("plugin:window|close",{label:this.label})}async setDecorations(e){return l("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return l("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return l("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return l("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return l("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return l("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return l("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return l("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return l("plugin:window|set_focus",{label:this.label})}async setIcon(e){return l("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return l("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return l("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return l("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return l("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return l("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return l("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return l("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,(n=>{n.payload=x(n.payload),e(n)}))}async onMoved(e){return this.listen(u.WINDOW_MOVED,(n=>{n.payload=T(n.payload),e(n)}))}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,(n=>{const t=new D(n);Promise.resolve(e(t)).then((()=>{if(!t.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const n=await this.listen(u.WINDOW_FOCUS,(n=>{e({...n,payload:!0})})),t=await this.listen(u.WINDOW_BLUR,(n=>{e({...n,payload:!1})}));return()=>{n(),t()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(u.WINDOW_FILE_DROP,(n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:T(n.payload.position)}})})),t=await this.listen(u.WINDOW_FILE_DROP_HOVER,(n=>{e({...n,payload:{type:"hover",paths:n.payload.paths,position:T(n.payload.position)}})})),i=await this.listen(u.WINDOW_FILE_DROP_CANCELLED,(n=>{e({...n,payload:{type:"cancel"}})}));return()=>{n(),t(),i()}}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var S,P;function C(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:T(e.position),size:x(e.size)}}function T(e){return new b(e.x,e.y)}function x(e){return new _(e.width,e.height)}!function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(S||(S={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(P||(P={}));var F,z=Object.freeze({__proto__:null,CloseRequestedEvent:D,get Effect(){return S},get EffectState(){return P},LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_,get ProgressBarStatus(){return v},get UserAttentionType(){return f},Window:L,availableMonitors:async function(){return l("plugin:window|available_monitors").then((e=>e.map(C)))},currentMonitor:async function(){return l("plugin:window|current_monitor").then(C)},getAll:A,getCurrent:I,primaryMonitor:async function(){return l("plugin:window|primary_monitor").then(C)}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(F||(F={}));var R,M=Object.freeze({__proto__:null,get BaseDirectory(){return F},appCacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppCache})},appConfigDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppConfig})},appDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppData})},appLocalDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLocalData})},appLogDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLog})},audioDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Audio})},basename:async function(e,n){return l("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Cache})},configDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Config})},dataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Desktop})},dirname:async function(e){return l("plugin:path|dirname",{path:e})},documentDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Document})},downloadDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Download})},executableDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Executable})},extname:async function(e){return l("plugin:path|extname",{path:e})},fontDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Font})},homeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Home})},isAbsolute:async function(e){return l("plugin:path|isAbsolute",{path:e})},join:async function(...e){return l("plugin:path|join",{paths:e})},localDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.LocalData})},normalize:async function(e){return l("plugin:path|normalize",{path:e})},pictureDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Picture})},publicDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Public})},resolve:async function(...e){return l("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return l("plugin:path|resolve_directory",{directory:F.Resource,path:e})},resourceDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Resource})},runtimeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Temp})},templateDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Template})},videoDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Video})}});class W{get rid(){return n(this,R,"f")}constructor(e){R.set(this,void 0),t(this,R,e,"f")}async close(){return l("plugin:resources|close",{rid:this.rid})}}R=new WeakMap;class N extends W{constructor(e,n){super(e),this.id=n}static async new(e){e?.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e?.icon&&(e.icon="string"==typeof e.icon?e.icon:Array.from(e.icon));const n=new a;return e?.action&&(n.onmessage=e.action,delete e.action),l("plugin:tray|new",{options:e??{},handler:n}).then((([e,n])=>new N(e,n)))}async setIcon(e){let n=null;return e&&(n="string"==typeof e?e:Array.from(e)),l("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),l("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return l("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return l("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return l("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return l("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return l("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return l("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var O,U,B=Object.freeze({__proto__:null,TrayIcon:N});async function V(e,n){const t=new a;let i=null;return n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"items"in n&&n.items&&(i=n.items.map((e=>[e.rid,e.kind])))),l("plugin:menu|new",{kind:e,options:n?{...n,items:i}:void 0,handler:t})}class H extends W{get id(){return n(this,O,"f")}get kind(){return n(this,U,"f")}constructor(e,n,i){super(e),O.set(this,void 0),U.set(this,void 0),t(this,O,n,"f"),t(this,U,i,"f")}}function G([e,n,t]){switch(t){case"Submenu":return new j(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}O=new WeakMap,U=new WeakMap;let j=class e extends H{constructor(e,n){super(e,n,"Submenu")}static async new(n){return V("Submenu",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(G)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(G)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?G(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsWindowsMenuForNSApp(){return l("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return l("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};function q([e,n,t]){switch(t){case"Submenu":return new Submenu(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}class Q extends H{constructor(e,n){super(e,n,"Menu")}static async new(e){return V("Menu",e).then((([e,n])=>new Q(e,n)))}static async default(){return l("plugin:menu|default").then((([e,n])=>new Q(e,n)))}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(q)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(q)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?q(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsAppMenu(){return l("plugin:menu|set_as_app_menu",{rid:this.rid}).then((e=>e?new Q(e[0],e[1]):null))}async setAsWindowMenu(e){return l("plugin:menu|set_as_window_menu",{rid:this.rid,window:e?.label??null}).then((e=>e?new Q(e[0],e[1]):null))}}var $;!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}($||($={}));var Z=Object.freeze({__proto__:null,CheckMenuItem:class e extends H{constructor(e,n){super(e,n,"Check")}static async new(n){return V("Check",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return l("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return l("plugin:menu|set_checked",{rid:this.rid,checked:e})}},IconMenuItem:class e extends H{constructor(e,n){super(e,n,"Icon")}static async new(n){return V("Icon",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return l("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return l("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},Menu:Q,MenuItem:class e extends H{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return V("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},get NativeIcon(){return $},PredefinedMenuItem:class e extends H{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return V("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},Submenu:j});return e.app=c,e.dpi=k,e.event=g,e.menu=Z,e.path=M,e.primitives=o,e.tray=B,e.window=z,e}({});window.__TAURI__=__TAURI_IIFE__; +var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i;function r(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=r((e=>{n(this,i,"f").call(this,e)}))}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}i=new WeakMap;class s{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var o=Object.freeze({__proto__:null,Channel:a,PluginListener:s,addPluginListener:async function(e,n,t){const i=new a;return i.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:i}).then((()=>new s(e,n,i.id)))},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:l,transformCallback:r});var u,c=Object.freeze({__proto__:null,getName:async function(){return l("plugin:app|name")},getTauriVersion:async function(){return l("plugin:app|tauri_version")},getVersion:async function(){return l("plugin:app|version")},hide:async function(){return l("plugin:app|app_hide")},show:async function(){return l("plugin:app|app_show")}});async function d(e,n){await l("plugin:event|unlisten",{event:e,eventId:n})}async function p(e,n,t){return l("plugin:event|listen",{event:e,windowLabel:t?.target,handler:r(n)}).then((n=>async()=>d(e,n)))}async function h(e,n,t){return p(e,(t=>{n(t),d(e,t.id).catch((()=>{}))}),t)}async function y(e,n,t){await l("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}!function(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"}(u||(u={}));var g=Object.freeze({__proto__:null,get TauriEvent(){return u},emit:y,listen:p,once:h});class w{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class _{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new w(this.width/e,this.height/e)}}class m{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class b{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new m(this.x/e,this.y/e)}}var f,v,k=Object.freeze({__proto__:null,LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(f||(f={}));class D{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}}function I(){return new L(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function A(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new L(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(v||(v={}));const E=["tauri://created","tauri://error"];class L{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||l("plugin:window|create",{options:{...n,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return A().some((n=>n.label===e))?new L(e,{skip:!0}):null}static getCurrent(){return I()}static getAll(){return A()}static async getFocusedWindow(){for(const e of A())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):p(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):h(e,n,{target:this.label})}async emit(e,n){if(E.includes(e)){for(const t of this.listeners[e]||[])t({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return y(e,n,{target:this.label})}_handleTauriEvent(e,n){return!!E.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return l("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return l("plugin:window|inner_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async outerPosition(){return l("plugin:window|outer_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async innerSize(){return l("plugin:window|inner_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async outerSize(){return l("plugin:window|outer_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async isFullscreen(){return l("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return l("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return l("plugin:window|is_maximized",{label:this.label})}async isFocused(){return l("plugin:window|is_focused",{label:this.label})}async isDecorated(){return l("plugin:window|is_decorated",{label:this.label})}async isResizable(){return l("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return l("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return l("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return l("plugin:window|is_closable",{label:this.label})}async isVisible(){return l("plugin:window|is_visible",{label:this.label})}async title(){return l("plugin:window|title",{label:this.label})}async theme(){return l("plugin:window|theme",{label:this.label})}async center(){return l("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===f.Critical?{type:"Critical"}:{type:"Informational"}),l("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return l("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return l("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return l("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return l("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return l("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return l("plugin:window|maximize",{label:this.label})}async unmaximize(){return l("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return l("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return l("plugin:window|minimize",{label:this.label})}async unminimize(){return l("plugin:window|unminimize",{label:this.label})}async show(){return l("plugin:window|show",{label:this.label})}async hide(){return l("plugin:window|hide",{label:this.label})}async close(){return l("plugin:window|close",{label:this.label})}async setDecorations(e){return l("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return l("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return l("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return l("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return l("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return l("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return l("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return l("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return l("plugin:window|set_focus",{label:this.label})}async setIcon(e){return l("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return l("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return l("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return l("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return l("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return l("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return l("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return l("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,(n=>{n.payload=x(n.payload),e(n)}))}async onMoved(e){return this.listen(u.WINDOW_MOVED,(n=>{n.payload=T(n.payload),e(n)}))}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,(n=>{const t=new D(n);Promise.resolve(e(t)).then((()=>{if(!t.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const n=await this.listen(u.WINDOW_FOCUS,(n=>{e({...n,payload:!0})})),t=await this.listen(u.WINDOW_BLUR,(n=>{e({...n,payload:!1})}));return()=>{n(),t()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(u.WINDOW_FILE_DROP,(n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:T(n.payload.position)}})})),t=await this.listen(u.WINDOW_FILE_DROP_HOVER,(n=>{e({...n,payload:{type:"hover",paths:n.payload.paths,position:T(n.payload.position)}})})),i=await this.listen(u.WINDOW_FILE_DROP_CANCELLED,(n=>{e({...n,payload:{type:"cancel"}})}));return()=>{n(),t(),i()}}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var S,P;function C(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:T(e.position),size:x(e.size)}}function T(e){return new b(e.x,e.y)}function x(e){return new _(e.width,e.height)}!function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(S||(S={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(P||(P={}));var F,z=Object.freeze({__proto__:null,CloseRequestedEvent:D,get Effect(){return S},get EffectState(){return P},LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_,get ProgressBarStatus(){return v},get UserAttentionType(){return f},Window:L,availableMonitors:async function(){return l("plugin:window|available_monitors").then((e=>e.map(C)))},currentMonitor:async function(){return l("plugin:window|current_monitor").then(C)},getAll:A,getCurrent:I,primaryMonitor:async function(){return l("plugin:window|primary_monitor").then(C)}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(F||(F={}));var R,M=Object.freeze({__proto__:null,get BaseDirectory(){return F},appCacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppCache})},appConfigDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppConfig})},appDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppData})},appLocalDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLocalData})},appLogDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLog})},audioDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Audio})},basename:async function(e,n){return l("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Cache})},configDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Config})},dataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Desktop})},dirname:async function(e){return l("plugin:path|dirname",{path:e})},documentDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Document})},downloadDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Download})},executableDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Executable})},extname:async function(e){return l("plugin:path|extname",{path:e})},fontDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Font})},homeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Home})},isAbsolute:async function(e){return l("plugin:path|isAbsolute",{path:e})},join:async function(...e){return l("plugin:path|join",{paths:e})},localDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.LocalData})},normalize:async function(e){return l("plugin:path|normalize",{path:e})},pictureDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Picture})},publicDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Public})},resolve:async function(...e){return l("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return l("plugin:path|resolve_directory",{directory:F.Resource,path:e})},resourceDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Resource})},runtimeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Temp})},templateDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Template})},videoDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Video})}});class W{get rid(){return n(this,R,"f")}constructor(e){R.set(this,void 0),t(this,R,e,"f")}async close(){return l("plugin:resources|close",{rid:this.rid})}}R=new WeakMap;class N extends W{constructor(e,n){super(e),this.id=n}static async new(e){e?.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e?.icon&&(e.icon="string"==typeof e.icon?e.icon:Array.from(e.icon));const n=new a;return e?.action&&(n.onmessage=e.action,delete e.action),l("plugin:tray|new",{options:e??{},handler:n}).then((([e,n])=>new N(e,n)))}async setIcon(e){let n=null;return e&&(n="string"==typeof e?e:Array.from(e)),l("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),l("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return l("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return l("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return l("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return l("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return l("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return l("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var O,U,B=Object.freeze({__proto__:null,TrayIcon:N});async function V(e,n){const t=new a;let i=null;return n&&"object"==typeof n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"items"in n&&n.items&&(i=n.items.map((e=>[e.rid,e.kind])))),l("plugin:menu|new",{kind:e,options:n?{...n,items:i}:void 0,handler:t})}class H extends W{get id(){return n(this,O,"f")}get kind(){return n(this,U,"f")}constructor(e,n,i){super(e),O.set(this,void 0),U.set(this,void 0),t(this,O,n,"f"),t(this,U,i,"f")}}function G([e,n,t]){switch(t){case"Submenu":return new j(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}O=new WeakMap,U=new WeakMap;let j=class e extends H{constructor(e,n){super(e,n,"Submenu")}static async new(n){return V("Submenu",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(G)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(G)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?G(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsWindowsMenuForNSApp(){return l("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return l("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};function q([e,n,t]){switch(t){case"Submenu":return new Submenu(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}class Q extends H{constructor(e,n){super(e,n,"Menu")}static async new(e){return V("Menu",e).then((([e,n])=>new Q(e,n)))}static async default(){return l("plugin:menu|default").then((([e,n])=>new Q(e,n)))}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(q)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(q)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?q(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsAppMenu(){return l("plugin:menu|set_as_app_menu",{rid:this.rid}).then((e=>e?new Q(e[0],e[1]):null))}async setAsWindowMenu(e){return l("plugin:menu|set_as_window_menu",{rid:this.rid,window:e?.label??null}).then((e=>e?new Q(e[0],e[1]):null))}}var $;!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}($||($={}));var Z=Object.freeze({__proto__:null,CheckMenuItem:class e extends H{constructor(e,n){super(e,n,"Check")}static async new(n){return V("Check",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return l("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return l("plugin:menu|set_checked",{rid:this.rid,checked:e})}},IconMenuItem:class e extends H{constructor(e,n){super(e,n,"Icon")}static async new(n){return V("Icon",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return l("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return l("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},Menu:Q,MenuItem:class e extends H{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return V("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},get NativeIcon(){return $},PredefinedMenuItem:class e extends H{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return V("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},Submenu:j});return e.app=c,e.dpi=k,e.event=g,e.menu=Z,e.path=M,e.primitives=o,e.tray=B,e.window=z,e}({});window.__TAURI__=__TAURI_IIFE__; diff --git a/examples/api/dist/assets/index.js b/examples/api/dist/assets/index.js index 4b7dfdebe3f..01bb316e6ab 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -33,7 +33,7 @@ var wr=Object.defineProperty;var kr=(t,e,n)=>e in t?wr(t,e,{enumerable:!0,config `),u=r("select");for(let T=0;Tt[89].call(u)),a(h,"class","input"),t[37]===void 0&&wt(()=>t[90].call(h)),a(_,"class","input"),a(_,"type","number"),a(n,"class","flex"),$t(L,"max-width","120px"),a(L,"class","input"),a(L,"type","number"),a(L,"placeholder","R"),$t(P,"max-width","120px"),a(P,"class","input"),a(P,"type","number"),a(P,"placeholder","G"),$t(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","B"),$t(q,"max-width","120px"),a(q,"class","input"),a(q,"type","number"),a(q,"placeholder","A"),a(D,"class","flex"),a(v,"class","flex"),a(ee,"class","btn"),$t(ee,"width","80px"),a(ie,"class","flex"),a(fe,"class","btn"),$t(fe,"width","80px"),a(B,"class","flex"),a(e,"class","flex flex-col gap-1")},m(T,J){S(T,e,J),i(e,n),i(n,l),i(l,s),i(l,u);for(let H=0;H=1,k,b,O,_=h&&Is(t),A=t[1][t[0]]&&zs(t);return{c(){e=r("div"),n=r("div"),l=r("input"),s=p(),u=r("button"),u.textContent="New window",d=p(),o=r("br"),c=p(),_&&_.c(),k=p(),A&&A.c(),a(l,"class","input grow"),a(l,"type","text"),a(l,"placeholder","New Window label.."),a(u,"class","btn"),a(n,"class","flex gap-1"),a(e,"class","flex flex-col children:grow gap-2")},m(v,E){S(v,e,E),i(e,n),i(n,l),z(l,t[28]),i(n,s),i(n,u),i(e,d),i(e,o),i(e,c),_&&_.m(e,null),i(e,k),A&&A.m(e,null),b||(O=[M(l,"input",t[58]),M(u,"click",t[53])],b=!0)},p(v,E){E[0]&268435456&&l.value!==v[28]&&z(l,v[28]),E[0]&2&&(h=Object.keys(v[1]).length>=1),h?_?_.p(v,E):(_=Is(v),_.c(),_.m(e,k)):_&&(_.d(1),_=null),v[1][v[0]]?A?A.p(v,E):(A=zs(v),A.c(),A.m(e,null)):A&&(A.d(1),A=null)},i:ne,o:ne,d(v){v&&C(e),_&&_.d(),A&&A.d(),b=!1,Ce(O)}}}function ta(t,e,n){const l=or();let s=l.label;const u={[l.label]:l},d=["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"],o=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],c=navigator.appVersion.includes("Windows"),h=navigator.appVersion.includes("Macintosh");let k=c?o:Object.keys(Gi).map(N=>Gi[N]).filter(N=>!o.includes(N));const b=Object.keys(Ki).map(N=>Ki[N]),O=Object.keys(ji).map(N=>ji[N]);let{onMessage:_}=e;const A=document.querySelector("main");let v,E=!0,V=!0,D=!0,L=!0,W=!1,P=!0,I=!1,R=!1,Y=!0,q=!1,Q=null,ie=null,ee=null,y=null,B=null,G=null,oe=null,Z=null,we=1,be=new it(oe,Z),fe=new it(oe,Z),ce=new ln(Q,ie),$=new ln(Q,ie),pe,K,le=!1,te=!0,T=null,J=null,H="default",re=!1,Le="Awesome Tauri Example!",ke=[],me,Oe,Ae,We,ge,_e,Se,Pe="none",de=0,Me;function ae(){u[s].setTitle(Le)}function Re(){u[s].hide(),setTimeout(u[s].show,2e3)}function De(){u[s].minimize(),setTimeout(u[s].unminimize,2e3)}function Ee(){if(!v)return;const N=new Rn(v);n(1,u[v]=N,u),N.once("tauri://error",function(){_("Error creating new webview")})}function ue(){u[s].innerSize().then(N=>{n(32,ce=N),n(12,Q=ce.width),n(13,ie=ce.height)}),u[s].outerSize().then(N=>{n(33,$=N)})}function F(){u[s].innerPosition().then(N=>{n(30,be=N)}),u[s].outerPosition().then(N=>{n(31,fe=N),n(18,oe=fe.x),n(19,Z=fe.y)})}async function x(N){N&&(pe&&pe(),K&&K(),K=await N.listen("tauri://move",F),pe=await N.listen("tauri://resize",ue))}async function U(){await u[s].minimize(),await u[s].requestUserAttention(Ni.Critical),await new Promise(N=>setTimeout(N,3e3)),await u[s].requestUserAttention(null)}async function Ie(){ke.includes(me)||n(35,ke=[...ke,me]);const N={effects:ke,state:Oe,radius:Ae};Number.isInteger(We)&&Number.isInteger(ge)&&Number.isInteger(_e)&&Number.isInteger(Se)&&(N.color=[We,ge,_e,Se]),A.classList.remove("bg-primary"),A.classList.remove("dark:bg-darkPrimary"),await u[s].clearEffects(),await u[s].setEffects(N)}async function Dn(){n(35,ke=[]),await u[s].clearEffects(),A.classList.add("bg-primary"),A.classList.add("dark:bg-darkPrimary")}function Fe(){v=this.value,n(28,v)}function Fn(){s=An(this),n(0,s),n(1,u)}function zt(){Me=this.value,n(43,Me)}const Hn=()=>u[s].center();function He(){W=this.checked,n(6,W)}function Un(){E=this.checked,n(2,E)}function lt(){V=this.checked,n(3,V)}function Ot(){D=this.checked,n(4,D)}function Bn(){L=this.checked,n(5,L)}function Ue(){P=this.checked,n(7,P)}function Vn(){I=this.checked,n(8,I)}function Wt(){R=this.checked,n(9,R)}function qn(){Y=this.checked,n(10,Y)}function Be(){q=this.checked,n(11,q)}function Nn(){oe=X(this.value),n(18,oe)}function st(){Z=X(this.value),n(19,Z)}function Rt(){Q=X(this.value),n(12,Q)}function jn(){ie=X(this.value),n(13,ie)}function Ge(){ee=X(this.value),n(14,ee)}function Gn(){y=X(this.value),n(15,y)}function Dt(){B=X(this.value),n(16,B)}function Kn(){G=X(this.value),n(17,G)}function Ke(){le=this.checked,n(20,le)}function Xn(){te=this.checked,n(21,te)}function rt(){re=this.checked,n(25,re)}function Ft(){H=An(this),n(24,H),n(44,d)}function Yn(){T=X(this.value),n(22,T)}function Ve(){J=X(this.value),n(23,J)}function Qn(){Le=this.value,n(34,Le)}function Ht(){Pe=An(this),n(26,Pe),n(49,O)}function Jn(){de=X(this.value),n(27,de)}function qe(){me=An(this),n(36,me),n(47,k)}function cn(){Oe=An(this),n(37,Oe),n(48,b)}function dn(){Ae=X(this.value),n(38,Ae)}function hn(){We=X(this.value),n(39,We)}function Te(){ge=X(this.value),n(40,ge)}function at(){_e=X(this.value),n(41,_e)}function Xe(){Se=X(this.value),n(42,Se)}return t.$$set=N=>{"onMessage"in N&&n(57,_=N.onMessage)},t.$$.update=()=>{var N,fn,kt,pn,yt,Ut,mn,vt,gn,Ct,Bt,_n,Ne,St,bn,Mt,wn,Lt,Vt,kn,At,yn,Pt,qt;t.$$.dirty[0]&3&&(u[s],F(),ue()),t.$$.dirty[0]&7&&((N=u[s])==null||N.setResizable(E)),t.$$.dirty[0]&11&&((fn=u[s])==null||fn.setMaximizable(V)),t.$$.dirty[0]&19&&((kt=u[s])==null||kt.setMinimizable(D)),t.$$.dirty[0]&35&&((pn=u[s])==null||pn.setClosable(L)),t.$$.dirty[0]&67&&(W?(yt=u[s])==null||yt.maximize():(Ut=u[s])==null||Ut.unmaximize()),t.$$.dirty[0]&131&&((mn=u[s])==null||mn.setDecorations(P)),t.$$.dirty[0]&259&&((vt=u[s])==null||vt.setAlwaysOnTop(I)),t.$$.dirty[0]&515&&((gn=u[s])==null||gn.setAlwaysOnBottom(R)),t.$$.dirty[0]&1027&&((Ct=u[s])==null||Ct.setContentProtected(Y)),t.$$.dirty[0]&2051&&((Bt=u[s])==null||Bt.setFullscreen(q)),t.$$.dirty[0]&12291&&Q&&ie&&((_n=u[s])==null||_n.setSize(new ln(Q,ie))),t.$$.dirty[0]&49155&&(ee&&y?(Ne=u[s])==null||Ne.setMinSize(new Ll(ee,y)):(St=u[s])==null||St.setMinSize(null)),t.$$.dirty[0]&196611&&(B>800&&G>400?(bn=u[s])==null||bn.setMaxSize(new Ll(B,G)):(Mt=u[s])==null||Mt.setMaxSize(null)),t.$$.dirty[0]&786435&&oe!==null&&Z!==null&&((wn=u[s])==null||wn.setPosition(new it(oe,Z))),t.$$.dirty[0]&3&&((Lt=u[s])==null||Lt.scaleFactor().then(Zn=>n(29,we=Zn))),t.$$.dirty[0]&3&&x(u[s]),t.$$.dirty[0]&1048579&&((Vt=u[s])==null||Vt.setCursorGrab(le)),t.$$.dirty[0]&2097155&&((kn=u[s])==null||kn.setCursorVisible(te)),t.$$.dirty[0]&16777219&&((At=u[s])==null||At.setCursorIcon(H)),t.$$.dirty[0]&12582915&&T!==null&&J!==null&&((yn=u[s])==null||yn.setCursorPosition(new it(T,J))),t.$$.dirty[0]&33554435&&((Pt=u[s])==null||Pt.setIgnoreCursorEvents(re)),t.$$.dirty[0]&201326595&&((qt=u[s])==null||qt.setProgressBar({status:Pe,progress:de}))},[s,u,E,V,D,L,W,P,I,R,Y,q,Q,ie,ee,y,B,G,oe,Z,le,te,T,J,H,re,Pe,de,v,we,be,fe,ce,$,Le,ke,me,Oe,Ae,We,ge,_e,Se,Me,d,c,h,k,b,O,ae,Re,De,Ee,U,Ie,Dn,_,Fe,Fn,zt,Hn,He,Un,lt,Ot,Bn,Ue,Vn,Wt,qn,Be,Nn,st,Rt,jn,Ge,Gn,Dt,Kn,Ke,Xn,rt,Ft,Yn,Ve,Qn,Ht,Jn,qe,cn,dn,hn,Te,at,Xe]}class na extends $e{constructor(e){super(),Ze(this,e,ta,ea,je,{onMessage:57},null,[-1,-1,-1,-1])}}function ia(t){let e;return{c(){e=r("div"),e.innerHTML='
Not available for Linux
',a(e,"class","flex flex-col gap-2")},m(n,l){S(n,e,l)},p:ne,i:ne,o:ne,d(n){n&&C(e)}}}function la(t,e,n){let{onMessage:l}=e;const s=window.constraints={audio:!0,video:!0};function u(o){const c=document.querySelector("video"),h=o.getVideoTracks();l("Got stream with constraints:",s),l(`Using video device: ${h[0].label}`),window.stream=o,c.srcObject=o}function d(o){if(o.name==="ConstraintNotSatisfiedError"){const c=s.video;l(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else o.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: ${o.name}`,o)}return Vi(async()=>{try{const o=await navigator.mediaDevices.getUserMedia(s);u(o)}catch(o){d(o)}}),er(()=>{var o;(o=window.stream)==null||o.getTracks().forEach(function(c){c.stop()})}),t.$$set=o=>{"onMessage"in o&&n(0,l=o.onMessage)},[l]}class sa extends $e{constructor(e){super(),Ze(this,e,la,ia,je,{onMessage:0})}}function ra(t){let e,n,l,s,u,d;return{c(){e=r("div"),n=r("button"),n.textContent="Show",l=p(),s=r("button"),s.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(s,"class","btn"),a(s,"id","hide")},m(o,c){S(o,e,c),i(e,n),i(e,l),i(e,s),u||(d=[M(n,"click",t[0]),M(s,"click",t[1])],u=!0)},p:ne,i:ne,o:ne,d(o){o&&C(e),u=!1,Ce(d)}}}function aa(t,e,n){let{onMessage:l}=e;function s(){u().then(()=>{setTimeout(()=>{Vr().then(()=>l("Shown app")).catch(l)},2e3)}).catch(l)}function u(){return qr().then(()=>l("Hide app")).catch(l)}return t.$$set=d=>{"onMessage"in d&&n(2,l=d.onMessage)},[s,u,l]}class ua extends $e{constructor(e){super(),Ze(this,e,aa,ra,je,{onMessage:2})}}var Hi;class cr{get rid(){return Wn(this,Hi,"f")}constructor(e){Hi.set(this,void 0),qi(this,Hi,e,"f")}async close(){return m("plugin:resources|close",{rid:this.rid})}}Hi=new WeakMap;var Ui,Bi;async function un(t,e){const n=new rr;let l=null;return e&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&e.items&&(l=e.items.map(s=>[s.rid,s.kind]))),m("plugin:menu|new",{kind:t,options:e?{...e,items:l}:void 0,handler:n})}class on extends cr{get id(){return Wn(this,Ui,"f")}get kind(){return Wn(this,Bi,"f")}constructor(e,n,l){super(e),Ui.set(this,void 0),Bi.set(this,void 0),qi(this,Ui,n,"f"),qi(this,Bi,l,"f")}}Ui=new WeakMap,Bi=new WeakMap;function vl([t,e,n]){switch(n){case"Submenu":return new dr(t,e);case"Predefined":return new PredefinedMenuItem(t,e);case"Check":return new CheckMenuItem(t,e);case"Icon":return new IconMenuItem(t,e);case"MenuItem":default:return new MenuItem(t,e)}}let dr=class hr extends on{constructor(e,n){super(e,n,"Submenu")}static async new(e){return un("Submenu",e).then(([n,l])=>new hr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(l=>[l.rid,l.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(vl)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(vl))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?vl(n):null)}async popup(e,n){let l=null;return e&&(l={type:e instanceof it?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:l})}async setAsWindowsMenuForNSApp(){return m("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return m("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}},oa=class fr extends on{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return un("MenuItem",e).then(([n,l])=>new fr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}};function Cl([t,e,n]){switch(n){case"Submenu":return new Submenu(t,e);case"Predefined":return new PredefinedMenuItem(t,e);case"Check":return new CheckMenuItem(t,e);case"Icon":return new IconMenuItem(t,e);case"MenuItem":default:return new MenuItem(t,e)}}class bt extends on{constructor(e,n){super(e,n,"Menu")}static async new(e){return un("Menu",e).then(([n,l])=>new bt(n,l))}static async default(){return m("plugin:menu|default").then(([e,n])=>new bt(e,n))}async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(l=>[l.rid,l.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(Cl)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(Cl))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?Cl(n):null)}async popup(e,n){let l=null;return e&&(l={type:e instanceof it?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:l})}async setAsAppMenu(){return m("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new bt(e[0],e[1]):null)}async setAsWindowMenu(e){return m("plugin:menu|set_as_window_menu",{rid:this.rid,window:(e==null?void 0:e.label)??null}).then(n=>n?new bt(n[0],n[1]):null)}}let pr=class mr extends on{constructor(e,n){super(e,n,"Check")}static async new(e){return un("Check",e).then(([n,l])=>new mr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return m("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return m("plugin:menu|set_checked",{rid:this.rid,checked:e})}};var Fs;(function(t){t.Add="Add",t.Advanced="Advanced",t.Bluetooth="Bluetooth",t.Bookmarks="Bookmarks",t.Caution="Caution",t.ColorPanel="ColorPanel",t.ColumnView="ColumnView",t.Computer="Computer",t.EnterFullScreen="EnterFullScreen",t.Everyone="Everyone",t.ExitFullScreen="ExitFullScreen",t.FlowView="FlowView",t.Folder="Folder",t.FolderBurnable="FolderBurnable",t.FolderSmart="FolderSmart",t.FollowLinkFreestanding="FollowLinkFreestanding",t.FontPanel="FontPanel",t.GoLeft="GoLeft",t.GoRight="GoRight",t.Home="Home",t.IChatTheater="IChatTheater",t.IconView="IconView",t.Info="Info",t.InvalidDataFreestanding="InvalidDataFreestanding",t.LeftFacingTriangle="LeftFacingTriangle",t.ListView="ListView",t.LockLocked="LockLocked",t.LockUnlocked="LockUnlocked",t.MenuMixedState="MenuMixedState",t.MenuOnState="MenuOnState",t.MobileMe="MobileMe",t.MultipleDocuments="MultipleDocuments",t.Network="Network",t.Path="Path",t.PreferencesGeneral="PreferencesGeneral",t.QuickLook="QuickLook",t.RefreshFreestanding="RefreshFreestanding",t.Refresh="Refresh",t.Remove="Remove",t.RevealFreestanding="RevealFreestanding",t.RightFacingTriangle="RightFacingTriangle",t.Share="Share",t.Slideshow="Slideshow",t.SmartBadge="SmartBadge",t.StatusAvailable="StatusAvailable",t.StatusNone="StatusNone",t.StatusPartiallyAvailable="StatusPartiallyAvailable",t.StatusUnavailable="StatusUnavailable",t.StopProgressFreestanding="StopProgressFreestanding",t.StopProgress="StopProgress",t.TrashEmpty="TrashEmpty",t.TrashFull="TrashFull",t.User="User",t.UserAccounts="UserAccounts",t.UserGroup="UserGroup",t.UserGuest="UserGuest"})(Fs||(Fs={}));let ca=class gr extends on{constructor(e,n){super(e,n,"Icon")}static async new(e){return un("Icon",e).then(([n,l])=>new gr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return m("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return m("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},da=class _r extends on{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return un("MenuItem",e).then(([n,l])=>new _r(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}};function Hs(t,e,n){const l=t.slice();return l[16]=e[n],l[17]=e,l[18]=n,l}function Us(t,e,n){const l=t.slice();return l[19]=e[n],l[20]=e,l[21]=n,l}function Bs(t){let e,n,l,s,u,d,o=t[19]+"",c,h,k,b,O;function _(){t[9].call(n,t[20],t[21])}return{c(){e=r("div"),n=r("input"),u=p(),d=r("label"),c=w(o),k=p(),a(n,"id",l=t[19]+"Input"),n.checked=s=t[0]===t[19],a(n,"type","radio"),a(n,"name","kind"),a(d,"for",h=t[19]+"Input"),a(e,"class","flex gap-1")},m(A,v){S(A,e,v),i(e,n),z(n,t[19]),i(e,u),i(e,d),i(d,c),i(e,k),b||(O=[M(n,"change",t[6]),M(n,"change",_)],b=!0)},p(A,v){t=A,v&16&&l!==(l=t[19]+"Input")&&a(n,"id",l),v&17&&s!==(s=t[0]===t[19])&&(n.checked=s),v&16&&z(n,t[19]),v&16&&o!==(o=t[19]+"")&&se(c,o),v&16&&h!==(h=t[19]+"Input")&&a(d,"for",h)},d(A){A&&C(e),b=!1,Ce(O)}}}function Vs(t){let e,n,l;return{c(){e=r("input"),a(e,"class","input"),a(e,"type","text"),a(e,"placeholder","Text")},m(s,u){S(s,e,u),z(e,t[1]),n||(l=M(e,"input",t[10]),n=!0)},p(s,u){u&2&&e.value!==s[1]&&z(e,s[1])},d(s){s&&C(e),n=!1,l()}}}function ha(t){let e,n=he(t[5]),l=[];for(let s=0;sl("itemClick",{id:I,text:P})},W=await oa.new(L);break;case"Icon":L={text:u,icon:d,action:I=>l("itemClick",{id:I,text:P})},W=await ca.new(L);break;case"Check":L={text:u,checked:c,action:I=>l("itemClick",{id:I,text:P})},W=await pr.new(L);break;case"Predefined":L={item:o},W=await da.new(L);break}l("new",{item:W,options:L}),n(1,u=""),o=""}function A(L,W){L[W]=this.value,n(4,h)}function v(){u=this.value,n(1,u)}function E(){d=this.value,n(2,d)}function V(){c=this.checked,n(3,c)}function D(L,W){L[W]=this.value,n(5,k)}return[s,u,d,c,h,k,b,O,_,A,v,E,V,D]}class _a extends $e{constructor(e){super(),Ze(this,e,ga,ma,je,{})}}function Ns(t,e,n){const l=t.slice();return l[5]=e[n],l}function js(t){let e,n,l,s,u,d=Gs(t[5])+"",o,c;return{c(){e=r("div"),n=r("div"),s=p(),u=r("p"),o=w(d),c=p(),a(n,"class",l=t[3](t[5])),a(e,"class","flex flex-row gap-1")},m(h,k){S(h,e,k),i(e,n),i(e,s),i(e,u),i(u,o),i(e,c)},p(h,k){k&1&&l!==(l=h[3](h[5]))&&a(n,"class",l),k&1&&d!==(d=Gs(h[5])+"")&&se(o,d)},d(h){h&&C(e)}}}function ba(t){let e,n,l,s,u;n=new _a({}),n.$on("new",t[1]),n.$on("itemClick",t[2]);let d=he(t[0]),o=[];for(let c=0;c{"items"in c&&n(0,l=c.items)},[l,u,d,o]}class br extends $e{constructor(e){super(),Ze(this,e,wa,ba,je,{items:0})}}function ka(t){let e,n,l,s,u,d,o,c,h,k;function b(_){t[5](_)}let O={};return t[0]!==void 0&&(O.items=t[0]),n=new br({props:O}),Tn.push(()=>lr(n,"items",b)),n.$on("itemClick",t[3]),{c(){e=r("div"),On(n.$$.fragment),s=p(),u=r("button"),u.textContent="Create menu",d=p(),o=r("button"),o.textContent="Popup",a(u,"class","btn"),a(o,"class","btn")},m(_,A){S(_,e,A),rn(n,e,null),i(e,s),i(e,u),i(e,d),i(e,o),c=!0,h||(k=[M(u,"click",t[1]),M(o,"click",t[2])],h=!0)},p(_,[A]){const v={};!l&&A&1&&(l=!0,v.items=_[0],nr(()=>l=!1)),n.$set(v)},i(_){c||(sn(n.$$.fragment,_),c=!0)},o(_){zn(n.$$.fragment,_),c=!1},d(_){_&&C(e),an(n),h=!1,Ce(k)}}}function ya(t,e,n){let{onMessage:l}=e,s=[],u=null,d=null,o=0;const c=navigator.userAgent.includes("Macintosh");async function h(){d=await dr.new({text:"app",items:s.map(_=>_.item)}),o=s.length,u=await bt.new({items:[d]}),await(c?u.setAsAppMenu():u.setAsWindowMenu())}async function k(){(!d||o!==s.length)&&await h(),(await bt.new({items:[d]})).popup()}function b(_){l(`Item ${_.detail.text} clicked`)}function O(_){s=_,n(0,s)}return t.$$set=_=>{"onMessage"in _&&n(4,l=_.onMessage)},[s,h,k,b,l,O]}class va extends $e{constructor(e){super(),Ze(this,e,ya,ka,je,{onMessage:4})}}class Il extends cr{constructor(e,n){super(e),this.id=n}static async new(e){e!=null&&e.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e!=null&&e.icon&&(e.icon=typeof e.icon=="string"?e.icon:Array.from(e.icon));const n=new rr;return e!=null&&e.action&&(n.onmessage=e.action,delete e.action),m("plugin:tray|new",{options:e??{},handler:n}).then(([l,s])=>new Il(l,s))}async setIcon(e){let n=null;return e&&(n=typeof e=="string"?e:Array.from(e)),m("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),m("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return m("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return m("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return m("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return m("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return m("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return m("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}function Ca(t){let e,n,l,s,u,d,o,c,h,k,b,O,_,A,v,E,V,D,L,W,P,I,R,Y,q,Q;function ie(y){t[14](y)}let ee={};return t[5]!==void 0&&(ee.items=t[5]),L=new br({props:ee}),Tn.push(()=>lr(L,"items",ie)),L.$on("itemClick",t[6]),{c(){e=r("div"),n=r("div"),l=r("input"),s=p(),u=r("input"),d=p(),o=r("label"),c=w(`Menu on left click + `),D=r("div"),L=r("input"),W=p(),P=r("input"),I=p(),R=r("input"),Y=p(),q=r("input"),Q=p(),ie=r("div"),ee=r("button"),ee.textContent="Add",y=p(),B=r("div"),G=r("div"),oe=w("Applied effects: "),we=w(Z),be=p(),fe=r("button"),fe.textContent="Clear",a(u,"class","input"),t[36]===void 0&&wt(()=>t[89].call(u)),a(h,"class","input"),t[37]===void 0&&wt(()=>t[90].call(h)),a(_,"class","input"),a(_,"type","number"),a(n,"class","flex"),$t(L,"max-width","120px"),a(L,"class","input"),a(L,"type","number"),a(L,"placeholder","R"),$t(P,"max-width","120px"),a(P,"class","input"),a(P,"type","number"),a(P,"placeholder","G"),$t(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","B"),$t(q,"max-width","120px"),a(q,"class","input"),a(q,"type","number"),a(q,"placeholder","A"),a(D,"class","flex"),a(v,"class","flex"),a(ee,"class","btn"),$t(ee,"width","80px"),a(ie,"class","flex"),a(fe,"class","btn"),$t(fe,"width","80px"),a(B,"class","flex"),a(e,"class","flex flex-col gap-1")},m(T,J){S(T,e,J),i(e,n),i(n,l),i(l,s),i(l,u);for(let H=0;H=1,k,b,O,_=h&&Is(t),A=t[1][t[0]]&&zs(t);return{c(){e=r("div"),n=r("div"),l=r("input"),s=p(),u=r("button"),u.textContent="New window",d=p(),o=r("br"),c=p(),_&&_.c(),k=p(),A&&A.c(),a(l,"class","input grow"),a(l,"type","text"),a(l,"placeholder","New Window label.."),a(u,"class","btn"),a(n,"class","flex gap-1"),a(e,"class","flex flex-col children:grow gap-2")},m(v,E){S(v,e,E),i(e,n),i(n,l),z(l,t[28]),i(n,s),i(n,u),i(e,d),i(e,o),i(e,c),_&&_.m(e,null),i(e,k),A&&A.m(e,null),b||(O=[M(l,"input",t[58]),M(u,"click",t[53])],b=!0)},p(v,E){E[0]&268435456&&l.value!==v[28]&&z(l,v[28]),E[0]&2&&(h=Object.keys(v[1]).length>=1),h?_?_.p(v,E):(_=Is(v),_.c(),_.m(e,k)):_&&(_.d(1),_=null),v[1][v[0]]?A?A.p(v,E):(A=zs(v),A.c(),A.m(e,null)):A&&(A.d(1),A=null)},i:ne,o:ne,d(v){v&&C(e),_&&_.d(),A&&A.d(),b=!1,Ce(O)}}}function ta(t,e,n){const l=or();let s=l.label;const u={[l.label]:l},d=["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"],o=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],c=navigator.appVersion.includes("Windows"),h=navigator.appVersion.includes("Macintosh");let k=c?o:Object.keys(Gi).map(N=>Gi[N]).filter(N=>!o.includes(N));const b=Object.keys(Ki).map(N=>Ki[N]),O=Object.keys(ji).map(N=>ji[N]);let{onMessage:_}=e;const A=document.querySelector("main");let v,E=!0,V=!0,D=!0,L=!0,W=!1,P=!0,I=!1,R=!1,Y=!0,q=!1,Q=null,ie=null,ee=null,y=null,B=null,G=null,oe=null,Z=null,we=1,be=new it(oe,Z),fe=new it(oe,Z),ce=new ln(Q,ie),$=new ln(Q,ie),pe,K,le=!1,te=!0,T=null,J=null,H="default",re=!1,Le="Awesome Tauri Example!",ke=[],me,Oe,Ae,We,ge,_e,Se,Pe="none",de=0,Me;function ae(){u[s].setTitle(Le)}function Re(){u[s].hide(),setTimeout(u[s].show,2e3)}function De(){u[s].minimize(),setTimeout(u[s].unminimize,2e3)}function Ee(){if(!v)return;const N=new Rn(v);n(1,u[v]=N,u),N.once("tauri://error",function(){_("Error creating new webview")})}function ue(){u[s].innerSize().then(N=>{n(32,ce=N),n(12,Q=ce.width),n(13,ie=ce.height)}),u[s].outerSize().then(N=>{n(33,$=N)})}function F(){u[s].innerPosition().then(N=>{n(30,be=N)}),u[s].outerPosition().then(N=>{n(31,fe=N),n(18,oe=fe.x),n(19,Z=fe.y)})}async function x(N){N&&(pe&&pe(),K&&K(),K=await N.listen("tauri://move",F),pe=await N.listen("tauri://resize",ue))}async function U(){await u[s].minimize(),await u[s].requestUserAttention(Ni.Critical),await new Promise(N=>setTimeout(N,3e3)),await u[s].requestUserAttention(null)}async function Ie(){ke.includes(me)||n(35,ke=[...ke,me]);const N={effects:ke,state:Oe,radius:Ae};Number.isInteger(We)&&Number.isInteger(ge)&&Number.isInteger(_e)&&Number.isInteger(Se)&&(N.color=[We,ge,_e,Se]),A.classList.remove("bg-primary"),A.classList.remove("dark:bg-darkPrimary"),await u[s].clearEffects(),await u[s].setEffects(N)}async function Dn(){n(35,ke=[]),await u[s].clearEffects(),A.classList.add("bg-primary"),A.classList.add("dark:bg-darkPrimary")}function Fe(){v=this.value,n(28,v)}function Fn(){s=An(this),n(0,s),n(1,u)}function zt(){Me=this.value,n(43,Me)}const Hn=()=>u[s].center();function He(){W=this.checked,n(6,W)}function Un(){E=this.checked,n(2,E)}function lt(){V=this.checked,n(3,V)}function Ot(){D=this.checked,n(4,D)}function Bn(){L=this.checked,n(5,L)}function Ue(){P=this.checked,n(7,P)}function Vn(){I=this.checked,n(8,I)}function Wt(){R=this.checked,n(9,R)}function qn(){Y=this.checked,n(10,Y)}function Be(){q=this.checked,n(11,q)}function Nn(){oe=X(this.value),n(18,oe)}function st(){Z=X(this.value),n(19,Z)}function Rt(){Q=X(this.value),n(12,Q)}function jn(){ie=X(this.value),n(13,ie)}function Ge(){ee=X(this.value),n(14,ee)}function Gn(){y=X(this.value),n(15,y)}function Dt(){B=X(this.value),n(16,B)}function Kn(){G=X(this.value),n(17,G)}function Ke(){le=this.checked,n(20,le)}function Xn(){te=this.checked,n(21,te)}function rt(){re=this.checked,n(25,re)}function Ft(){H=An(this),n(24,H),n(44,d)}function Yn(){T=X(this.value),n(22,T)}function Ve(){J=X(this.value),n(23,J)}function Qn(){Le=this.value,n(34,Le)}function Ht(){Pe=An(this),n(26,Pe),n(49,O)}function Jn(){de=X(this.value),n(27,de)}function qe(){me=An(this),n(36,me),n(47,k)}function cn(){Oe=An(this),n(37,Oe),n(48,b)}function dn(){Ae=X(this.value),n(38,Ae)}function hn(){We=X(this.value),n(39,We)}function Te(){ge=X(this.value),n(40,ge)}function at(){_e=X(this.value),n(41,_e)}function Xe(){Se=X(this.value),n(42,Se)}return t.$$set=N=>{"onMessage"in N&&n(57,_=N.onMessage)},t.$$.update=()=>{var N,fn,kt,pn,yt,Ut,mn,vt,gn,Ct,Bt,_n,Ne,St,bn,Mt,wn,Lt,Vt,kn,At,yn,Pt,qt;t.$$.dirty[0]&3&&(u[s],F(),ue()),t.$$.dirty[0]&7&&((N=u[s])==null||N.setResizable(E)),t.$$.dirty[0]&11&&((fn=u[s])==null||fn.setMaximizable(V)),t.$$.dirty[0]&19&&((kt=u[s])==null||kt.setMinimizable(D)),t.$$.dirty[0]&35&&((pn=u[s])==null||pn.setClosable(L)),t.$$.dirty[0]&67&&(W?(yt=u[s])==null||yt.maximize():(Ut=u[s])==null||Ut.unmaximize()),t.$$.dirty[0]&131&&((mn=u[s])==null||mn.setDecorations(P)),t.$$.dirty[0]&259&&((vt=u[s])==null||vt.setAlwaysOnTop(I)),t.$$.dirty[0]&515&&((gn=u[s])==null||gn.setAlwaysOnBottom(R)),t.$$.dirty[0]&1027&&((Ct=u[s])==null||Ct.setContentProtected(Y)),t.$$.dirty[0]&2051&&((Bt=u[s])==null||Bt.setFullscreen(q)),t.$$.dirty[0]&12291&&Q&&ie&&((_n=u[s])==null||_n.setSize(new ln(Q,ie))),t.$$.dirty[0]&49155&&(ee&&y?(Ne=u[s])==null||Ne.setMinSize(new Ll(ee,y)):(St=u[s])==null||St.setMinSize(null)),t.$$.dirty[0]&196611&&(B>800&&G>400?(bn=u[s])==null||bn.setMaxSize(new Ll(B,G)):(Mt=u[s])==null||Mt.setMaxSize(null)),t.$$.dirty[0]&786435&&oe!==null&&Z!==null&&((wn=u[s])==null||wn.setPosition(new it(oe,Z))),t.$$.dirty[0]&3&&((Lt=u[s])==null||Lt.scaleFactor().then(Zn=>n(29,we=Zn))),t.$$.dirty[0]&3&&x(u[s]),t.$$.dirty[0]&1048579&&((Vt=u[s])==null||Vt.setCursorGrab(le)),t.$$.dirty[0]&2097155&&((kn=u[s])==null||kn.setCursorVisible(te)),t.$$.dirty[0]&16777219&&((At=u[s])==null||At.setCursorIcon(H)),t.$$.dirty[0]&12582915&&T!==null&&J!==null&&((yn=u[s])==null||yn.setCursorPosition(new it(T,J))),t.$$.dirty[0]&33554435&&((Pt=u[s])==null||Pt.setIgnoreCursorEvents(re)),t.$$.dirty[0]&201326595&&((qt=u[s])==null||qt.setProgressBar({status:Pe,progress:de}))},[s,u,E,V,D,L,W,P,I,R,Y,q,Q,ie,ee,y,B,G,oe,Z,le,te,T,J,H,re,Pe,de,v,we,be,fe,ce,$,Le,ke,me,Oe,Ae,We,ge,_e,Se,Me,d,c,h,k,b,O,ae,Re,De,Ee,U,Ie,Dn,_,Fe,Fn,zt,Hn,He,Un,lt,Ot,Bn,Ue,Vn,Wt,qn,Be,Nn,st,Rt,jn,Ge,Gn,Dt,Kn,Ke,Xn,rt,Ft,Yn,Ve,Qn,Ht,Jn,qe,cn,dn,hn,Te,at,Xe]}class na extends $e{constructor(e){super(),Ze(this,e,ta,ea,je,{onMessage:57},null,[-1,-1,-1,-1])}}function ia(t){let e;return{c(){e=r("div"),e.innerHTML='
Not available for Linux
',a(e,"class","flex flex-col gap-2")},m(n,l){S(n,e,l)},p:ne,i:ne,o:ne,d(n){n&&C(e)}}}function la(t,e,n){let{onMessage:l}=e;const s=window.constraints={audio:!0,video:!0};function u(o){const c=document.querySelector("video"),h=o.getVideoTracks();l("Got stream with constraints:",s),l(`Using video device: ${h[0].label}`),window.stream=o,c.srcObject=o}function d(o){if(o.name==="ConstraintNotSatisfiedError"){const c=s.video;l(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else o.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: ${o.name}`,o)}return Vi(async()=>{try{const o=await navigator.mediaDevices.getUserMedia(s);u(o)}catch(o){d(o)}}),er(()=>{var o;(o=window.stream)==null||o.getTracks().forEach(function(c){c.stop()})}),t.$$set=o=>{"onMessage"in o&&n(0,l=o.onMessage)},[l]}class sa extends $e{constructor(e){super(),Ze(this,e,la,ia,je,{onMessage:0})}}function ra(t){let e,n,l,s,u,d;return{c(){e=r("div"),n=r("button"),n.textContent="Show",l=p(),s=r("button"),s.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(s,"class","btn"),a(s,"id","hide")},m(o,c){S(o,e,c),i(e,n),i(e,l),i(e,s),u||(d=[M(n,"click",t[0]),M(s,"click",t[1])],u=!0)},p:ne,i:ne,o:ne,d(o){o&&C(e),u=!1,Ce(d)}}}function aa(t,e,n){let{onMessage:l}=e;function s(){u().then(()=>{setTimeout(()=>{Vr().then(()=>l("Shown app")).catch(l)},2e3)}).catch(l)}function u(){return qr().then(()=>l("Hide app")).catch(l)}return t.$$set=d=>{"onMessage"in d&&n(2,l=d.onMessage)},[s,u,l]}class ua extends $e{constructor(e){super(),Ze(this,e,aa,ra,je,{onMessage:2})}}var Hi;class cr{get rid(){return Wn(this,Hi,"f")}constructor(e){Hi.set(this,void 0),qi(this,Hi,e,"f")}async close(){return m("plugin:resources|close",{rid:this.rid})}}Hi=new WeakMap;var Ui,Bi;async function un(t,e){const n=new rr;let l=null;return e&&typeof e=="object"&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&e.items&&(l=e.items.map(s=>[s.rid,s.kind]))),m("plugin:menu|new",{kind:t,options:e?{...e,items:l}:void 0,handler:n})}class on extends cr{get id(){return Wn(this,Ui,"f")}get kind(){return Wn(this,Bi,"f")}constructor(e,n,l){super(e),Ui.set(this,void 0),Bi.set(this,void 0),qi(this,Ui,n,"f"),qi(this,Bi,l,"f")}}Ui=new WeakMap,Bi=new WeakMap;function vl([t,e,n]){switch(n){case"Submenu":return new dr(t,e);case"Predefined":return new PredefinedMenuItem(t,e);case"Check":return new CheckMenuItem(t,e);case"Icon":return new IconMenuItem(t,e);case"MenuItem":default:return new MenuItem(t,e)}}let dr=class hr extends on{constructor(e,n){super(e,n,"Submenu")}static async new(e){return un("Submenu",e).then(([n,l])=>new hr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(l=>[l.rid,l.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(vl)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(vl))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?vl(n):null)}async popup(e,n){let l=null;return e&&(l={type:e instanceof it?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:l})}async setAsWindowsMenuForNSApp(){return m("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return m("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}},oa=class fr extends on{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return un("MenuItem",e).then(([n,l])=>new fr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}};function Cl([t,e,n]){switch(n){case"Submenu":return new Submenu(t,e);case"Predefined":return new PredefinedMenuItem(t,e);case"Check":return new CheckMenuItem(t,e);case"Icon":return new IconMenuItem(t,e);case"MenuItem":default:return new MenuItem(t,e)}}class bt extends on{constructor(e,n){super(e,n,"Menu")}static async new(e){return un("Menu",e).then(([n,l])=>new bt(n,l))}static async default(){return m("plugin:menu|default").then(([e,n])=>new bt(e,n))}async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(l=>[l.rid,l.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(Cl)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(Cl))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?Cl(n):null)}async popup(e,n){let l=null;return e&&(l={type:e instanceof it?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:l})}async setAsAppMenu(){return m("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new bt(e[0],e[1]):null)}async setAsWindowMenu(e){return m("plugin:menu|set_as_window_menu",{rid:this.rid,window:(e==null?void 0:e.label)??null}).then(n=>n?new bt(n[0],n[1]):null)}}let pr=class mr extends on{constructor(e,n){super(e,n,"Check")}static async new(e){return un("Check",e).then(([n,l])=>new mr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return m("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return m("plugin:menu|set_checked",{rid:this.rid,checked:e})}};var Fs;(function(t){t.Add="Add",t.Advanced="Advanced",t.Bluetooth="Bluetooth",t.Bookmarks="Bookmarks",t.Caution="Caution",t.ColorPanel="ColorPanel",t.ColumnView="ColumnView",t.Computer="Computer",t.EnterFullScreen="EnterFullScreen",t.Everyone="Everyone",t.ExitFullScreen="ExitFullScreen",t.FlowView="FlowView",t.Folder="Folder",t.FolderBurnable="FolderBurnable",t.FolderSmart="FolderSmart",t.FollowLinkFreestanding="FollowLinkFreestanding",t.FontPanel="FontPanel",t.GoLeft="GoLeft",t.GoRight="GoRight",t.Home="Home",t.IChatTheater="IChatTheater",t.IconView="IconView",t.Info="Info",t.InvalidDataFreestanding="InvalidDataFreestanding",t.LeftFacingTriangle="LeftFacingTriangle",t.ListView="ListView",t.LockLocked="LockLocked",t.LockUnlocked="LockUnlocked",t.MenuMixedState="MenuMixedState",t.MenuOnState="MenuOnState",t.MobileMe="MobileMe",t.MultipleDocuments="MultipleDocuments",t.Network="Network",t.Path="Path",t.PreferencesGeneral="PreferencesGeneral",t.QuickLook="QuickLook",t.RefreshFreestanding="RefreshFreestanding",t.Refresh="Refresh",t.Remove="Remove",t.RevealFreestanding="RevealFreestanding",t.RightFacingTriangle="RightFacingTriangle",t.Share="Share",t.Slideshow="Slideshow",t.SmartBadge="SmartBadge",t.StatusAvailable="StatusAvailable",t.StatusNone="StatusNone",t.StatusPartiallyAvailable="StatusPartiallyAvailable",t.StatusUnavailable="StatusUnavailable",t.StopProgressFreestanding="StopProgressFreestanding",t.StopProgress="StopProgress",t.TrashEmpty="TrashEmpty",t.TrashFull="TrashFull",t.User="User",t.UserAccounts="UserAccounts",t.UserGroup="UserGroup",t.UserGuest="UserGuest"})(Fs||(Fs={}));let ca=class gr extends on{constructor(e,n){super(e,n,"Icon")}static async new(e){return un("Icon",e).then(([n,l])=>new gr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return m("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return m("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},da=class _r extends on{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return un("MenuItem",e).then(([n,l])=>new _r(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}};function Hs(t,e,n){const l=t.slice();return l[16]=e[n],l[17]=e,l[18]=n,l}function Us(t,e,n){const l=t.slice();return l[19]=e[n],l[20]=e,l[21]=n,l}function Bs(t){let e,n,l,s,u,d,o=t[19]+"",c,h,k,b,O;function _(){t[9].call(n,t[20],t[21])}return{c(){e=r("div"),n=r("input"),u=p(),d=r("label"),c=w(o),k=p(),a(n,"id",l=t[19]+"Input"),n.checked=s=t[0]===t[19],a(n,"type","radio"),a(n,"name","kind"),a(d,"for",h=t[19]+"Input"),a(e,"class","flex gap-1")},m(A,v){S(A,e,v),i(e,n),z(n,t[19]),i(e,u),i(e,d),i(d,c),i(e,k),b||(O=[M(n,"change",t[6]),M(n,"change",_)],b=!0)},p(A,v){t=A,v&16&&l!==(l=t[19]+"Input")&&a(n,"id",l),v&17&&s!==(s=t[0]===t[19])&&(n.checked=s),v&16&&z(n,t[19]),v&16&&o!==(o=t[19]+"")&&se(c,o),v&16&&h!==(h=t[19]+"Input")&&a(d,"for",h)},d(A){A&&C(e),b=!1,Ce(O)}}}function Vs(t){let e,n,l;return{c(){e=r("input"),a(e,"class","input"),a(e,"type","text"),a(e,"placeholder","Text")},m(s,u){S(s,e,u),z(e,t[1]),n||(l=M(e,"input",t[10]),n=!0)},p(s,u){u&2&&e.value!==s[1]&&z(e,s[1])},d(s){s&&C(e),n=!1,l()}}}function ha(t){let e,n=he(t[5]),l=[];for(let s=0;sl("itemClick",{id:I,text:P})},W=await oa.new(L);break;case"Icon":L={text:u,icon:d,action:I=>l("itemClick",{id:I,text:P})},W=await ca.new(L);break;case"Check":L={text:u,checked:c,action:I=>l("itemClick",{id:I,text:P})},W=await pr.new(L);break;case"Predefined":L={item:o},W=await da.new(L);break}l("new",{item:W,options:L}),n(1,u=""),o=""}function A(L,W){L[W]=this.value,n(4,h)}function v(){u=this.value,n(1,u)}function E(){d=this.value,n(2,d)}function V(){c=this.checked,n(3,c)}function D(L,W){L[W]=this.value,n(5,k)}return[s,u,d,c,h,k,b,O,_,A,v,E,V,D]}class _a extends $e{constructor(e){super(),Ze(this,e,ga,ma,je,{})}}function Ns(t,e,n){const l=t.slice();return l[5]=e[n],l}function js(t){let e,n,l,s,u,d=Gs(t[5])+"",o,c;return{c(){e=r("div"),n=r("div"),s=p(),u=r("p"),o=w(d),c=p(),a(n,"class",l=t[3](t[5])),a(e,"class","flex flex-row gap-1")},m(h,k){S(h,e,k),i(e,n),i(e,s),i(e,u),i(u,o),i(e,c)},p(h,k){k&1&&l!==(l=h[3](h[5]))&&a(n,"class",l),k&1&&d!==(d=Gs(h[5])+"")&&se(o,d)},d(h){h&&C(e)}}}function ba(t){let e,n,l,s,u;n=new _a({}),n.$on("new",t[1]),n.$on("itemClick",t[2]);let d=he(t[0]),o=[];for(let c=0;c{"items"in c&&n(0,l=c.items)},[l,u,d,o]}class br extends $e{constructor(e){super(),Ze(this,e,wa,ba,je,{items:0})}}function ka(t){let e,n,l,s,u,d,o,c,h,k;function b(_){t[5](_)}let O={};return t[0]!==void 0&&(O.items=t[0]),n=new br({props:O}),Tn.push(()=>lr(n,"items",b)),n.$on("itemClick",t[3]),{c(){e=r("div"),On(n.$$.fragment),s=p(),u=r("button"),u.textContent="Create menu",d=p(),o=r("button"),o.textContent="Popup",a(u,"class","btn"),a(o,"class","btn")},m(_,A){S(_,e,A),rn(n,e,null),i(e,s),i(e,u),i(e,d),i(e,o),c=!0,h||(k=[M(u,"click",t[1]),M(o,"click",t[2])],h=!0)},p(_,[A]){const v={};!l&&A&1&&(l=!0,v.items=_[0],nr(()=>l=!1)),n.$set(v)},i(_){c||(sn(n.$$.fragment,_),c=!0)},o(_){zn(n.$$.fragment,_),c=!1},d(_){_&&C(e),an(n),h=!1,Ce(k)}}}function ya(t,e,n){let{onMessage:l}=e,s=[],u=null,d=null,o=0;const c=navigator.userAgent.includes("Macintosh");async function h(){d=await dr.new({text:"app",items:s.map(_=>_.item)}),o=s.length,u=await bt.new({items:[d]}),await(c?u.setAsAppMenu():u.setAsWindowMenu())}async function k(){(!d||o!==s.length)&&await h(),(await bt.new({items:[d]})).popup()}function b(_){l(`Item ${_.detail.text} clicked`)}function O(_){s=_,n(0,s)}return t.$$set=_=>{"onMessage"in _&&n(4,l=_.onMessage)},[s,h,k,b,l,O]}class va extends $e{constructor(e){super(),Ze(this,e,ya,ka,je,{onMessage:4})}}class Il extends cr{constructor(e,n){super(e),this.id=n}static async new(e){e!=null&&e.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e!=null&&e.icon&&(e.icon=typeof e.icon=="string"?e.icon:Array.from(e.icon));const n=new rr;return e!=null&&e.action&&(n.onmessage=e.action,delete e.action),m("plugin:tray|new",{options:e??{},handler:n}).then(([l,s])=>new Il(l,s))}async setIcon(e){let n=null;return e&&(n=typeof e=="string"?e:Array.from(e)),m("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),m("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return m("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return m("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return m("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return m("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return m("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return m("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}function Ca(t){let e,n,l,s,u,d,o,c,h,k,b,O,_,A,v,E,V,D,L,W,P,I,R,Y,q,Q;function ie(y){t[14](y)}let ee={};return t[5]!==void 0&&(ee.items=t[5]),L=new br({props:ee}),Tn.push(()=>lr(L,"items",ie)),L.$on("itemClick",t[6]),{c(){e=r("div"),n=r("div"),l=r("input"),s=p(),u=r("input"),d=p(),o=r("label"),c=w(`Menu on left click `),h=r("input"),k=p(),b=r("div"),O=r("input"),_=p(),A=r("label"),v=w(`Icon as template `),E=r("input"),V=p(),D=r("div"),On(L.$$.fragment),P=p(),I=r("div"),R=r("button"),R.textContent="Create tray",a(l,"class","input grow"),a(l,"type","text"),a(l,"placeholder","Title"),a(u,"class","input grow"),a(u,"type","text"),a(u,"placeholder","Tooltip"),a(h,"type","checkbox"),a(n,"class","flex gap-1"),a(O,"class","input grow"),a(O,"type","text"),a(O,"placeholder","Icon path"),a(E,"type","checkbox"),a(b,"class","flex gap-1"),a(D,"class","flex children:grow"),a(R,"class","btn"),a(R,"title","Creates the tray icon"),a(I,"class","flex"),a(e,"class","flex flex-col children:grow gap-2")},m(y,B){S(y,e,B),i(e,n),i(n,l),z(l,t[2]),i(n,s),i(n,u),z(u,t[1]),i(n,d),i(n,o),i(o,c),i(o,h),h.checked=t[4],i(e,k),i(e,b),i(b,O),z(O,t[0]),i(b,_),i(b,A),i(A,v),i(A,E),E.checked=t[3],i(e,V),i(e,D),rn(L,D,null),i(e,P),i(e,I),i(I,R),Y=!0,q||(Q=[M(l,"input",t[9]),M(u,"input",t[10]),M(h,"change",t[11]),M(O,"input",t[12]),M(E,"change",t[13]),M(R,"click",t[7])],q=!0)},p(y,[B]){B&4&&l.value!==y[2]&&z(l,y[2]),B&2&&u.value!==y[1]&&z(u,y[1]),B&16&&(h.checked=y[4]),B&1&&O.value!==y[0]&&z(O,y[0]),B&8&&(E.checked=y[3]);const G={};!W&&B&32&&(W=!0,G.items=y[5],nr(()=>W=!1)),L.$set(G)},i(y){Y||(sn(L.$$.fragment,y),Y=!0)},o(y){zn(L.$$.fragment,y),Y=!1},d(y){y&&C(e),an(L),q=!1,Ce(Q)}}}function Sa(t,e,n){let{onMessage:l}=e,s=null,u=null,d=null,o=!1,c=!0,h=[];function k(D){l(`Item ${D.detail.text} clicked`)}async function b(){Il.new({icon:s,tooltip:u,title:d,iconAsTemplate:o,menuOnLeftClick:c,menu:await bt.new({items:h.map(D=>D.item)}),action:D=>l(D)}).catch(l)}function O(){d=this.value,n(2,d)}function _(){u=this.value,n(1,u)}function A(){c=this.checked,n(4,c)}function v(){s=this.value,n(0,s)}function E(){o=this.checked,n(3,o)}function V(D){h=D,n(5,h)}return t.$$set=D=>{"onMessage"in D&&n(8,l=D.onMessage)},[s,u,d,o,c,h,k,b,l,O,_,A,v,E,V]}class Ma extends $e{constructor(e){super(),Ze(this,e,Sa,Ca,je,{onMessage:8})}}function Ks(t,e,n){const l=t.slice();return l[26]=e[n],l}function Xs(t,e,n){const l=t.slice();return l[29]=e[n],l}function La(t){let e;return{c(){e=r("span"),a(e,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,l){S(n,e,l)},d(n){n&&C(e)}}}function Aa(t){let e;return{c(){e=r("span"),a(e,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,l){S(n,e,l)},d(n){n&&C(e)}}}function Pa(t){let e,n;return{c(){e=w(`Switch to Dark mode `),n=r("div"),a(n,"class","i-ph-moon")},m(l,s){S(l,e,s),S(l,n,s)},d(l){l&&(C(e),C(n))}}}function Ea(t){let e,n;return{c(){e=w(`Switch to Light mode diff --git a/tooling/api/src/menu/base.ts b/tooling/api/src/menu/base.ts index 351c5f0bc51..79e4f92df85 100644 --- a/tooling/api/src/menu/base.ts +++ b/tooling/api/src/menu/base.ts @@ -15,18 +15,21 @@ export type ItemKind = export async function newMenu( kind: ItemKind, - opts?: { action?: () => void; items: { rid: number; kind: string }[] } + opts?: unknown ): Promise<[number, string]> { const handler = new Channel() let items: null | Array<[number, string]> = null - if (opts) { + if (opts && typeof opts === 'object') { if ('action' in opts && opts.action) { - handler.onmessage = opts.action + handler.onmessage = opts.action as () => void delete opts.action } if ('items' in opts && opts.items) { - items = opts.items.map((i) => [i.rid, i.kind]) + items = (opts.items as { rid: number; kind: string }[]).map((i) => [ + i.rid, + i.kind + ]) } } From 1bbc2a2a19109c3a93f0045f5a74ef9e884cf48a Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 07:55:50 -0300 Subject: [PATCH 53/64] update api dist [skip ci] --- examples/api/dist/assets/index.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css index f256b138469..5b00015f526 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/v22/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/v28/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.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-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-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 24 0 0 1-24 24Zm73.71 7.14a80 80 0 0 1-14.08 22.2a8 8 0 0 1-11.92-10.67a63.95 63.95 0 0 0 0-85.33a8 8 0 1 1 11.92-10.67a80.08 80.08 0 0 1 14.08 84.47ZM69 103.09a64 64 0 0 0 11.26 67.58a8 8 0 0 1-11.92 10.67a79.93 79.93 0 0 1 0-106.67a8 8 0 1 1 11.95 10.67A63.77 63.77 0 0 0 69 103.09ZM248 128a119.58 119.58 0 0 1-34.29 84a8 8 0 1 1-11.42-11.2a103.9 103.9 0 0 0 0-145.56A8 8 0 1 1 213.71 44A119.58 119.58 0 0 1 248 128ZM53.71 200.78A8 8 0 1 1 42.29 212a119.87 119.87 0 0 1 0-168a8 8 0 1 1 11.42 11.2a103.9 103.9 0 0 0 0 145.56Z'/%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-chat-teardrop-text{--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='M168 112a8 8 0 0 1-8 8H96a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8Zm-8 24H96a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16Zm72-12a100.11 100.11 0 0 1-100 100H47.67A15.69 15.69 0 0 1 32 208.33V124a100 100 0 0 1 200 0Zm-16 0a84 84 0 0 0-168 0v84h84a84.09 84.09 0 0 0 84-84Z'/%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-check-duotone{--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%3Cg fill='currentColor'%3E%3Cpath d='M232 56v144a16 16 0 0 1-16 16H40a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h176a16 16 0 0 1 16 16Z' opacity='.2'/%3E%3Cpath d='m205.66 85.66l-96 96a8 8 0 0 1-11.32 0l-40-40a8 8 0 0 1 11.32-11.32L104 164.69l90.34-90.35a8 8 0 0 1 11.32 11.32Z'/%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-ph-globe-stand{--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 176a80 80 0 1 0-80-80a80.09 80.09 0 0 0 80 80Zm0-144a64 64 0 1 1-64 64a64.07 64.07 0 0 1 64-64Zm77.77 133.5a8 8 0 0 1-.23 11.32a111.24 111.24 0 0 1-69.54 30.9V224h24a8 8 0 0 1 0 16H96a8 8 0 0 1 0-16h24v-16.29A112 112 0 0 1 47.18 18.46a8 8 0 1 1 11.54 11.08a96 96 0 0 0 135.74 135.74a8 8 0 0 1 11.31.22Z'/%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 100l-18-31.18a28 28 0 0 0-47.3-1.92l-15.34-26.59a28 28 0 0 0-48.12-.63a28 28 0 0 0-43 34.78l3.34 5.79a28 28 0 0 0-22 41.92l38 65.82a87.46 87.46 0 0 0 53.43 41a88.56 88.56 0 0 0 22.92 3A88 88 0 0 0 220.2 100Zm-6.67 62.63A72 72 0 0 1 81.63 180l-38-65.82a12 12 0 0 1 20.79-12l22 38.1a8 8 0 1 0 13.85-8l-38-65.81a12 12 0 0 1 13.5-17.59a11.9 11.9 0 0 1 7.29 5.59l34 58.89a8 8 0 0 0 13.85-8l-26-45a12 12 0 0 1 20.78-12L160 107.78a48.08 48.08 0 0 0-11 61a8 8 0 0 0 13.86-8a32 32 0 0 1 11.71-43.71a8 8 0 0 0 2.93-10.93l-10-17.32a12 12 0 0 1 20.78-12l18 31.18a71.49 71.49 0 0 1 7.25 54.62Zm-29.26-132.7a8 8 0 0 1 9.8-5.66c15.91 4.27 29 14.11 36.86 27.73a8 8 0 0 1-13.86 8c-5.72-9.92-15.36-17.12-27.14-20.27a8 8 0 0 1-5.66-9.8ZM80.91 237a8 8 0 0 1-11.24 1.33c-11-8.69-20.11-19.58-28.6-34.28a8 8 0 0 1 13.86-8c7.44 12.88 15.27 22.32 24.65 29.72A8 8 0 0 1 80.91 237Z'/%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-images-square{--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='M208 32H80a16 16 0 0 0-16 16v16H48a16 16 0 0 0-16 16v128a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-16h16a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16ZM80 48h128v69.38l-16.7-16.7a16 16 0 0 0-22.62 0L93.37 176H80Zm96 160H48V80h16v96a16 16 0 0 0 16 16h96Zm32-32h-92l64-64l28 28v36Zm-88-64a24 24 0 1 0-24-24a24 24 0 0 0 24 24Zm0-32a8 8 0 1 1-8 8a8 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-list{--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 128a8 8 0 0 1-8 8H40a8 8 0 0 1 0-16h176a8 8 0 0 1 8 8ZM40 72h176a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16Zm176 112H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16Z'/%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='M233.54 142.23a8 8 0 0 0-8-2a88.08 88.08 0 0 1-109.8-109.8a8 8 0 0 0-10-10a104.84 104.84 0 0 0-52.91 37A104 104 0 0 0 136 224a103.09 103.09 0 0 0 62.52-20.88a104.84 104.84 0 0 0 37-52.91a8 8 0 0 0-1.98-7.98Zm-44.64 48.11A88 88 0 0 1 65.66 67.11a89 89 0 0 1 31.4-26A106 106 0 0 0 96 56a104.11 104.11 0 0 0 104 104a106 106 0 0 0 14.92-1.06a89 89 0 0 1-26.02 31.4Z'/%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-square-duotone{--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%3Cg fill='currentColor'%3E%3Cpath d='M216 48v160a8 8 0 0 1-8 8H48a8 8 0 0 1-8-8V48a8 8 0 0 1 8-8h160a8 8 0 0 1 8 8Z' opacity='.2'/%3E%3Cpath d='M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16Zm0 176H48V48h160v160Z'/%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-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='M120 40V16a8 8 0 0 1 16 0v24a8 8 0 0 1-16 0Zm72 88a64 64 0 1 1-64-64a64.07 64.07 0 0 1 64 64Zm-16 0a48 48 0 1 0-48 48a48.05 48.05 0 0 0 48-48ZM58.34 69.66a8 8 0 0 0 11.32-11.32l-16-16a8 8 0 0 0-11.32 11.32Zm0 116.68l-16 16a8 8 0 0 0 11.32 11.32l16-16a8 8 0 0 0-11.32-11.32ZM192 72a8 8 0 0 0 5.66-2.34l16-16a8 8 0 0 0-11.32-11.32l-16 16A8 8 0 0 0 192 72Zm5.66 114.34a8 8 0 0 0-11.32 11.32l16 16a8 8 0 0 0 11.32-11.32ZM48 128a8 8 0 0 0-8-8H16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8Zm80 80a8 8 0 0 0-8 8v24a8 8 0 0 0 16 0v-24a8 8 0 0 0-8-8Zm112-88h-24a8 8 0 0 0 0 16h24a8 8 0 0 0 0-16Z'/%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-tray{--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='M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16Zm0 16v104h-28.7a15.86 15.86 0 0 0-11.3 4.69L148.69 176h-41.38L88 156.69A15.86 15.86 0 0 0 76.69 152H48V48Zm0 160H48v-40h28.69L96 187.31a15.86 15.86 0 0 0 11.31 4.69h41.38a15.86 15.86 0 0 0 11.31-4.69L179.31 168H208v40Z'/%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-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-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;}.grid-rows-\[min-content_auto\]{grid-template-rows:min-content auto;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-1px{width:1px;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.flex-shrink-0{flex-shrink:0;}.children\:grow>*,.grow{flex-grow:1;}.flex-grow-0{flex-grow:0;}.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;}.items-center{align-items:center;}.self-center{align-self: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;}.b{border-width:1px;border-style:solid;}.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-gray\/30{background-color:rgba(156,163,175,0.3);}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5,.dark .dark\: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);}.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);}.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;}.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{--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));}.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\: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))}} +*,::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,/*!*/ /*!*/);}.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-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-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 24 0 0 1-24 24Zm73.71 7.14a80 80 0 0 1-14.08 22.2a8 8 0 0 1-11.92-10.67a63.95 63.95 0 0 0 0-85.33a8 8 0 1 1 11.92-10.67a80.08 80.08 0 0 1 14.08 84.47ZM69 103.09a64 64 0 0 0 11.26 67.58a8 8 0 0 1-11.92 10.67a79.93 79.93 0 0 1 0-106.67a8 8 0 1 1 11.95 10.67A63.77 63.77 0 0 0 69 103.09ZM248 128a119.58 119.58 0 0 1-34.29 84a8 8 0 1 1-11.42-11.2a103.9 103.9 0 0 0 0-145.56A8 8 0 1 1 213.71 44A119.58 119.58 0 0 1 248 128ZM53.71 200.78A8 8 0 1 1 42.29 212a119.87 119.87 0 0 1 0-168a8 8 0 1 1 11.42 11.2a103.9 103.9 0 0 0 0 145.56Z'/%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-chat-teardrop-text{--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='M168 112a8 8 0 0 1-8 8H96a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8Zm-8 24H96a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16Zm72-12a100.11 100.11 0 0 1-100 100H47.67A15.69 15.69 0 0 1 32 208.33V124a100 100 0 0 1 200 0Zm-16 0a84 84 0 0 0-168 0v84h84a84.09 84.09 0 0 0 84-84Z'/%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-check-duotone{--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%3Cg fill='currentColor'%3E%3Cpath d='M232 56v144a16 16 0 0 1-16 16H40a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h176a16 16 0 0 1 16 16Z' opacity='.2'/%3E%3Cpath d='m205.66 85.66l-96 96a8 8 0 0 1-11.32 0l-40-40a8 8 0 0 1 11.32-11.32L104 164.69l90.34-90.35a8 8 0 0 1 11.32 11.32Z'/%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-ph-globe-stand{--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 176a80 80 0 1 0-80-80a80.09 80.09 0 0 0 80 80Zm0-144a64 64 0 1 1-64 64a64.07 64.07 0 0 1 64-64Zm77.77 133.5a8 8 0 0 1-.23 11.32a111.24 111.24 0 0 1-69.54 30.9V224h24a8 8 0 0 1 0 16H96a8 8 0 0 1 0-16h24v-16.29A112 112 0 0 1 47.18 18.46a8 8 0 1 1 11.54 11.08a96 96 0 0 0 135.74 135.74a8 8 0 0 1 11.31.22Z'/%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 100l-18-31.18a28 28 0 0 0-47.3-1.92l-15.34-26.59a28 28 0 0 0-48.12-.63a28 28 0 0 0-43 34.78l3.34 5.79a28 28 0 0 0-22 41.92l38 65.82a87.46 87.46 0 0 0 53.43 41a88.56 88.56 0 0 0 22.92 3A88 88 0 0 0 220.2 100Zm-6.67 62.63A72 72 0 0 1 81.63 180l-38-65.82a12 12 0 0 1 20.79-12l22 38.1a8 8 0 1 0 13.85-8l-38-65.81a12 12 0 0 1 13.5-17.59a11.9 11.9 0 0 1 7.29 5.59l34 58.89a8 8 0 0 0 13.85-8l-26-45a12 12 0 0 1 20.78-12L160 107.78a48.08 48.08 0 0 0-11 61a8 8 0 0 0 13.86-8a32 32 0 0 1 11.71-43.71a8 8 0 0 0 2.93-10.93l-10-17.32a12 12 0 0 1 20.78-12l18 31.18a71.49 71.49 0 0 1 7.25 54.62Zm-29.26-132.7a8 8 0 0 1 9.8-5.66c15.91 4.27 29 14.11 36.86 27.73a8 8 0 0 1-13.86 8c-5.72-9.92-15.36-17.12-27.14-20.27a8 8 0 0 1-5.66-9.8ZM80.91 237a8 8 0 0 1-11.24 1.33c-11-8.69-20.11-19.58-28.6-34.28a8 8 0 0 1 13.86-8c7.44 12.88 15.27 22.32 24.65 29.72A8 8 0 0 1 80.91 237Z'/%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-images-square{--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='M208 32H80a16 16 0 0 0-16 16v16H48a16 16 0 0 0-16 16v128a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-16h16a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16ZM80 48h128v69.38l-16.7-16.7a16 16 0 0 0-22.62 0L93.37 176H80Zm96 160H48V80h16v96a16 16 0 0 0 16 16h96Zm32-32h-92l64-64l28 28v36Zm-88-64a24 24 0 1 0-24-24a24 24 0 0 0 24 24Zm0-32a8 8 0 1 1-8 8a8 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-list{--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 128a8 8 0 0 1-8 8H40a8 8 0 0 1 0-16h176a8 8 0 0 1 8 8ZM40 72h176a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16Zm176 112H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16Z'/%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='M233.54 142.23a8 8 0 0 0-8-2a88.08 88.08 0 0 1-109.8-109.8a8 8 0 0 0-10-10a104.84 104.84 0 0 0-52.91 37A104 104 0 0 0 136 224a103.09 103.09 0 0 0 62.52-20.88a104.84 104.84 0 0 0 37-52.91a8 8 0 0 0-1.98-7.98Zm-44.64 48.11A88 88 0 0 1 65.66 67.11a89 89 0 0 1 31.4-26A106 106 0 0 0 96 56a104.11 104.11 0 0 0 104 104a106 106 0 0 0 14.92-1.06a89 89 0 0 1-26.02 31.4Z'/%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-square-duotone{--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%3Cg fill='currentColor'%3E%3Cpath d='M216 48v160a8 8 0 0 1-8 8H48a8 8 0 0 1-8-8V48a8 8 0 0 1 8-8h160a8 8 0 0 1 8 8Z' opacity='.2'/%3E%3Cpath d='M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16Zm0 176H48V48h160v160Z'/%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-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='M120 40V16a8 8 0 0 1 16 0v24a8 8 0 0 1-16 0Zm72 88a64 64 0 1 1-64-64a64.07 64.07 0 0 1 64 64Zm-16 0a48 48 0 1 0-48 48a48.05 48.05 0 0 0 48-48ZM58.34 69.66a8 8 0 0 0 11.32-11.32l-16-16a8 8 0 0 0-11.32 11.32Zm0 116.68l-16 16a8 8 0 0 0 11.32 11.32l16-16a8 8 0 0 0-11.32-11.32ZM192 72a8 8 0 0 0 5.66-2.34l16-16a8 8 0 0 0-11.32-11.32l-16 16A8 8 0 0 0 192 72Zm5.66 114.34a8 8 0 0 0-11.32 11.32l16 16a8 8 0 0 0 11.32-11.32ZM48 128a8 8 0 0 0-8-8H16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8Zm80 80a8 8 0 0 0-8 8v24a8 8 0 0 0 16 0v-24a8 8 0 0 0-8-8Zm112-88h-24a8 8 0 0 0 0 16h24a8 8 0 0 0 0-16Z'/%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-tray{--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='M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16Zm0 16v104h-28.7a15.86 15.86 0 0 0-11.3 4.69L148.69 176h-41.38L88 156.69A15.86 15.86 0 0 0 76.69 152H48V48Zm0 160H48v-40h28.69L96 187.31a15.86 15.86 0 0 0 11.31 4.69h41.38a15.86 15.86 0 0 0 11.31-4.69L179.31 168H208v40Z'/%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-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-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;}.grid-rows-\[min-content_auto\]{grid-template-rows:min-content auto;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-1px{width:1px;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.flex-shrink-0{flex-shrink:0;}.children\:grow>*,.grow{flex-grow:1;}.flex-grow-0{flex-grow:0;}.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;}.items-center{align-items:center;}.self-center{align-self: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;}.b{border-width:1px;border-style:solid;}.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-gray\/30{background-color:rgba(156,163,175,0.3);}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5,.dark .dark\: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);}.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);}.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;}.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{--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));}.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\: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))}} From dcae92e16cb52c046b109264222a8aea679d328f Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 08:12:46 -0300 Subject: [PATCH 54/64] fix predefined --- core/tauri/scripts/bundle.global.js | 2 +- examples/api/dist/assets/index.css | 2 +- examples/api/dist/assets/index.js | 26 +++++++++++----------- tooling/api/src/menu/predefinedMenuItem.ts | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 72cc95cdc10..cb4186d51b1 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1 +1 @@ -var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i;function r(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=r((e=>{n(this,i,"f").call(this,e)}))}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}i=new WeakMap;class s{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var o=Object.freeze({__proto__:null,Channel:a,PluginListener:s,addPluginListener:async function(e,n,t){const i=new a;return i.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:i}).then((()=>new s(e,n,i.id)))},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:l,transformCallback:r});var u,c=Object.freeze({__proto__:null,getName:async function(){return l("plugin:app|name")},getTauriVersion:async function(){return l("plugin:app|tauri_version")},getVersion:async function(){return l("plugin:app|version")},hide:async function(){return l("plugin:app|app_hide")},show:async function(){return l("plugin:app|app_show")}});async function d(e,n){await l("plugin:event|unlisten",{event:e,eventId:n})}async function p(e,n,t){return l("plugin:event|listen",{event:e,windowLabel:t?.target,handler:r(n)}).then((n=>async()=>d(e,n)))}async function h(e,n,t){return p(e,(t=>{n(t),d(e,t.id).catch((()=>{}))}),t)}async function y(e,n,t){await l("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}!function(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"}(u||(u={}));var g=Object.freeze({__proto__:null,get TauriEvent(){return u},emit:y,listen:p,once:h});class w{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class _{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new w(this.width/e,this.height/e)}}class m{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class b{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new m(this.x/e,this.y/e)}}var f,v,k=Object.freeze({__proto__:null,LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(f||(f={}));class D{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}}function I(){return new L(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function A(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new L(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(v||(v={}));const E=["tauri://created","tauri://error"];class L{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||l("plugin:window|create",{options:{...n,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return A().some((n=>n.label===e))?new L(e,{skip:!0}):null}static getCurrent(){return I()}static getAll(){return A()}static async getFocusedWindow(){for(const e of A())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):p(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):h(e,n,{target:this.label})}async emit(e,n){if(E.includes(e)){for(const t of this.listeners[e]||[])t({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return y(e,n,{target:this.label})}_handleTauriEvent(e,n){return!!E.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return l("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return l("plugin:window|inner_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async outerPosition(){return l("plugin:window|outer_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async innerSize(){return l("plugin:window|inner_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async outerSize(){return l("plugin:window|outer_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async isFullscreen(){return l("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return l("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return l("plugin:window|is_maximized",{label:this.label})}async isFocused(){return l("plugin:window|is_focused",{label:this.label})}async isDecorated(){return l("plugin:window|is_decorated",{label:this.label})}async isResizable(){return l("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return l("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return l("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return l("plugin:window|is_closable",{label:this.label})}async isVisible(){return l("plugin:window|is_visible",{label:this.label})}async title(){return l("plugin:window|title",{label:this.label})}async theme(){return l("plugin:window|theme",{label:this.label})}async center(){return l("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===f.Critical?{type:"Critical"}:{type:"Informational"}),l("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return l("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return l("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return l("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return l("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return l("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return l("plugin:window|maximize",{label:this.label})}async unmaximize(){return l("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return l("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return l("plugin:window|minimize",{label:this.label})}async unminimize(){return l("plugin:window|unminimize",{label:this.label})}async show(){return l("plugin:window|show",{label:this.label})}async hide(){return l("plugin:window|hide",{label:this.label})}async close(){return l("plugin:window|close",{label:this.label})}async setDecorations(e){return l("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return l("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return l("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return l("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return l("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return l("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return l("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return l("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return l("plugin:window|set_focus",{label:this.label})}async setIcon(e){return l("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return l("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return l("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return l("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return l("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return l("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return l("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return l("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,(n=>{n.payload=x(n.payload),e(n)}))}async onMoved(e){return this.listen(u.WINDOW_MOVED,(n=>{n.payload=T(n.payload),e(n)}))}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,(n=>{const t=new D(n);Promise.resolve(e(t)).then((()=>{if(!t.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const n=await this.listen(u.WINDOW_FOCUS,(n=>{e({...n,payload:!0})})),t=await this.listen(u.WINDOW_BLUR,(n=>{e({...n,payload:!1})}));return()=>{n(),t()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(u.WINDOW_FILE_DROP,(n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:T(n.payload.position)}})})),t=await this.listen(u.WINDOW_FILE_DROP_HOVER,(n=>{e({...n,payload:{type:"hover",paths:n.payload.paths,position:T(n.payload.position)}})})),i=await this.listen(u.WINDOW_FILE_DROP_CANCELLED,(n=>{e({...n,payload:{type:"cancel"}})}));return()=>{n(),t(),i()}}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var S,P;function C(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:T(e.position),size:x(e.size)}}function T(e){return new b(e.x,e.y)}function x(e){return new _(e.width,e.height)}!function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(S||(S={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(P||(P={}));var F,z=Object.freeze({__proto__:null,CloseRequestedEvent:D,get Effect(){return S},get EffectState(){return P},LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_,get ProgressBarStatus(){return v},get UserAttentionType(){return f},Window:L,availableMonitors:async function(){return l("plugin:window|available_monitors").then((e=>e.map(C)))},currentMonitor:async function(){return l("plugin:window|current_monitor").then(C)},getAll:A,getCurrent:I,primaryMonitor:async function(){return l("plugin:window|primary_monitor").then(C)}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(F||(F={}));var R,M=Object.freeze({__proto__:null,get BaseDirectory(){return F},appCacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppCache})},appConfigDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppConfig})},appDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppData})},appLocalDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLocalData})},appLogDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLog})},audioDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Audio})},basename:async function(e,n){return l("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Cache})},configDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Config})},dataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Desktop})},dirname:async function(e){return l("plugin:path|dirname",{path:e})},documentDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Document})},downloadDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Download})},executableDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Executable})},extname:async function(e){return l("plugin:path|extname",{path:e})},fontDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Font})},homeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Home})},isAbsolute:async function(e){return l("plugin:path|isAbsolute",{path:e})},join:async function(...e){return l("plugin:path|join",{paths:e})},localDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.LocalData})},normalize:async function(e){return l("plugin:path|normalize",{path:e})},pictureDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Picture})},publicDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Public})},resolve:async function(...e){return l("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return l("plugin:path|resolve_directory",{directory:F.Resource,path:e})},resourceDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Resource})},runtimeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Temp})},templateDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Template})},videoDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Video})}});class W{get rid(){return n(this,R,"f")}constructor(e){R.set(this,void 0),t(this,R,e,"f")}async close(){return l("plugin:resources|close",{rid:this.rid})}}R=new WeakMap;class N extends W{constructor(e,n){super(e),this.id=n}static async new(e){e?.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e?.icon&&(e.icon="string"==typeof e.icon?e.icon:Array.from(e.icon));const n=new a;return e?.action&&(n.onmessage=e.action,delete e.action),l("plugin:tray|new",{options:e??{},handler:n}).then((([e,n])=>new N(e,n)))}async setIcon(e){let n=null;return e&&(n="string"==typeof e?e:Array.from(e)),l("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),l("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return l("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return l("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return l("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return l("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return l("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return l("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var O,U,B=Object.freeze({__proto__:null,TrayIcon:N});async function V(e,n){const t=new a;let i=null;return n&&"object"==typeof n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"items"in n&&n.items&&(i=n.items.map((e=>[e.rid,e.kind])))),l("plugin:menu|new",{kind:e,options:n?{...n,items:i}:void 0,handler:t})}class H extends W{get id(){return n(this,O,"f")}get kind(){return n(this,U,"f")}constructor(e,n,i){super(e),O.set(this,void 0),U.set(this,void 0),t(this,O,n,"f"),t(this,U,i,"f")}}function G([e,n,t]){switch(t){case"Submenu":return new j(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}O=new WeakMap,U=new WeakMap;let j=class e extends H{constructor(e,n){super(e,n,"Submenu")}static async new(n){return V("Submenu",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(G)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(G)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?G(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsWindowsMenuForNSApp(){return l("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return l("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};function q([e,n,t]){switch(t){case"Submenu":return new Submenu(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}class Q extends H{constructor(e,n){super(e,n,"Menu")}static async new(e){return V("Menu",e).then((([e,n])=>new Q(e,n)))}static async default(){return l("plugin:menu|default").then((([e,n])=>new Q(e,n)))}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(q)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(q)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?q(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsAppMenu(){return l("plugin:menu|set_as_app_menu",{rid:this.rid}).then((e=>e?new Q(e[0],e[1]):null))}async setAsWindowMenu(e){return l("plugin:menu|set_as_window_menu",{rid:this.rid,window:e?.label??null}).then((e=>e?new Q(e[0],e[1]):null))}}var $;!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}($||($={}));var Z=Object.freeze({__proto__:null,CheckMenuItem:class e extends H{constructor(e,n){super(e,n,"Check")}static async new(n){return V("Check",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return l("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return l("plugin:menu|set_checked",{rid:this.rid,checked:e})}},IconMenuItem:class e extends H{constructor(e,n){super(e,n,"Icon")}static async new(n){return V("Icon",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return l("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return l("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},Menu:Q,MenuItem:class e extends H{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return V("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},get NativeIcon(){return $},PredefinedMenuItem:class e extends H{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return V("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},Submenu:j});return e.app=c,e.dpi=k,e.event=g,e.menu=Z,e.path=M,e.primitives=o,e.tray=B,e.window=z,e}({});window.__TAURI__=__TAURI_IIFE__; +var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i;function r(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=r((e=>{n(this,i,"f").call(this,e)}))}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}i=new WeakMap;class s{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var o=Object.freeze({__proto__:null,Channel:a,PluginListener:s,addPluginListener:async function(e,n,t){const i=new a;return i.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:i}).then((()=>new s(e,n,i.id)))},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:l,transformCallback:r});var u,c=Object.freeze({__proto__:null,getName:async function(){return l("plugin:app|name")},getTauriVersion:async function(){return l("plugin:app|tauri_version")},getVersion:async function(){return l("plugin:app|version")},hide:async function(){return l("plugin:app|app_hide")},show:async function(){return l("plugin:app|app_show")}});async function d(e,n){await l("plugin:event|unlisten",{event:e,eventId:n})}async function p(e,n,t){return l("plugin:event|listen",{event:e,windowLabel:t?.target,handler:r(n)}).then((n=>async()=>d(e,n)))}async function h(e,n,t){return p(e,(t=>{n(t),d(e,t.id).catch((()=>{}))}),t)}async function y(e,n,t){await l("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}!function(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"}(u||(u={}));var g=Object.freeze({__proto__:null,get TauriEvent(){return u},emit:y,listen:p,once:h});class w{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class _{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new w(this.width/e,this.height/e)}}class m{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class b{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new m(this.x/e,this.y/e)}}var f,v,k=Object.freeze({__proto__:null,LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(f||(f={}));class D{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}}function A(){return new L(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function I(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new L(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(v||(v={}));const E=["tauri://created","tauri://error"];class L{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||l("plugin:window|create",{options:{...n,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return I().some((n=>n.label===e))?new L(e,{skip:!0}):null}static getCurrent(){return A()}static getAll(){return I()}static async getFocusedWindow(){for(const e of I())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):p(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):h(e,n,{target:this.label})}async emit(e,n){if(E.includes(e)){for(const t of this.listeners[e]||[])t({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return y(e,n,{target:this.label})}_handleTauriEvent(e,n){return!!E.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return l("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return l("plugin:window|inner_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async outerPosition(){return l("plugin:window|outer_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async innerSize(){return l("plugin:window|inner_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async outerSize(){return l("plugin:window|outer_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async isFullscreen(){return l("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return l("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return l("plugin:window|is_maximized",{label:this.label})}async isFocused(){return l("plugin:window|is_focused",{label:this.label})}async isDecorated(){return l("plugin:window|is_decorated",{label:this.label})}async isResizable(){return l("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return l("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return l("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return l("plugin:window|is_closable",{label:this.label})}async isVisible(){return l("plugin:window|is_visible",{label:this.label})}async title(){return l("plugin:window|title",{label:this.label})}async theme(){return l("plugin:window|theme",{label:this.label})}async center(){return l("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===f.Critical?{type:"Critical"}:{type:"Informational"}),l("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return l("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return l("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return l("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return l("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return l("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return l("plugin:window|maximize",{label:this.label})}async unmaximize(){return l("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return l("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return l("plugin:window|minimize",{label:this.label})}async unminimize(){return l("plugin:window|unminimize",{label:this.label})}async show(){return l("plugin:window|show",{label:this.label})}async hide(){return l("plugin:window|hide",{label:this.label})}async close(){return l("plugin:window|close",{label:this.label})}async setDecorations(e){return l("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return l("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return l("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return l("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return l("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return l("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return l("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return l("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return l("plugin:window|set_focus",{label:this.label})}async setIcon(e){return l("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return l("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return l("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return l("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return l("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return l("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return l("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return l("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,(n=>{n.payload=x(n.payload),e(n)}))}async onMoved(e){return this.listen(u.WINDOW_MOVED,(n=>{n.payload=T(n.payload),e(n)}))}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,(n=>{const t=new D(n);Promise.resolve(e(t)).then((()=>{if(!t.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const n=await this.listen(u.WINDOW_FOCUS,(n=>{e({...n,payload:!0})})),t=await this.listen(u.WINDOW_BLUR,(n=>{e({...n,payload:!1})}));return()=>{n(),t()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(u.WINDOW_FILE_DROP,(n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:T(n.payload.position)}})})),t=await this.listen(u.WINDOW_FILE_DROP_HOVER,(n=>{e({...n,payload:{type:"hover",paths:n.payload.paths,position:T(n.payload.position)}})})),i=await this.listen(u.WINDOW_FILE_DROP_CANCELLED,(n=>{e({...n,payload:{type:"cancel"}})}));return()=>{n(),t(),i()}}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var S,P;function C(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:T(e.position),size:x(e.size)}}function T(e){return new b(e.x,e.y)}function x(e){return new _(e.width,e.height)}!function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(S||(S={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(P||(P={}));var F,z=Object.freeze({__proto__:null,CloseRequestedEvent:D,get Effect(){return S},get EffectState(){return P},LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_,get ProgressBarStatus(){return v},get UserAttentionType(){return f},Window:L,availableMonitors:async function(){return l("plugin:window|available_monitors").then((e=>e.map(C)))},currentMonitor:async function(){return l("plugin:window|current_monitor").then(C)},getAll:I,getCurrent:A,primaryMonitor:async function(){return l("plugin:window|primary_monitor").then(C)}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(F||(F={}));var R,M=Object.freeze({__proto__:null,get BaseDirectory(){return F},appCacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppCache})},appConfigDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppConfig})},appDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppData})},appLocalDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLocalData})},appLogDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLog})},audioDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Audio})},basename:async function(e,n){return l("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Cache})},configDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Config})},dataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Desktop})},dirname:async function(e){return l("plugin:path|dirname",{path:e})},documentDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Document})},downloadDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Download})},executableDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Executable})},extname:async function(e){return l("plugin:path|extname",{path:e})},fontDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Font})},homeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Home})},isAbsolute:async function(e){return l("plugin:path|isAbsolute",{path:e})},join:async function(...e){return l("plugin:path|join",{paths:e})},localDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.LocalData})},normalize:async function(e){return l("plugin:path|normalize",{path:e})},pictureDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Picture})},publicDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Public})},resolve:async function(...e){return l("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return l("plugin:path|resolve_directory",{directory:F.Resource,path:e})},resourceDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Resource})},runtimeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Temp})},templateDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Template})},videoDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Video})}});class W{get rid(){return n(this,R,"f")}constructor(e){R.set(this,void 0),t(this,R,e,"f")}async close(){return l("plugin:resources|close",{rid:this.rid})}}R=new WeakMap;class N extends W{constructor(e,n){super(e),this.id=n}static async new(e){e?.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e?.icon&&(e.icon="string"==typeof e.icon?e.icon:Array.from(e.icon));const n=new a;return e?.action&&(n.onmessage=e.action,delete e.action),l("plugin:tray|new",{options:e??{},handler:n}).then((([e,n])=>new N(e,n)))}async setIcon(e){let n=null;return e&&(n="string"==typeof e?e:Array.from(e)),l("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),l("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return l("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return l("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return l("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return l("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return l("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return l("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var O,U,B=Object.freeze({__proto__:null,TrayIcon:N});async function V(e,n){const t=new a;let i=null;return n&&"object"==typeof n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"items"in n&&n.items&&(i=n.items.map((e=>[e.rid,e.kind])))),l("plugin:menu|new",{kind:e,options:n?{...n,items:i}:void 0,handler:t})}class H extends W{get id(){return n(this,O,"f")}get kind(){return n(this,U,"f")}constructor(e,n,i){super(e),O.set(this,void 0),U.set(this,void 0),t(this,O,n,"f"),t(this,U,i,"f")}}function G([e,n,t]){switch(t){case"Submenu":return new j(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}O=new WeakMap,U=new WeakMap;let j=class e extends H{constructor(e,n){super(e,n,"Submenu")}static async new(n){return V("Submenu",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(G)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(G)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?G(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsWindowsMenuForNSApp(){return l("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return l("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};function q([e,n,t]){switch(t){case"Submenu":return new Submenu(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}class Q extends H{constructor(e,n){super(e,n,"Menu")}static async new(e){return V("Menu",e).then((([e,n])=>new Q(e,n)))}static async default(){return l("plugin:menu|default").then((([e,n])=>new Q(e,n)))}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(q)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(q)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?q(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsAppMenu(){return l("plugin:menu|set_as_app_menu",{rid:this.rid}).then((e=>e?new Q(e[0],e[1]):null))}async setAsWindowMenu(e){return l("plugin:menu|set_as_window_menu",{rid:this.rid,window:e?.label??null}).then((e=>e?new Q(e[0],e[1]):null))}}var $;!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}($||($={}));var Z=Object.freeze({__proto__:null,CheckMenuItem:class e extends H{constructor(e,n){super(e,n,"Check")}static async new(n){return V("Check",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return l("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return l("plugin:menu|set_checked",{rid:this.rid,checked:e})}},IconMenuItem:class e extends H{constructor(e,n){super(e,n,"Icon")}static async new(n){return V("Icon",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return l("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return l("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},Menu:Q,MenuItem:class e extends H{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return V("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},get NativeIcon(){return $},PredefinedMenuItem:class e extends H{constructor(e,n){super(e,n,"Predefined")}static async new(n){return V("Predefined",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},Submenu:j});return e.app=c,e.dpi=k,e.event=g,e.menu=Z,e.path=M,e.primitives=o,e.tray=B,e.window=z,e}({});window.__TAURI__=__TAURI_IIFE__; diff --git a/examples/api/dist/assets/index.css b/examples/api/dist/assets/index.css index 5b00015f526..f256b138469 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,/*!*/ /*!*/);}.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-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-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 24 0 0 1-24 24Zm73.71 7.14a80 80 0 0 1-14.08 22.2a8 8 0 0 1-11.92-10.67a63.95 63.95 0 0 0 0-85.33a8 8 0 1 1 11.92-10.67a80.08 80.08 0 0 1 14.08 84.47ZM69 103.09a64 64 0 0 0 11.26 67.58a8 8 0 0 1-11.92 10.67a79.93 79.93 0 0 1 0-106.67a8 8 0 1 1 11.95 10.67A63.77 63.77 0 0 0 69 103.09ZM248 128a119.58 119.58 0 0 1-34.29 84a8 8 0 1 1-11.42-11.2a103.9 103.9 0 0 0 0-145.56A8 8 0 1 1 213.71 44A119.58 119.58 0 0 1 248 128ZM53.71 200.78A8 8 0 1 1 42.29 212a119.87 119.87 0 0 1 0-168a8 8 0 1 1 11.42 11.2a103.9 103.9 0 0 0 0 145.56Z'/%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-chat-teardrop-text{--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='M168 112a8 8 0 0 1-8 8H96a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8Zm-8 24H96a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16Zm72-12a100.11 100.11 0 0 1-100 100H47.67A15.69 15.69 0 0 1 32 208.33V124a100 100 0 0 1 200 0Zm-16 0a84 84 0 0 0-168 0v84h84a84.09 84.09 0 0 0 84-84Z'/%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-check-duotone{--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%3Cg fill='currentColor'%3E%3Cpath d='M232 56v144a16 16 0 0 1-16 16H40a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h176a16 16 0 0 1 16 16Z' opacity='.2'/%3E%3Cpath d='m205.66 85.66l-96 96a8 8 0 0 1-11.32 0l-40-40a8 8 0 0 1 11.32-11.32L104 164.69l90.34-90.35a8 8 0 0 1 11.32 11.32Z'/%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-ph-globe-stand{--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 176a80 80 0 1 0-80-80a80.09 80.09 0 0 0 80 80Zm0-144a64 64 0 1 1-64 64a64.07 64.07 0 0 1 64-64Zm77.77 133.5a8 8 0 0 1-.23 11.32a111.24 111.24 0 0 1-69.54 30.9V224h24a8 8 0 0 1 0 16H96a8 8 0 0 1 0-16h24v-16.29A112 112 0 0 1 47.18 18.46a8 8 0 1 1 11.54 11.08a96 96 0 0 0 135.74 135.74a8 8 0 0 1 11.31.22Z'/%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 100l-18-31.18a28 28 0 0 0-47.3-1.92l-15.34-26.59a28 28 0 0 0-48.12-.63a28 28 0 0 0-43 34.78l3.34 5.79a28 28 0 0 0-22 41.92l38 65.82a87.46 87.46 0 0 0 53.43 41a88.56 88.56 0 0 0 22.92 3A88 88 0 0 0 220.2 100Zm-6.67 62.63A72 72 0 0 1 81.63 180l-38-65.82a12 12 0 0 1 20.79-12l22 38.1a8 8 0 1 0 13.85-8l-38-65.81a12 12 0 0 1 13.5-17.59a11.9 11.9 0 0 1 7.29 5.59l34 58.89a8 8 0 0 0 13.85-8l-26-45a12 12 0 0 1 20.78-12L160 107.78a48.08 48.08 0 0 0-11 61a8 8 0 0 0 13.86-8a32 32 0 0 1 11.71-43.71a8 8 0 0 0 2.93-10.93l-10-17.32a12 12 0 0 1 20.78-12l18 31.18a71.49 71.49 0 0 1 7.25 54.62Zm-29.26-132.7a8 8 0 0 1 9.8-5.66c15.91 4.27 29 14.11 36.86 27.73a8 8 0 0 1-13.86 8c-5.72-9.92-15.36-17.12-27.14-20.27a8 8 0 0 1-5.66-9.8ZM80.91 237a8 8 0 0 1-11.24 1.33c-11-8.69-20.11-19.58-28.6-34.28a8 8 0 0 1 13.86-8c7.44 12.88 15.27 22.32 24.65 29.72A8 8 0 0 1 80.91 237Z'/%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-images-square{--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='M208 32H80a16 16 0 0 0-16 16v16H48a16 16 0 0 0-16 16v128a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-16h16a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16ZM80 48h128v69.38l-16.7-16.7a16 16 0 0 0-22.62 0L93.37 176H80Zm96 160H48V80h16v96a16 16 0 0 0 16 16h96Zm32-32h-92l64-64l28 28v36Zm-88-64a24 24 0 1 0-24-24a24 24 0 0 0 24 24Zm0-32a8 8 0 1 1-8 8a8 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-list{--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 128a8 8 0 0 1-8 8H40a8 8 0 0 1 0-16h176a8 8 0 0 1 8 8ZM40 72h176a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16Zm176 112H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16Z'/%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='M233.54 142.23a8 8 0 0 0-8-2a88.08 88.08 0 0 1-109.8-109.8a8 8 0 0 0-10-10a104.84 104.84 0 0 0-52.91 37A104 104 0 0 0 136 224a103.09 103.09 0 0 0 62.52-20.88a104.84 104.84 0 0 0 37-52.91a8 8 0 0 0-1.98-7.98Zm-44.64 48.11A88 88 0 0 1 65.66 67.11a89 89 0 0 1 31.4-26A106 106 0 0 0 96 56a104.11 104.11 0 0 0 104 104a106 106 0 0 0 14.92-1.06a89 89 0 0 1-26.02 31.4Z'/%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-square-duotone{--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%3Cg fill='currentColor'%3E%3Cpath d='M216 48v160a8 8 0 0 1-8 8H48a8 8 0 0 1-8-8V48a8 8 0 0 1 8-8h160a8 8 0 0 1 8 8Z' opacity='.2'/%3E%3Cpath d='M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16Zm0 176H48V48h160v160Z'/%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-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='M120 40V16a8 8 0 0 1 16 0v24a8 8 0 0 1-16 0Zm72 88a64 64 0 1 1-64-64a64.07 64.07 0 0 1 64 64Zm-16 0a48 48 0 1 0-48 48a48.05 48.05 0 0 0 48-48ZM58.34 69.66a8 8 0 0 0 11.32-11.32l-16-16a8 8 0 0 0-11.32 11.32Zm0 116.68l-16 16a8 8 0 0 0 11.32 11.32l16-16a8 8 0 0 0-11.32-11.32ZM192 72a8 8 0 0 0 5.66-2.34l16-16a8 8 0 0 0-11.32-11.32l-16 16A8 8 0 0 0 192 72Zm5.66 114.34a8 8 0 0 0-11.32 11.32l16 16a8 8 0 0 0 11.32-11.32ZM48 128a8 8 0 0 0-8-8H16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8Zm80 80a8 8 0 0 0-8 8v24a8 8 0 0 0 16 0v-24a8 8 0 0 0-8-8Zm112-88h-24a8 8 0 0 0 0 16h24a8 8 0 0 0 0-16Z'/%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-tray{--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='M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16Zm0 16v104h-28.7a15.86 15.86 0 0 0-11.3 4.69L148.69 176h-41.38L88 156.69A15.86 15.86 0 0 0 76.69 152H48V48Zm0 160H48v-40h28.69L96 187.31a15.86 15.86 0 0 0 11.31 4.69h41.38a15.86 15.86 0 0 0 11.31-4.69L179.31 168H208v40Z'/%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-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-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;}.grid-rows-\[min-content_auto\]{grid-template-rows:min-content auto;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-1px{width:1px;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.flex-shrink-0{flex-shrink:0;}.children\:grow>*,.grow{flex-grow:1;}.flex-grow-0{flex-grow:0;}.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;}.items-center{align-items:center;}.self-center{align-self: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;}.b{border-width:1px;border-style:solid;}.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-gray\/30{background-color:rgba(156,163,175,0.3);}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5,.dark .dark\: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);}.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);}.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;}.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{--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));}.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\: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))}} +*,::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/v22/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/v28/iJWZBXyIfDnIV5PNhY1KTN7Z-Yh-B4i1UA.ttf) format('truetype');}.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-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-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 24 0 0 1-24 24Zm73.71 7.14a80 80 0 0 1-14.08 22.2a8 8 0 0 1-11.92-10.67a63.95 63.95 0 0 0 0-85.33a8 8 0 1 1 11.92-10.67a80.08 80.08 0 0 1 14.08 84.47ZM69 103.09a64 64 0 0 0 11.26 67.58a8 8 0 0 1-11.92 10.67a79.93 79.93 0 0 1 0-106.67a8 8 0 1 1 11.95 10.67A63.77 63.77 0 0 0 69 103.09ZM248 128a119.58 119.58 0 0 1-34.29 84a8 8 0 1 1-11.42-11.2a103.9 103.9 0 0 0 0-145.56A8 8 0 1 1 213.71 44A119.58 119.58 0 0 1 248 128ZM53.71 200.78A8 8 0 1 1 42.29 212a119.87 119.87 0 0 1 0-168a8 8 0 1 1 11.42 11.2a103.9 103.9 0 0 0 0 145.56Z'/%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-chat-teardrop-text{--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='M168 112a8 8 0 0 1-8 8H96a8 8 0 0 1 0-16h64a8 8 0 0 1 8 8Zm-8 24H96a8 8 0 0 0 0 16h64a8 8 0 0 0 0-16Zm72-12a100.11 100.11 0 0 1-100 100H47.67A15.69 15.69 0 0 1 32 208.33V124a100 100 0 0 1 200 0Zm-16 0a84 84 0 0 0-168 0v84h84a84.09 84.09 0 0 0 84-84Z'/%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-check-duotone{--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%3Cg fill='currentColor'%3E%3Cpath d='M232 56v144a16 16 0 0 1-16 16H40a16 16 0 0 1-16-16V56a16 16 0 0 1 16-16h176a16 16 0 0 1 16 16Z' opacity='.2'/%3E%3Cpath d='m205.66 85.66l-96 96a8 8 0 0 1-11.32 0l-40-40a8 8 0 0 1 11.32-11.32L104 164.69l90.34-90.35a8 8 0 0 1 11.32 11.32Z'/%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-ph-globe-stand{--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 176a80 80 0 1 0-80-80a80.09 80.09 0 0 0 80 80Zm0-144a64 64 0 1 1-64 64a64.07 64.07 0 0 1 64-64Zm77.77 133.5a8 8 0 0 1-.23 11.32a111.24 111.24 0 0 1-69.54 30.9V224h24a8 8 0 0 1 0 16H96a8 8 0 0 1 0-16h24v-16.29A112 112 0 0 1 47.18 18.46a8 8 0 1 1 11.54 11.08a96 96 0 0 0 135.74 135.74a8 8 0 0 1 11.31.22Z'/%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 100l-18-31.18a28 28 0 0 0-47.3-1.92l-15.34-26.59a28 28 0 0 0-48.12-.63a28 28 0 0 0-43 34.78l3.34 5.79a28 28 0 0 0-22 41.92l38 65.82a87.46 87.46 0 0 0 53.43 41a88.56 88.56 0 0 0 22.92 3A88 88 0 0 0 220.2 100Zm-6.67 62.63A72 72 0 0 1 81.63 180l-38-65.82a12 12 0 0 1 20.79-12l22 38.1a8 8 0 1 0 13.85-8l-38-65.81a12 12 0 0 1 13.5-17.59a11.9 11.9 0 0 1 7.29 5.59l34 58.89a8 8 0 0 0 13.85-8l-26-45a12 12 0 0 1 20.78-12L160 107.78a48.08 48.08 0 0 0-11 61a8 8 0 0 0 13.86-8a32 32 0 0 1 11.71-43.71a8 8 0 0 0 2.93-10.93l-10-17.32a12 12 0 0 1 20.78-12l18 31.18a71.49 71.49 0 0 1 7.25 54.62Zm-29.26-132.7a8 8 0 0 1 9.8-5.66c15.91 4.27 29 14.11 36.86 27.73a8 8 0 0 1-13.86 8c-5.72-9.92-15.36-17.12-27.14-20.27a8 8 0 0 1-5.66-9.8ZM80.91 237a8 8 0 0 1-11.24 1.33c-11-8.69-20.11-19.58-28.6-34.28a8 8 0 0 1 13.86-8c7.44 12.88 15.27 22.32 24.65 29.72A8 8 0 0 1 80.91 237Z'/%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-images-square{--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='M208 32H80a16 16 0 0 0-16 16v16H48a16 16 0 0 0-16 16v128a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-16h16a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16ZM80 48h128v69.38l-16.7-16.7a16 16 0 0 0-22.62 0L93.37 176H80Zm96 160H48V80h16v96a16 16 0 0 0 16 16h96Zm32-32h-92l64-64l28 28v36Zm-88-64a24 24 0 1 0-24-24a24 24 0 0 0 24 24Zm0-32a8 8 0 1 1-8 8a8 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-list{--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 128a8 8 0 0 1-8 8H40a8 8 0 0 1 0-16h176a8 8 0 0 1 8 8ZM40 72h176a8 8 0 0 0 0-16H40a8 8 0 0 0 0 16Zm176 112H40a8 8 0 0 0 0 16h176a8 8 0 0 0 0-16Z'/%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='M233.54 142.23a8 8 0 0 0-8-2a88.08 88.08 0 0 1-109.8-109.8a8 8 0 0 0-10-10a104.84 104.84 0 0 0-52.91 37A104 104 0 0 0 136 224a103.09 103.09 0 0 0 62.52-20.88a104.84 104.84 0 0 0 37-52.91a8 8 0 0 0-1.98-7.98Zm-44.64 48.11A88 88 0 0 1 65.66 67.11a89 89 0 0 1 31.4-26A106 106 0 0 0 96 56a104.11 104.11 0 0 0 104 104a106 106 0 0 0 14.92-1.06a89 89 0 0 1-26.02 31.4Z'/%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-square-duotone{--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%3Cg fill='currentColor'%3E%3Cpath d='M216 48v160a8 8 0 0 1-8 8H48a8 8 0 0 1-8-8V48a8 8 0 0 1 8-8h160a8 8 0 0 1 8 8Z' opacity='.2'/%3E%3Cpath d='M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16Zm0 176H48V48h160v160Z'/%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-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='M120 40V16a8 8 0 0 1 16 0v24a8 8 0 0 1-16 0Zm72 88a64 64 0 1 1-64-64a64.07 64.07 0 0 1 64 64Zm-16 0a48 48 0 1 0-48 48a48.05 48.05 0 0 0 48-48ZM58.34 69.66a8 8 0 0 0 11.32-11.32l-16-16a8 8 0 0 0-11.32 11.32Zm0 116.68l-16 16a8 8 0 0 0 11.32 11.32l16-16a8 8 0 0 0-11.32-11.32ZM192 72a8 8 0 0 0 5.66-2.34l16-16a8 8 0 0 0-11.32-11.32l-16 16A8 8 0 0 0 192 72Zm5.66 114.34a8 8 0 0 0-11.32 11.32l16 16a8 8 0 0 0 11.32-11.32ZM48 128a8 8 0 0 0-8-8H16a8 8 0 0 0 0 16h24a8 8 0 0 0 8-8Zm80 80a8 8 0 0 0-8 8v24a8 8 0 0 0 16 0v-24a8 8 0 0 0-8-8Zm112-88h-24a8 8 0 0 0 0 16h24a8 8 0 0 0 0-16Z'/%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-tray{--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='M208 32H48a16 16 0 0 0-16 16v160a16 16 0 0 0 16 16h160a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16Zm0 16v104h-28.7a15.86 15.86 0 0 0-11.3 4.69L148.69 176h-41.38L88 156.69A15.86 15.86 0 0 0 76.69 152H48V48Zm0 160H48v-40h28.69L96 187.31a15.86 15.86 0 0 0 11.31 4.69h41.38a15.86 15.86 0 0 0 11.31-4.69L179.31 168H208v40Z'/%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-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-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;}.grid-rows-\[min-content_auto\]{grid-template-rows:min-content auto;}.mb-2{margin-bottom:0.5rem;}.mr-2{margin-right:0.5rem;}.display-none{display:none;}.children-h-10>*{height:2.5rem;}.h-15rem{height:15rem;}.h-2px{height:2px;}.h-8{height:2rem;}.h-85\%{height:85%;}.h-screen{height:100vh;}.w-1px{width:1px;}.w-8{width:2rem;}.w-screen{width:100vw;}.flex{display:flex;}.flex-1{flex:1 1 0%;}.children-flex-none>*{flex:none;}.flex-shrink-0{flex-shrink:0;}.children\:grow>*,.grow{flex-grow:1;}.flex-grow-0{flex-grow:0;}.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;}.items-center{align-items:center;}.self-center{align-self: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;}.b{border-width:1px;border-style:solid;}.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-gray\/30{background-color:rgba(156,163,175,0.3);}.bg-primary{--un-bg-opacity:1;background-color:rgba(255,255,255,var(--un-bg-opacity));}.bg-white\/5,.dark .dark\: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);}.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);}.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;}.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{--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));}.blur{--un-blur:blur(8px);filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia);}.transition-colors-250{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:250ms;}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms;}@media (max-width: 639.9px){.lt-sm\:absolute{position:absolute;}.lt-sm\:z-1999{z-index:1999;}.lt-sm\:h-screen{height:100vh;}.lt-sm\:flex{display:flex;}.lt-sm\: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 01bb316e6ab..5c6ee7bdb46 100644 --- a/examples/api/dist/assets/index.js +++ b/examples/api/dist/assets/index.js @@ -1,17 +1,17 @@ -var wr=Object.defineProperty;var kr=(t,e,n)=>e in t?wr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _t=(t,e,n)=>(kr(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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 d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).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 ne(){}function $s(t){return t()}function ys(){return Object.create(null)}function Ce(t){t.forEach($s)}function xs(t){return typeof t=="function"}function je(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Di;function yr(t,e){return t===e?!0:(Di||(Di=document.createElement("a")),Di.href=e,t===Di.href)}function vr(t){return Object.keys(t).length===0}function Cr(t,...e){if(t==null){for(const l of e)l(void 0);return ne}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Sr(t,e,n){t.$$.on_destroy.push(Cr(e,n))}function i(t,e){t.appendChild(e)}function S(t,e,n){t.insertBefore(e,n||null)}function C(t){t.parentNode&&t.parentNode.removeChild(t)}function Je(t,e){for(let n=0;nt.removeEventListener(e,n,l)}function vs(t){return function(e){return e.preventDefault(),t.call(this,e)}}function a(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function X(t){return t===""?null:+t}function Lr(t){return Array.from(t.childNodes)}function se(t,e){e=""+e,t.data!==e&&(t.data=e)}function z(t,e){t.value=e??""}function $t(t,e,n,l){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,l?"important":"")}function Qe(t,e,n){for(let l=0;l{const s=t.$$.callbacks[e];if(s){const u=Ar(e,n,{cancelable:l});return s.slice().forEach(d=>{d.call(t,u)}),!u.defaultPrevented}return!0}}const tn=[],Tn=[];let nn=[];const Sl=[],Er=Promise.resolve();let Ml=!1;function Ir(){Ml||(Ml=!0,Er.then(ir))}function wt(t){nn.push(t)}function nr(t){Sl.push(t)}const wl=new Set;let xt=0;function ir(){if(xt!==0)return;const t=In;do{try{for(;xtt.indexOf(l)===-1?e.push(l):n.push(l)),n.forEach(l=>l()),nn=e}const Fi=new Set;let Tt;function Or(){Tt={r:0,c:[],p:Tt}}function Wr(){Tt.r||Ce(Tt.c),Tt=Tt.p}function sn(t,e){t&&t.i&&(Fi.delete(t),t.i(e))}function zn(t,e,n,l){if(t&&t.o){if(Fi.has(t))return;Fi.add(t),Tt.c.push(()=>{Fi.delete(t),l&&(n&&t.d(1),l())}),t.o(e)}else l&&l()}function he(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function lr(t,e,n){const l=t.$$.props[e];l!==void 0&&(t.$$.bound[l]=n,n(t.$$.ctx[l]))}function On(t){t&&t.c()}function rn(t,e,n){const{fragment:l,after_update:s}=t.$$;l&&l.m(e,n),wt(()=>{const u=t.$$.on_mount.map($s).filter(xs);t.$$.on_destroy?t.$$.on_destroy.push(...u):Ce(u),t.$$.on_mount=[]}),s.forEach(wt)}function an(t,e){const n=t.$$;n.fragment!==null&&(zr(n.after_update),Ce(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Rr(t,e){t.$$.dirty[0]===-1&&(tn.push(t),Ir(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const A=_.length?_[0]:O;return h.ctx&&s(h.ctx[b],h.ctx[b]=A)&&(!h.skip_bound&&h.bound[b]&&h.bound[b](A),k&&Rr(t,b)),O}):[],h.update(),k=!0,Ce(h.before_update),h.fragment=l?l(h.ctx):!1,e.target){if(e.hydrate){const b=Lr(e.target);h.fragment&&h.fragment.l(b),b.forEach(C)}else h.fragment&&h.fragment.c();e.intro&&sn(t.$$.fragment),rn(t,e.target,e.anchor),ir()}En(c)}class $e{constructor(){_t(this,"$$");_t(this,"$$set")}$destroy(){an(this,1),this.$destroy=ne}$on(e,n){if(!xs(n))return ne;const l=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return l.push(n),()=>{const s=l.indexOf(n);s!==-1&&l.splice(s,1)}}$set(e){this.$$set&&!vr(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Dr="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Dr);const en=[];function Fr(t,e=ne){let n;const l=new Set;function s(o){if(je(t,o)&&(t=o,n)){const c=!en.length;for(const h of l)h[1](),en.push(h,t);if(c){for(let h=0;h{l.delete(h),l.size===0&&n&&(n(),n=null)}}return{set:s,update:u,subscribe:d}}function Wn(t,e,n,l){if(n==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?l:n==="a"?l.call(t):l?l.value:e.get(t)}function qi(t,e,n,l,s){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?s.call(t,n):s?s.value=n:e.set(t,n),n}var Pn;function sr(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}class rr{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,Pn.set(this,()=>{}),this.id=sr(e=>{Wn(this,Pn,"f").call(this,e)})}set onmessage(e){qi(this,Pn,e,"f")}get onmessage(){return Wn(this,Pn,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}Pn=new WeakMap;async function m(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}async function Hr(){return m("plugin:app|version")}async function Ur(){return m("plugin:app|name")}async function Br(){return m("plugin:app|tauri_version")}async function Vr(){return m("plugin:app|app_show")}async function qr(){return m("plugin:app|app_hide")}function Nr(t){let e,n,l,s,u,d,o,c,h,k,b,O,_,A,v,E,V,D,L,W,P,I,R,Y;return{c(){e=r("div"),n=r("p"),n.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 +var wr=Object.defineProperty;var kr=(t,e,n)=>e in t?wr(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var _t=(t,e,n)=>(kr(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.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 d of u.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&l(d)}).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 ne(){}function $s(t){return t()}function ys(){return Object.create(null)}function Ce(t){t.forEach($s)}function xs(t){return typeof t=="function"}function je(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Di;function yr(t,e){return t===e?!0:(Di||(Di=document.createElement("a")),Di.href=e,t===Di.href)}function vr(t){return Object.keys(t).length===0}function Cr(t,...e){if(t==null){for(const l of e)l(void 0);return ne}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function Sr(t,e,n){t.$$.on_destroy.push(Cr(e,n))}function i(t,e){t.appendChild(e)}function S(t,e,n){t.insertBefore(e,n||null)}function C(t){t.parentNode&&t.parentNode.removeChild(t)}function Je(t,e){for(let n=0;nt.removeEventListener(e,n,l)}function vs(t){return function(e){return e.preventDefault(),t.call(this,e)}}function a(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function X(t){return t===""?null:+t}function Lr(t){return Array.from(t.childNodes)}function se(t,e){e=""+e,t.data!==e&&(t.data=e)}function z(t,e){t.value=e??""}function $t(t,e,n,l){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,l?"important":"")}function Qe(t,e,n){for(let l=0;l{const s=t.$$.callbacks[e];if(s){const u=Pr(e,n,{cancelable:l});return s.slice().forEach(d=>{d.call(t,u)}),!u.defaultPrevented}return!0}}const tn=[],Tn=[];let nn=[];const Sl=[],Er=Promise.resolve();let Ml=!1;function Ir(){Ml||(Ml=!0,Er.then(ir))}function wt(t){nn.push(t)}function nr(t){Sl.push(t)}const wl=new Set;let xt=0;function ir(){if(xt!==0)return;const t=In;do{try{for(;xtt.indexOf(l)===-1?e.push(l):n.push(l)),n.forEach(l=>l()),nn=e}const Fi=new Set;let Tt;function Or(){Tt={r:0,c:[],p:Tt}}function Wr(){Tt.r||Ce(Tt.c),Tt=Tt.p}function sn(t,e){t&&t.i&&(Fi.delete(t),t.i(e))}function zn(t,e,n,l){if(t&&t.o){if(Fi.has(t))return;Fi.add(t),Tt.c.push(()=>{Fi.delete(t),l&&(n&&t.d(1),l())}),t.o(e)}else l&&l()}function he(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function lr(t,e,n){const l=t.$$.props[e];l!==void 0&&(t.$$.bound[l]=n,n(t.$$.ctx[l]))}function On(t){t&&t.c()}function rn(t,e,n){const{fragment:l,after_update:s}=t.$$;l&&l.m(e,n),wt(()=>{const u=t.$$.on_mount.map($s).filter(xs);t.$$.on_destroy?t.$$.on_destroy.push(...u):Ce(u),t.$$.on_mount=[]}),s.forEach(wt)}function an(t,e){const n=t.$$;n.fragment!==null&&(zr(n.after_update),Ce(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Rr(t,e){t.$$.dirty[0]===-1&&(tn.push(t),Ir(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<{const P=_.length?_[0]:O;return h.ctx&&s(h.ctx[b],h.ctx[b]=P)&&(!h.skip_bound&&h.bound[b]&&h.bound[b](P),k&&Rr(t,b)),O}):[],h.update(),k=!0,Ce(h.before_update),h.fragment=l?l(h.ctx):!1,e.target){if(e.hydrate){const b=Lr(e.target);h.fragment&&h.fragment.l(b),b.forEach(C)}else h.fragment&&h.fragment.c();e.intro&&sn(t.$$.fragment),rn(t,e.target,e.anchor),ir()}En(c)}class $e{constructor(){_t(this,"$$");_t(this,"$$set")}$destroy(){an(this,1),this.$destroy=ne}$on(e,n){if(!xs(n))return ne;const l=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return l.push(n),()=>{const s=l.indexOf(n);s!==-1&&l.splice(s,1)}}$set(e){this.$$set&&!vr(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Dr="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Dr);const en=[];function Fr(t,e=ne){let n;const l=new Set;function s(o){if(je(t,o)&&(t=o,n)){const c=!en.length;for(const h of l)h[1](),en.push(h,t);if(c){for(let h=0;h{l.delete(h),l.size===0&&n&&(n(),n=null)}}return{set:s,update:u,subscribe:d}}function Wn(t,e,n,l){if(n==="a"&&!l)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!l:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?l:n==="a"?l.call(t):l?l.value:e.get(t)}function qi(t,e,n,l,s){if(l==="m")throw new TypeError("Private method is not writable");if(l==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return l==="a"?s.call(t,n):s?s.value=n:e.set(t,n),n}var An;function sr(t,e=!1){return window.__TAURI_INTERNALS__.transformCallback(t,e)}class rr{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,An.set(this,()=>{}),this.id=sr(e=>{Wn(this,An,"f").call(this,e)})}set onmessage(e){qi(this,An,e,"f")}get onmessage(){return Wn(this,An,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}An=new WeakMap;async function m(t,e={},n){return window.__TAURI_INTERNALS__.invoke(t,e,n)}async function Hr(){return m("plugin:app|version")}async function Ur(){return m("plugin:app|name")}async function Br(){return m("plugin:app|tauri_version")}async function Vr(){return m("plugin:app|app_show")}async function qr(){return m("plugin:app|app_hide")}function Nr(t){let e,n,l,s,u,d,o,c,h,k,b,O,_,P,v,E,V,D,L,W,A,I,R,Y;return{c(){e=r("div"),n=r("p"),n.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.`,l=p(),s=r("br"),u=p(),d=r("br"),o=p(),c=r("pre"),h=w(" App name: "),k=r("code"),b=w(t[2]),O=w(` - App version: `),_=r("code"),A=w(t[0]),v=w(` + App version: `),_=r("code"),P=w(t[0]),v=w(` Tauri version: `),E=r("code"),V=w(t[1]),D=w(` - `),L=p(),W=r("br"),P=p(),I=r("button"),I.textContent="Context menu",a(I,"class","btn")},m(q,Q){S(q,e,Q),i(e,n),i(e,l),i(e,s),i(e,u),i(e,d),i(e,o),i(e,c),i(c,h),i(c,k),i(k,b),i(c,O),i(c,_),i(_,A),i(c,v),i(c,E),i(E,V),i(c,D),i(e,L),i(e,W),i(e,P),i(e,I),R||(Y=M(I,"click",t[3]),R=!0)},p(q,[Q]){Q&4&&se(b,q[2]),Q&1&&se(A,q[0]),Q&2&&se(V,q[1])},i:ne,o:ne,d(q){q&&C(e),R=!1,Y()}}}function jr(t,e,n){let l="1.0.0",s="1.0.0",u="Unknown";Ur().then(o=>{n(2,u=o)}),Hr().then(o=>{n(0,l=o)}),Br().then(o=>{n(1,s=o)});function d(){m("popup_context_menu")}return[l,s,u,d]}class Gr extends $e{constructor(e){super(),Ze(this,e,jr,Nr,je,{})}}var ze;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"})(ze||(ze={}));async function ar(t,e){await m("plugin:event|unlisten",{event:t,eventId:e})}async function El(t,e,n){return m("plugin:event|listen",{event:t,windowLabel:n==null?void 0:n.target,handler:sr(e)}).then(l=>async()=>ar(t,l))}async function Kr(t,e,n){return El(t,l=>{e(l),ar(t,l.id).catch(()=>{})},n)}async function ur(t,e,n){await m("plugin:event|emit",{event:t,windowLabel:n==null?void 0:n.target,payload:e})}function Xr(t){let e,n,l,s,u,d,o,c;return{c(){e=r("div"),n=r("button"),n.textContent="Call Log API",l=p(),s=r("button"),s.textContent="Call Request (async) API",u=p(),d=r("button"),d.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(s,"class","btn"),a(s,"id","request"),a(d,"class","btn"),a(d,"id","event")},m(h,k){S(h,e,k),i(e,n),i(e,l),i(e,s),i(e,u),i(e,d),o||(c=[M(n,"click",t[0]),M(s,"click",t[1]),M(d,"click",t[2])],o=!0)},p:ne,i:ne,o:ne,d(h){h&&C(e),o=!1,Ce(c)}}}function Yr(t,e,n){let{onMessage:l}=e,s;Vi(async()=>{s=await El("rust-event",l)}),er(()=>{s&&s()});function u(){m("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function d(){m("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(l).catch(l)}function o(){ur("js-event","this is the payload string")}return t.$$set=c=>{"onMessage"in c&&n(3,l=c.onMessage)},[u,d,o,l]}class Qr extends $e{constructor(e){super(),Ze(this,e,Yr,Xr,je,{onMessage:3})}}class Ll{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class ln{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new Ll(this.width/e,this.height/e)}}class Jr{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class it{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new Jr(this.x/e,this.y/e)}}var Ni;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(Ni||(Ni={}));class Zr{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}}var ji;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(ji||(ji={}));function or(){return new Rn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function kl(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new Rn(t.label,{skip:!0}))}const Ss=["tauri://created","tauri://error"];class Rn{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n!=null&&n.skip||m("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async l=>this.emit("tauri://error",l))}static getByLabel(e){return kl().some(n=>n.label===e)?new Rn(e,{skip:!0}):null}static getCurrent(){return or()}static getAll(){return kl()}static async getFocusedWindow(){for(const e of kl())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const l=this.listeners[e];l.splice(l.indexOf(n),1)}):El(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const l=this.listeners[e];l.splice(l.indexOf(n),1)}):Kr(e,n,{target:this.label})}async emit(e,n){if(Ss.includes(e)){for(const l of this.listeners[e]||[])l({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return ur(e,n,{target:this.label})}_handleTauriEvent(e,n){return Ss.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return m("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return m("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new it(e,n))}async outerPosition(){return m("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new it(e,n))}async innerSize(){return m("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new ln(e,n))}async outerSize(){return m("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new ln(e,n))}async isFullscreen(){return m("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return m("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return m("plugin:window|is_maximized",{label:this.label})}async isFocused(){return m("plugin:window|is_focused",{label:this.label})}async isDecorated(){return m("plugin:window|is_decorated",{label:this.label})}async isResizable(){return m("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return m("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return m("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return m("plugin:window|is_closable",{label:this.label})}async isVisible(){return m("plugin:window|is_visible",{label:this.label})}async title(){return m("plugin:window|title",{label:this.label})}async theme(){return m("plugin:window|theme",{label:this.label})}async center(){return m("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===Ni.Critical?n={type:"Critical"}:n={type:"Informational"}),m("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return m("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return m("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return m("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return m("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return m("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return m("plugin:window|maximize",{label:this.label})}async unmaximize(){return m("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return m("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return m("plugin:window|minimize",{label:this.label})}async unminimize(){return m("plugin:window|unminimize",{label:this.label})}async show(){return m("plugin:window|show",{label:this.label})}async hide(){return m("plugin:window|hide",{label:this.label})}async close(){return m("plugin:window|close",{label:this.label})}async setDecorations(e){return m("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return m("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return m("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return m("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return m("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return m("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return m("plugin:window|set_content_protected",{label:this.label,value: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 m("plugin:window|set_size",{label:this.label,value:{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 m("plugin:window|set_min_size",{label:this.label,value: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 m("plugin:window|set_max_size",{label:this.label,value: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 m("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return m("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return m("plugin:window|set_focus",{label:this.label})}async setIcon(e){return m("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return m("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return m("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return m("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return m("plugin:window|set_cursor_icon",{label:this.label,value: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 m("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return m("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return m("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return m("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(ze.WINDOW_RESIZED,n=>{n.payload=$r(n.payload),e(n)})}async onMoved(e){return this.listen(ze.WINDOW_MOVED,n=>{n.payload=yl(n.payload),e(n)})}async onCloseRequested(e){return this.listen(ze.WINDOW_CLOSE_REQUESTED,n=>{const l=new Zr(n);Promise.resolve(e(l)).then(()=>{if(!l.isPreventDefault())return this.close()})})}async onFocusChanged(e){const n=await this.listen(ze.WINDOW_FOCUS,s=>{e({...s,payload:!0})}),l=await this.listen(ze.WINDOW_BLUR,s=>{e({...s,payload:!1})});return()=>{n(),l()}}async onScaleChanged(e){return this.listen(ze.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(ze.WINDOW_FILE_DROP,u=>{e({...u,payload:{type:"drop",paths:u.payload.paths,position:yl(u.payload.position)}})}),l=await this.listen(ze.WINDOW_FILE_DROP_HOVER,u=>{e({...u,payload:{type:"hover",paths:u.payload.paths,position:yl(u.payload.position)}})}),s=await this.listen(ze.WINDOW_FILE_DROP_CANCELLED,u=>{e({...u,payload:{type:"cancel"}})});return()=>{n(),l(),s()}}async onThemeChanged(e){return this.listen(ze.WINDOW_THEME_CHANGED,e)}}var Gi;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(Gi||(Gi={}));var Ki;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(Ki||(Ki={}));function yl(t){return new it(t.x,t.y)}function $r(t){return new ln(t.width,t.height)}function Ms(t,e,n){const l=t.slice();return l[105]=e[n],l}function Ls(t,e,n){const l=t.slice();return l[108]=e[n],l}function As(t,e,n){const l=t.slice();return l[111]=e[n],l}function Ps(t,e,n){const l=t.slice();return l[114]=e[n],l}function Es(t,e,n){const l=t.slice();return l[117]=e[n],l}function Is(t){let e,n,l,s,u,d,o=he(Object.keys(t[1])),c=[];for(let h=0;ht[59].call(l))},m(h,k){S(h,e,k),S(h,n,k),S(h,l,k),i(l,s);for(let b=0;b{n(2,u=o)}),Hr().then(o=>{n(0,l=o)}),Br().then(o=>{n(1,s=o)});function d(){m("popup_context_menu")}return[l,s,u,d]}class Gr extends $e{constructor(e){super(),Ze(this,e,jr,Nr,je,{})}}var ze;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_CREATED="tauri://window-created",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WINDOW_FILE_DROP="tauri://file-drop",t.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"})(ze||(ze={}));async function ar(t,e){await m("plugin:event|unlisten",{event:t,eventId:e})}async function El(t,e,n){return m("plugin:event|listen",{event:t,windowLabel:n==null?void 0:n.target,handler:sr(e)}).then(l=>async()=>ar(t,l))}async function Kr(t,e,n){return El(t,l=>{e(l),ar(t,l.id).catch(()=>{})},n)}async function ur(t,e,n){await m("plugin:event|emit",{event:t,windowLabel:n==null?void 0:n.target,payload:e})}function Xr(t){let e,n,l,s,u,d,o,c;return{c(){e=r("div"),n=r("button"),n.textContent="Call Log API",l=p(),s=r("button"),s.textContent="Call Request (async) API",u=p(),d=r("button"),d.textContent="Send event to Rust",a(n,"class","btn"),a(n,"id","log"),a(s,"class","btn"),a(s,"id","request"),a(d,"class","btn"),a(d,"id","event")},m(h,k){S(h,e,k),i(e,n),i(e,l),i(e,s),i(e,u),i(e,d),o||(c=[M(n,"click",t[0]),M(s,"click",t[1]),M(d,"click",t[2])],o=!0)},p:ne,i:ne,o:ne,d(h){h&&C(e),o=!1,Ce(c)}}}function Yr(t,e,n){let{onMessage:l}=e,s;Vi(async()=>{s=await El("rust-event",l)}),er(()=>{s&&s()});function u(){m("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function d(){m("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(l).catch(l)}function o(){ur("js-event","this is the payload string")}return t.$$set=c=>{"onMessage"in c&&n(3,l=c.onMessage)},[u,d,o,l]}class Qr extends $e{constructor(e){super(),Ze(this,e,Yr,Xr,je,{onMessage:3})}}class Ll{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class ln{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new Ll(this.width/e,this.height/e)}}class Jr{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class it{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new Jr(this.x/e,this.y/e)}}var Ni;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(Ni||(Ni={}));class Zr{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}}var ji;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(ji||(ji={}));function or(){return new Rn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function kl(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new Rn(t.label,{skip:!0}))}const Ss=["tauri://created","tauri://error"];class Rn{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n!=null&&n.skip||m("plugin:window|create",{options:{...n,label:e}}).then(async()=>this.emit("tauri://created")).catch(async l=>this.emit("tauri://error",l))}static getByLabel(e){return kl().some(n=>n.label===e)?new Rn(e,{skip:!0}):null}static getCurrent(){return or()}static getAll(){return kl()}static async getFocusedWindow(){for(const e of kl())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const l=this.listeners[e];l.splice(l.indexOf(n),1)}):El(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const l=this.listeners[e];l.splice(l.indexOf(n),1)}):Kr(e,n,{target:this.label})}async emit(e,n){if(Ss.includes(e)){for(const l of this.listeners[e]||[])l({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return ur(e,n,{target:this.label})}_handleTauriEvent(e,n){return Ss.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return m("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return m("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new it(e,n))}async outerPosition(){return m("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new it(e,n))}async innerSize(){return m("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new ln(e,n))}async outerSize(){return m("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new ln(e,n))}async isFullscreen(){return m("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return m("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return m("plugin:window|is_maximized",{label:this.label})}async isFocused(){return m("plugin:window|is_focused",{label:this.label})}async isDecorated(){return m("plugin:window|is_decorated",{label:this.label})}async isResizable(){return m("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return m("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return m("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return m("plugin:window|is_closable",{label:this.label})}async isVisible(){return m("plugin:window|is_visible",{label:this.label})}async title(){return m("plugin:window|title",{label:this.label})}async theme(){return m("plugin:window|theme",{label:this.label})}async center(){return m("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(e===Ni.Critical?n={type:"Critical"}:n={type:"Informational"}),m("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return m("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return m("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return m("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return m("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return m("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return m("plugin:window|maximize",{label:this.label})}async unmaximize(){return m("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return m("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return m("plugin:window|minimize",{label:this.label})}async unminimize(){return m("plugin:window|unminimize",{label:this.label})}async show(){return m("plugin:window|show",{label:this.label})}async hide(){return m("plugin:window|hide",{label:this.label})}async close(){return m("plugin:window|close",{label:this.label})}async setDecorations(e){return m("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return m("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return m("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return m("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return m("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return m("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return m("plugin:window|set_content_protected",{label:this.label,value: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 m("plugin:window|set_size",{label:this.label,value:{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 m("plugin:window|set_min_size",{label:this.label,value: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 m("plugin:window|set_max_size",{label:this.label,value: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 m("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return m("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return m("plugin:window|set_focus",{label:this.label})}async setIcon(e){return m("plugin:window|set_icon",{label:this.label,value:typeof e=="string"?e:Array.from(e)})}async setSkipTaskbar(e){return m("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return m("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return m("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return m("plugin:window|set_cursor_icon",{label:this.label,value: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 m("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return m("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return m("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return m("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(ze.WINDOW_RESIZED,n=>{n.payload=$r(n.payload),e(n)})}async onMoved(e){return this.listen(ze.WINDOW_MOVED,n=>{n.payload=yl(n.payload),e(n)})}async onCloseRequested(e){return this.listen(ze.WINDOW_CLOSE_REQUESTED,n=>{const l=new Zr(n);Promise.resolve(e(l)).then(()=>{if(!l.isPreventDefault())return this.close()})})}async onFocusChanged(e){const n=await this.listen(ze.WINDOW_FOCUS,s=>{e({...s,payload:!0})}),l=await this.listen(ze.WINDOW_BLUR,s=>{e({...s,payload:!1})});return()=>{n(),l()}}async onScaleChanged(e){return this.listen(ze.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(ze.WINDOW_FILE_DROP,u=>{e({...u,payload:{type:"drop",paths:u.payload.paths,position:yl(u.payload.position)}})}),l=await this.listen(ze.WINDOW_FILE_DROP_HOVER,u=>{e({...u,payload:{type:"hover",paths:u.payload.paths,position:yl(u.payload.position)}})}),s=await this.listen(ze.WINDOW_FILE_DROP_CANCELLED,u=>{e({...u,payload:{type:"cancel"}})});return()=>{n(),l(),s()}}async onThemeChanged(e){return this.listen(ze.WINDOW_THEME_CHANGED,e)}}var Gi;(function(t){t.AppearanceBased="appearanceBased",t.Light="light",t.Dark="dark",t.MediumLight="mediumLight",t.UltraDark="ultraDark",t.Titlebar="titlebar",t.Selection="selection",t.Menu="menu",t.Popover="popover",t.Sidebar="sidebar",t.HeaderView="headerView",t.Sheet="sheet",t.WindowBackground="windowBackground",t.HudWindow="hudWindow",t.FullScreenUI="fullScreenUI",t.Tooltip="tooltip",t.ContentBackground="contentBackground",t.UnderWindowBackground="underWindowBackground",t.UnderPageBackground="underPageBackground",t.Mica="mica",t.Blur="blur",t.Acrylic="acrylic",t.Tabbed="tabbed",t.TabbedDark="tabbedDark",t.TabbedLight="tabbedLight"})(Gi||(Gi={}));var Ki;(function(t){t.FollowsWindowActiveState="followsWindowActiveState",t.Active="active",t.Inactive="inactive"})(Ki||(Ki={}));function yl(t){return new it(t.x,t.y)}function $r(t){return new ln(t.width,t.height)}function Ms(t,e,n){const l=t.slice();return l[105]=e[n],l}function Ls(t,e,n){const l=t.slice();return l[108]=e[n],l}function Ps(t,e,n){const l=t.slice();return l[111]=e[n],l}function As(t,e,n){const l=t.slice();return l[114]=e[n],l}function Es(t,e,n){const l=t.slice();return l[117]=e[n],l}function Is(t){let e,n,l,s,u,d,o=he(Object.keys(t[1])),c=[];for(let h=0;ht[59].call(l))},m(h,k){S(h,e,k),S(h,n,k),S(h,l,k),i(l,s);for(let b=0;be in t?wr(t,e,{enumerable:!0,config `),Ge=r("input"),Gn=p(),Dt=r("div"),Kn=w(`Min height `),Ke=r("input"),Xn=p(),rt=r("div"),Ft=r("div"),Yn=w(`Max width `),Ve=r("input"),Qn=p(),Ht=r("div"),Jn=w(`Max height - `),qe=r("input"),cn=p(),dn=r("br"),hn=p(),Te=r("div"),at=r("div"),Xe=r("div"),N=r("div"),N.textContent="Inner Size",fn=p(),kt=r("span"),pn=w("Width: "),Ut=w(yt),mn=p(),vt=r("span"),gn=w("Height: "),Bt=w(Ct),_n=p(),Ne=r("div"),St=r("div"),St.textContent="Outer Size",bn=p(),Mt=r("span"),wn=w("Width: "),Vt=w(Lt),kn=p(),At=r("span"),yn=w("Height: "),qt=w(Pt),Zn=p(),Nt=r("div"),ut=r("div"),$n=r("div"),$n.textContent="Inner Logical Size",Tl=p(),xn=r("span"),zl=w("Width: "),Xi=w(ei),Ol=p(),ti=r("span"),Wl=w("Height: "),Yi=w(ni),Rl=p(),ot=r("div"),ii=r("div"),ii.textContent="Outer Logical Size",Dl=p(),li=r("span"),Fl=w("Width: "),Qi=w(si),Hl=p(),ri=r("span"),Ul=w("Height: "),Ji=w(ai),Bl=p(),jt=r("div"),ct=r("div"),ui=r("div"),ui.textContent="Inner Position",Vl=p(),oi=r("span"),ql=w("x: "),Zi=w(ci),Nl=p(),di=r("span"),jl=w("y: "),$i=w(hi),Gl=p(),dt=r("div"),fi=r("div"),fi.textContent="Outer Position",Kl=p(),pi=r("span"),Xl=w("x: "),xi=w(mi),Yl=p(),gi=r("span"),Ql=w("y: "),el=w(_i),Jl=p(),Gt=r("div"),ht=r("div"),bi=r("div"),bi.textContent="Inner Logical Position",Zl=p(),wi=r("span"),$l=w("x: "),tl=w(ki),xl=p(),yi=r("span"),es=w("y: "),nl=w(vi),ts=p(),ft=r("div"),Ci=r("div"),Ci.textContent="Outer Logical Position",ns=p(),Si=r("span"),is=w("x: "),il=w(Mi),ls=p(),Li=r("span"),ss=w("y: "),ll=w(Ai),sl=p(),rl=r("br"),al=p(),vn=r("h4"),vn.textContent="Cursor",ul=p(),xe=r("div"),Pi=r("label"),Kt=r("input"),rs=w(` + `),qe=r("input"),cn=p(),dn=r("br"),hn=p(),Te=r("div"),at=r("div"),Xe=r("div"),N=r("div"),N.textContent="Inner Size",fn=p(),kt=r("span"),pn=w("Width: "),Ut=w(yt),mn=p(),vt=r("span"),gn=w("Height: "),Bt=w(Ct),_n=p(),Ne=r("div"),St=r("div"),St.textContent="Outer Size",bn=p(),Mt=r("span"),wn=w("Width: "),Vt=w(Lt),kn=p(),Pt=r("span"),yn=w("Height: "),qt=w(At),Zn=p(),Nt=r("div"),ut=r("div"),$n=r("div"),$n.textContent="Inner Logical Size",Tl=p(),xn=r("span"),zl=w("Width: "),Xi=w(ei),Ol=p(),ti=r("span"),Wl=w("Height: "),Yi=w(ni),Rl=p(),ot=r("div"),ii=r("div"),ii.textContent="Outer Logical Size",Dl=p(),li=r("span"),Fl=w("Width: "),Qi=w(si),Hl=p(),ri=r("span"),Ul=w("Height: "),Ji=w(ai),Bl=p(),jt=r("div"),ct=r("div"),ui=r("div"),ui.textContent="Inner Position",Vl=p(),oi=r("span"),ql=w("x: "),Zi=w(ci),Nl=p(),di=r("span"),jl=w("y: "),$i=w(hi),Gl=p(),dt=r("div"),fi=r("div"),fi.textContent="Outer Position",Kl=p(),pi=r("span"),Xl=w("x: "),xi=w(mi),Yl=p(),gi=r("span"),Ql=w("y: "),el=w(_i),Jl=p(),Gt=r("div"),ht=r("div"),bi=r("div"),bi.textContent="Inner Logical Position",Zl=p(),wi=r("span"),$l=w("x: "),tl=w(ki),xl=p(),yi=r("span"),es=w("y: "),nl=w(vi),ts=p(),ft=r("div"),Ci=r("div"),Ci.textContent="Outer Logical Position",ns=p(),Si=r("span"),is=w("x: "),il=w(Mi),ls=p(),Li=r("span"),ss=w("y: "),ll=w(Pi),sl=p(),rl=r("br"),al=p(),vn=r("h4"),vn.textContent="Cursor",ul=p(),xe=r("div"),Ai=r("label"),Kt=r("input"),rs=w(` Grab`),as=p(),Ei=r("label"),Xt=r("input"),us=w(` Visible`),os=p(),Ii=r("label"),Yt=r("input"),cs=w(` Ignore events`),ol=p(),et=r("div"),Ti=r("label"),ds=w(`Icon @@ -29,15 +29,15 @@ var wr=Object.defineProperty;var kr=(t,e,n)=>e in t?wr(t,e,{enumerable:!0,config `),pt=r("input"),ps=p(),Oi=r("label"),ms=w(`Y position `),mt=r("input"),cl=p(),dl=r("br"),hl=p(),Cn=r("div"),Et=r("form"),gt=r("input"),gs=p(),Sn=r("button"),Sn.textContent="Set title",fl=p(),pl=r("br"),ml=p(),Mn=r("div"),Qt=r("div"),Wi=r("label"),_s=w(`Progress Status `),nt=r("select");for(let f=0;ft[83].call(tt)),a(pt,"class","input"),a(pt,"type","number"),a(mt,"class","input"),a(mt,"type","number"),a(et,"class","flex gap-2"),a(gt,"class","input grow"),a(gt,"id","title"),a(Sn,"class","btn"),a(Sn,"type","submit"),a(Et,"class","flex gap-1"),a(Cn,"class","flex flex-col gap-1"),a(nt,"class","input"),t[26]===void 0&&wt(()=>t[87].call(nt)),a(Ye,"class","input"),a(Ye,"type","number"),a(Ye,"min","0"),a(Ye,"max","100"),a(Qt,"class","flex gap-2"),a(Mn,"class","flex flex-col gap-1")},m(f,g){S(f,e,g),S(f,n,g),S(f,l,g),i(l,s),i(l,u),i(l,d),i(d,o),z(o,t[43]),i(d,c),i(d,h),S(f,k,g),S(f,b,g),S(f,O,g),S(f,_,g),i(_,A),i(_,v),i(_,E),i(_,V),i(_,D),i(_,L),i(_,W),S(f,P,g),S(f,I,g),i(I,R),i(R,Y),i(R,q),q.checked=t[6],i(I,Q),i(I,ie),i(ie,ee),i(ie,y),y.checked=t[2],i(I,B),i(I,G),i(G,oe),i(G,Z),Z.checked=t[3],i(I,we),i(I,be),i(be,fe),i(be,ce),ce.checked=t[4],i(I,$),i(I,pe),i(pe,K),i(pe,le),le.checked=t[5],i(I,te),i(I,T),i(T,J),i(T,H),H.checked=t[7],i(I,re),i(I,Le),i(Le,ke),i(Le,me),me.checked=t[8],i(I,Oe),i(I,Ae),i(Ae,We),i(Ae,ge),ge.checked=t[9],i(I,_e),i(I,Se),i(Se,Pe),i(Se,de),de.checked=t[10],i(I,Me),i(I,ae),i(ae,Re),i(ae,De),De.checked=t[11],S(f,Ee,g),S(f,ue,g),S(f,F,g),S(f,x,g),i(x,U),i(U,Ie),i(Ie,Dn),i(Ie,Fe),z(Fe,t[18]),i(U,Fn),i(U,zt),i(zt,Hn),i(zt,He),z(He,t[19]),i(x,Un),i(x,lt),i(lt,Ot),i(Ot,Bn),i(Ot,Ue),z(Ue,t[12]),i(lt,Vn),i(lt,Wt),i(Wt,qn),i(Wt,Be),z(Be,t[13]),i(x,Nn),i(x,st),i(st,Rt),i(Rt,jn),i(Rt,Ge),z(Ge,t[14]),i(st,Gn),i(st,Dt),i(Dt,Kn),i(Dt,Ke),z(Ke,t[15]),i(x,Xn),i(x,rt),i(rt,Ft),i(Ft,Yn),i(Ft,Ve),z(Ve,t[16]),i(rt,Qn),i(rt,Ht),i(Ht,Jn),i(Ht,qe),z(qe,t[17]),S(f,cn,g),S(f,dn,g),S(f,hn,g),S(f,Te,g),i(Te,at),i(at,Xe),i(Xe,N),i(Xe,fn),i(Xe,kt),i(kt,pn),i(kt,Ut),i(Xe,mn),i(Xe,vt),i(vt,gn),i(vt,Bt),i(at,_n),i(at,Ne),i(Ne,St),i(Ne,bn),i(Ne,Mt),i(Mt,wn),i(Mt,Vt),i(Ne,kn),i(Ne,At),i(At,yn),i(At,qt),i(Te,Zn),i(Te,Nt),i(Nt,ut),i(ut,$n),i(ut,Tl),i(ut,xn),i(xn,zl),i(xn,Xi),i(ut,Ol),i(ut,ti),i(ti,Wl),i(ti,Yi),i(Nt,Rl),i(Nt,ot),i(ot,ii),i(ot,Dl),i(ot,li),i(li,Fl),i(li,Qi),i(ot,Hl),i(ot,ri),i(ri,Ul),i(ri,Ji),i(Te,Bl),i(Te,jt),i(jt,ct),i(ct,ui),i(ct,Vl),i(ct,oi),i(oi,ql),i(oi,Zi),i(ct,Nl),i(ct,di),i(di,jl),i(di,$i),i(jt,Gl),i(jt,dt),i(dt,fi),i(dt,Kl),i(dt,pi),i(pi,Xl),i(pi,xi),i(dt,Yl),i(dt,gi),i(gi,Ql),i(gi,el),i(Te,Jl),i(Te,Gt),i(Gt,ht),i(ht,bi),i(ht,Zl),i(ht,wi),i(wi,$l),i(wi,tl),i(ht,xl),i(ht,yi),i(yi,es),i(yi,nl),i(Gt,ts),i(Gt,ft),i(ft,Ci),i(ft,ns),i(ft,Si),i(Si,is),i(Si,il),i(ft,ls),i(ft,Li),i(Li,ss),i(Li,ll),S(f,sl,g),S(f,rl,g),S(f,al,g),S(f,vn,g),S(f,ul,g),S(f,xe,g),i(xe,Pi),i(Pi,Kt),Kt.checked=t[20],i(Pi,rs),i(xe,as),i(xe,Ei),i(Ei,Xt),Xt.checked=t[21],i(Ei,us),i(xe,os),i(xe,Ii),i(Ii,Yt),Yt.checked=t[25],i(Ii,cs),S(f,ol,g),S(f,et,g),i(et,Ti),i(Ti,ds),i(Ti,tt);for(let j=0;jt[83].call(tt)),a(pt,"class","input"),a(pt,"type","number"),a(mt,"class","input"),a(mt,"type","number"),a(et,"class","flex gap-2"),a(gt,"class","input grow"),a(gt,"id","title"),a(Sn,"class","btn"),a(Sn,"type","submit"),a(Et,"class","flex gap-1"),a(Cn,"class","flex flex-col gap-1"),a(nt,"class","input"),t[26]===void 0&&wt(()=>t[87].call(nt)),a(Ye,"class","input"),a(Ye,"type","number"),a(Ye,"min","0"),a(Ye,"max","100"),a(Qt,"class","flex gap-2"),a(Mn,"class","flex flex-col gap-1")},m(f,g){S(f,e,g),S(f,n,g),S(f,l,g),i(l,s),i(l,u),i(l,d),i(d,o),z(o,t[43]),i(d,c),i(d,h),S(f,k,g),S(f,b,g),S(f,O,g),S(f,_,g),i(_,P),i(_,v),i(_,E),i(_,V),i(_,D),i(_,L),i(_,W),S(f,A,g),S(f,I,g),i(I,R),i(R,Y),i(R,q),q.checked=t[6],i(I,Q),i(I,ie),i(ie,ee),i(ie,y),y.checked=t[2],i(I,B),i(I,G),i(G,oe),i(G,Z),Z.checked=t[3],i(I,we),i(I,be),i(be,fe),i(be,ce),ce.checked=t[4],i(I,$),i(I,pe),i(pe,K),i(pe,le),le.checked=t[5],i(I,te),i(I,T),i(T,J),i(T,H),H.checked=t[7],i(I,re),i(I,Le),i(Le,ke),i(Le,me),me.checked=t[8],i(I,Oe),i(I,Pe),i(Pe,We),i(Pe,ge),ge.checked=t[9],i(I,_e),i(I,Se),i(Se,Ae),i(Se,de),de.checked=t[10],i(I,Me),i(I,ae),i(ae,Re),i(ae,De),De.checked=t[11],S(f,Ee,g),S(f,ue,g),S(f,F,g),S(f,x,g),i(x,U),i(U,Ie),i(Ie,Dn),i(Ie,Fe),z(Fe,t[18]),i(U,Fn),i(U,zt),i(zt,Hn),i(zt,He),z(He,t[19]),i(x,Un),i(x,lt),i(lt,Ot),i(Ot,Bn),i(Ot,Ue),z(Ue,t[12]),i(lt,Vn),i(lt,Wt),i(Wt,qn),i(Wt,Be),z(Be,t[13]),i(x,Nn),i(x,st),i(st,Rt),i(Rt,jn),i(Rt,Ge),z(Ge,t[14]),i(st,Gn),i(st,Dt),i(Dt,Kn),i(Dt,Ke),z(Ke,t[15]),i(x,Xn),i(x,rt),i(rt,Ft),i(Ft,Yn),i(Ft,Ve),z(Ve,t[16]),i(rt,Qn),i(rt,Ht),i(Ht,Jn),i(Ht,qe),z(qe,t[17]),S(f,cn,g),S(f,dn,g),S(f,hn,g),S(f,Te,g),i(Te,at),i(at,Xe),i(Xe,N),i(Xe,fn),i(Xe,kt),i(kt,pn),i(kt,Ut),i(Xe,mn),i(Xe,vt),i(vt,gn),i(vt,Bt),i(at,_n),i(at,Ne),i(Ne,St),i(Ne,bn),i(Ne,Mt),i(Mt,wn),i(Mt,Vt),i(Ne,kn),i(Ne,Pt),i(Pt,yn),i(Pt,qt),i(Te,Zn),i(Te,Nt),i(Nt,ut),i(ut,$n),i(ut,Tl),i(ut,xn),i(xn,zl),i(xn,Xi),i(ut,Ol),i(ut,ti),i(ti,Wl),i(ti,Yi),i(Nt,Rl),i(Nt,ot),i(ot,ii),i(ot,Dl),i(ot,li),i(li,Fl),i(li,Qi),i(ot,Hl),i(ot,ri),i(ri,Ul),i(ri,Ji),i(Te,Bl),i(Te,jt),i(jt,ct),i(ct,ui),i(ct,Vl),i(ct,oi),i(oi,ql),i(oi,Zi),i(ct,Nl),i(ct,di),i(di,jl),i(di,$i),i(jt,Gl),i(jt,dt),i(dt,fi),i(dt,Kl),i(dt,pi),i(pi,Xl),i(pi,xi),i(dt,Yl),i(dt,gi),i(gi,Ql),i(gi,el),i(Te,Jl),i(Te,Gt),i(Gt,ht),i(ht,bi),i(ht,Zl),i(ht,wi),i(wi,$l),i(wi,tl),i(ht,xl),i(ht,yi),i(yi,es),i(yi,nl),i(Gt,ts),i(Gt,ft),i(ft,Ci),i(ft,ns),i(ft,Si),i(Si,is),i(Si,il),i(ft,ls),i(ft,Li),i(Li,ss),i(Li,ll),S(f,sl,g),S(f,rl,g),S(f,al,g),S(f,vn,g),S(f,ul,g),S(f,xe,g),i(xe,Ai),i(Ai,Kt),Kt.checked=t[20],i(Ai,rs),i(xe,as),i(xe,Ei),i(Ei,Xt),Xt.checked=t[21],i(Ei,us),i(xe,os),i(xe,Ii),i(Ii,Yt),Yt.checked=t[25],i(Ii,cs),S(f,ol,g),S(f,et,g),i(et,Ti),i(Ti,ds),i(Ti,tt);for(let j=0;jt[89].call(u)),a(h,"class","input"),t[37]===void 0&&wt(()=>t[90].call(h)),a(_,"class","input"),a(_,"type","number"),a(n,"class","flex"),$t(L,"max-width","120px"),a(L,"class","input"),a(L,"type","number"),a(L,"placeholder","R"),$t(P,"max-width","120px"),a(P,"class","input"),a(P,"type","number"),a(P,"placeholder","G"),$t(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","B"),$t(q,"max-width","120px"),a(q,"class","input"),a(q,"type","number"),a(q,"placeholder","A"),a(D,"class","flex"),a(v,"class","flex"),a(ee,"class","btn"),$t(ee,"width","80px"),a(ie,"class","flex"),a(fe,"class","btn"),$t(fe,"width","80px"),a(B,"class","flex"),a(e,"class","flex flex-col gap-1")},m(T,J){S(T,e,J),i(e,n),i(n,l),i(l,s),i(l,u);for(let H=0;H=1,k,b,O,_=h&&Is(t),A=t[1][t[0]]&&zs(t);return{c(){e=r("div"),n=r("div"),l=r("input"),s=p(),u=r("button"),u.textContent="New window",d=p(),o=r("br"),c=p(),_&&_.c(),k=p(),A&&A.c(),a(l,"class","input grow"),a(l,"type","text"),a(l,"placeholder","New Window label.."),a(u,"class","btn"),a(n,"class","flex gap-1"),a(e,"class","flex flex-col children:grow gap-2")},m(v,E){S(v,e,E),i(e,n),i(n,l),z(l,t[28]),i(n,s),i(n,u),i(e,d),i(e,o),i(e,c),_&&_.m(e,null),i(e,k),A&&A.m(e,null),b||(O=[M(l,"input",t[58]),M(u,"click",t[53])],b=!0)},p(v,E){E[0]&268435456&&l.value!==v[28]&&z(l,v[28]),E[0]&2&&(h=Object.keys(v[1]).length>=1),h?_?_.p(v,E):(_=Is(v),_.c(),_.m(e,k)):_&&(_.d(1),_=null),v[1][v[0]]?A?A.p(v,E):(A=zs(v),A.c(),A.m(e,null)):A&&(A.d(1),A=null)},i:ne,o:ne,d(v){v&&C(e),_&&_.d(),A&&A.d(),b=!1,Ce(O)}}}function ta(t,e,n){const l=or();let s=l.label;const u={[l.label]:l},d=["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"],o=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],c=navigator.appVersion.includes("Windows"),h=navigator.appVersion.includes("Macintosh");let k=c?o:Object.keys(Gi).map(N=>Gi[N]).filter(N=>!o.includes(N));const b=Object.keys(Ki).map(N=>Ki[N]),O=Object.keys(ji).map(N=>ji[N]);let{onMessage:_}=e;const A=document.querySelector("main");let v,E=!0,V=!0,D=!0,L=!0,W=!1,P=!0,I=!1,R=!1,Y=!0,q=!1,Q=null,ie=null,ee=null,y=null,B=null,G=null,oe=null,Z=null,we=1,be=new it(oe,Z),fe=new it(oe,Z),ce=new ln(Q,ie),$=new ln(Q,ie),pe,K,le=!1,te=!0,T=null,J=null,H="default",re=!1,Le="Awesome Tauri Example!",ke=[],me,Oe,Ae,We,ge,_e,Se,Pe="none",de=0,Me;function ae(){u[s].setTitle(Le)}function Re(){u[s].hide(),setTimeout(u[s].show,2e3)}function De(){u[s].minimize(),setTimeout(u[s].unminimize,2e3)}function Ee(){if(!v)return;const N=new Rn(v);n(1,u[v]=N,u),N.once("tauri://error",function(){_("Error creating new webview")})}function ue(){u[s].innerSize().then(N=>{n(32,ce=N),n(12,Q=ce.width),n(13,ie=ce.height)}),u[s].outerSize().then(N=>{n(33,$=N)})}function F(){u[s].innerPosition().then(N=>{n(30,be=N)}),u[s].outerPosition().then(N=>{n(31,fe=N),n(18,oe=fe.x),n(19,Z=fe.y)})}async function x(N){N&&(pe&&pe(),K&&K(),K=await N.listen("tauri://move",F),pe=await N.listen("tauri://resize",ue))}async function U(){await u[s].minimize(),await u[s].requestUserAttention(Ni.Critical),await new Promise(N=>setTimeout(N,3e3)),await u[s].requestUserAttention(null)}async function Ie(){ke.includes(me)||n(35,ke=[...ke,me]);const N={effects:ke,state:Oe,radius:Ae};Number.isInteger(We)&&Number.isInteger(ge)&&Number.isInteger(_e)&&Number.isInteger(Se)&&(N.color=[We,ge,_e,Se]),A.classList.remove("bg-primary"),A.classList.remove("dark:bg-darkPrimary"),await u[s].clearEffects(),await u[s].setEffects(N)}async function Dn(){n(35,ke=[]),await u[s].clearEffects(),A.classList.add("bg-primary"),A.classList.add("dark:bg-darkPrimary")}function Fe(){v=this.value,n(28,v)}function Fn(){s=An(this),n(0,s),n(1,u)}function zt(){Me=this.value,n(43,Me)}const Hn=()=>u[s].center();function He(){W=this.checked,n(6,W)}function Un(){E=this.checked,n(2,E)}function lt(){V=this.checked,n(3,V)}function Ot(){D=this.checked,n(4,D)}function Bn(){L=this.checked,n(5,L)}function Ue(){P=this.checked,n(7,P)}function Vn(){I=this.checked,n(8,I)}function Wt(){R=this.checked,n(9,R)}function qn(){Y=this.checked,n(10,Y)}function Be(){q=this.checked,n(11,q)}function Nn(){oe=X(this.value),n(18,oe)}function st(){Z=X(this.value),n(19,Z)}function Rt(){Q=X(this.value),n(12,Q)}function jn(){ie=X(this.value),n(13,ie)}function Ge(){ee=X(this.value),n(14,ee)}function Gn(){y=X(this.value),n(15,y)}function Dt(){B=X(this.value),n(16,B)}function Kn(){G=X(this.value),n(17,G)}function Ke(){le=this.checked,n(20,le)}function Xn(){te=this.checked,n(21,te)}function rt(){re=this.checked,n(25,re)}function Ft(){H=An(this),n(24,H),n(44,d)}function Yn(){T=X(this.value),n(22,T)}function Ve(){J=X(this.value),n(23,J)}function Qn(){Le=this.value,n(34,Le)}function Ht(){Pe=An(this),n(26,Pe),n(49,O)}function Jn(){de=X(this.value),n(27,de)}function qe(){me=An(this),n(36,me),n(47,k)}function cn(){Oe=An(this),n(37,Oe),n(48,b)}function dn(){Ae=X(this.value),n(38,Ae)}function hn(){We=X(this.value),n(39,We)}function Te(){ge=X(this.value),n(40,ge)}function at(){_e=X(this.value),n(41,_e)}function Xe(){Se=X(this.value),n(42,Se)}return t.$$set=N=>{"onMessage"in N&&n(57,_=N.onMessage)},t.$$.update=()=>{var N,fn,kt,pn,yt,Ut,mn,vt,gn,Ct,Bt,_n,Ne,St,bn,Mt,wn,Lt,Vt,kn,At,yn,Pt,qt;t.$$.dirty[0]&3&&(u[s],F(),ue()),t.$$.dirty[0]&7&&((N=u[s])==null||N.setResizable(E)),t.$$.dirty[0]&11&&((fn=u[s])==null||fn.setMaximizable(V)),t.$$.dirty[0]&19&&((kt=u[s])==null||kt.setMinimizable(D)),t.$$.dirty[0]&35&&((pn=u[s])==null||pn.setClosable(L)),t.$$.dirty[0]&67&&(W?(yt=u[s])==null||yt.maximize():(Ut=u[s])==null||Ut.unmaximize()),t.$$.dirty[0]&131&&((mn=u[s])==null||mn.setDecorations(P)),t.$$.dirty[0]&259&&((vt=u[s])==null||vt.setAlwaysOnTop(I)),t.$$.dirty[0]&515&&((gn=u[s])==null||gn.setAlwaysOnBottom(R)),t.$$.dirty[0]&1027&&((Ct=u[s])==null||Ct.setContentProtected(Y)),t.$$.dirty[0]&2051&&((Bt=u[s])==null||Bt.setFullscreen(q)),t.$$.dirty[0]&12291&&Q&&ie&&((_n=u[s])==null||_n.setSize(new ln(Q,ie))),t.$$.dirty[0]&49155&&(ee&&y?(Ne=u[s])==null||Ne.setMinSize(new Ll(ee,y)):(St=u[s])==null||St.setMinSize(null)),t.$$.dirty[0]&196611&&(B>800&&G>400?(bn=u[s])==null||bn.setMaxSize(new Ll(B,G)):(Mt=u[s])==null||Mt.setMaxSize(null)),t.$$.dirty[0]&786435&&oe!==null&&Z!==null&&((wn=u[s])==null||wn.setPosition(new it(oe,Z))),t.$$.dirty[0]&3&&((Lt=u[s])==null||Lt.scaleFactor().then(Zn=>n(29,we=Zn))),t.$$.dirty[0]&3&&x(u[s]),t.$$.dirty[0]&1048579&&((Vt=u[s])==null||Vt.setCursorGrab(le)),t.$$.dirty[0]&2097155&&((kn=u[s])==null||kn.setCursorVisible(te)),t.$$.dirty[0]&16777219&&((At=u[s])==null||At.setCursorIcon(H)),t.$$.dirty[0]&12582915&&T!==null&&J!==null&&((yn=u[s])==null||yn.setCursorPosition(new it(T,J))),t.$$.dirty[0]&33554435&&((Pt=u[s])==null||Pt.setIgnoreCursorEvents(re)),t.$$.dirty[0]&201326595&&((qt=u[s])==null||qt.setProgressBar({status:Pe,progress:de}))},[s,u,E,V,D,L,W,P,I,R,Y,q,Q,ie,ee,y,B,G,oe,Z,le,te,T,J,H,re,Pe,de,v,we,be,fe,ce,$,Le,ke,me,Oe,Ae,We,ge,_e,Se,Me,d,c,h,k,b,O,ae,Re,De,Ee,U,Ie,Dn,_,Fe,Fn,zt,Hn,He,Un,lt,Ot,Bn,Ue,Vn,Wt,qn,Be,Nn,st,Rt,jn,Ge,Gn,Dt,Kn,Ke,Xn,rt,Ft,Yn,Ve,Qn,Ht,Jn,qe,cn,dn,hn,Te,at,Xe]}class na extends $e{constructor(e){super(),Ze(this,e,ta,ea,je,{onMessage:57},null,[-1,-1,-1,-1])}}function ia(t){let e;return{c(){e=r("div"),e.innerHTML='
Not available for Linux
',a(e,"class","flex flex-col gap-2")},m(n,l){S(n,e,l)},p:ne,i:ne,o:ne,d(n){n&&C(e)}}}function la(t,e,n){let{onMessage:l}=e;const s=window.constraints={audio:!0,video:!0};function u(o){const c=document.querySelector("video"),h=o.getVideoTracks();l("Got stream with constraints:",s),l(`Using video device: ${h[0].label}`),window.stream=o,c.srcObject=o}function d(o){if(o.name==="ConstraintNotSatisfiedError"){const c=s.video;l(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else o.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: ${o.name}`,o)}return Vi(async()=>{try{const o=await navigator.mediaDevices.getUserMedia(s);u(o)}catch(o){d(o)}}),er(()=>{var o;(o=window.stream)==null||o.getTracks().forEach(function(c){c.stop()})}),t.$$set=o=>{"onMessage"in o&&n(0,l=o.onMessage)},[l]}class sa extends $e{constructor(e){super(),Ze(this,e,la,ia,je,{onMessage:0})}}function ra(t){let e,n,l,s,u,d;return{c(){e=r("div"),n=r("button"),n.textContent="Show",l=p(),s=r("button"),s.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(s,"class","btn"),a(s,"id","hide")},m(o,c){S(o,e,c),i(e,n),i(e,l),i(e,s),u||(d=[M(n,"click",t[0]),M(s,"click",t[1])],u=!0)},p:ne,i:ne,o:ne,d(o){o&&C(e),u=!1,Ce(d)}}}function aa(t,e,n){let{onMessage:l}=e;function s(){u().then(()=>{setTimeout(()=>{Vr().then(()=>l("Shown app")).catch(l)},2e3)}).catch(l)}function u(){return qr().then(()=>l("Hide app")).catch(l)}return t.$$set=d=>{"onMessage"in d&&n(2,l=d.onMessage)},[s,u,l]}class ua extends $e{constructor(e){super(),Ze(this,e,aa,ra,je,{onMessage:2})}}var Hi;class cr{get rid(){return Wn(this,Hi,"f")}constructor(e){Hi.set(this,void 0),qi(this,Hi,e,"f")}async close(){return m("plugin:resources|close",{rid:this.rid})}}Hi=new WeakMap;var Ui,Bi;async function un(t,e){const n=new rr;let l=null;return e&&typeof e=="object"&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&e.items&&(l=e.items.map(s=>[s.rid,s.kind]))),m("plugin:menu|new",{kind:t,options:e?{...e,items:l}:void 0,handler:n})}class on extends cr{get id(){return Wn(this,Ui,"f")}get kind(){return Wn(this,Bi,"f")}constructor(e,n,l){super(e),Ui.set(this,void 0),Bi.set(this,void 0),qi(this,Ui,n,"f"),qi(this,Bi,l,"f")}}Ui=new WeakMap,Bi=new WeakMap;function vl([t,e,n]){switch(n){case"Submenu":return new dr(t,e);case"Predefined":return new PredefinedMenuItem(t,e);case"Check":return new CheckMenuItem(t,e);case"Icon":return new IconMenuItem(t,e);case"MenuItem":default:return new MenuItem(t,e)}}let dr=class hr extends on{constructor(e,n){super(e,n,"Submenu")}static async new(e){return un("Submenu",e).then(([n,l])=>new hr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(l=>[l.rid,l.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(vl)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(vl))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?vl(n):null)}async popup(e,n){let l=null;return e&&(l={type:e instanceof it?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:l})}async setAsWindowsMenuForNSApp(){return m("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return m("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}},oa=class fr extends on{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return un("MenuItem",e).then(([n,l])=>new fr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}};function Cl([t,e,n]){switch(n){case"Submenu":return new Submenu(t,e);case"Predefined":return new PredefinedMenuItem(t,e);case"Check":return new CheckMenuItem(t,e);case"Icon":return new IconMenuItem(t,e);case"MenuItem":default:return new MenuItem(t,e)}}class bt extends on{constructor(e,n){super(e,n,"Menu")}static async new(e){return un("Menu",e).then(([n,l])=>new bt(n,l))}static async default(){return m("plugin:menu|default").then(([e,n])=>new bt(e,n))}async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(l=>[l.rid,l.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(Cl)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(Cl))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?Cl(n):null)}async popup(e,n){let l=null;return e&&(l={type:e instanceof it?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:l})}async setAsAppMenu(){return m("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new bt(e[0],e[1]):null)}async setAsWindowMenu(e){return m("plugin:menu|set_as_window_menu",{rid:this.rid,window:(e==null?void 0:e.label)??null}).then(n=>n?new bt(n[0],n[1]):null)}}let pr=class mr extends on{constructor(e,n){super(e,n,"Check")}static async new(e){return un("Check",e).then(([n,l])=>new mr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return m("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return m("plugin:menu|set_checked",{rid:this.rid,checked:e})}};var Fs;(function(t){t.Add="Add",t.Advanced="Advanced",t.Bluetooth="Bluetooth",t.Bookmarks="Bookmarks",t.Caution="Caution",t.ColorPanel="ColorPanel",t.ColumnView="ColumnView",t.Computer="Computer",t.EnterFullScreen="EnterFullScreen",t.Everyone="Everyone",t.ExitFullScreen="ExitFullScreen",t.FlowView="FlowView",t.Folder="Folder",t.FolderBurnable="FolderBurnable",t.FolderSmart="FolderSmart",t.FollowLinkFreestanding="FollowLinkFreestanding",t.FontPanel="FontPanel",t.GoLeft="GoLeft",t.GoRight="GoRight",t.Home="Home",t.IChatTheater="IChatTheater",t.IconView="IconView",t.Info="Info",t.InvalidDataFreestanding="InvalidDataFreestanding",t.LeftFacingTriangle="LeftFacingTriangle",t.ListView="ListView",t.LockLocked="LockLocked",t.LockUnlocked="LockUnlocked",t.MenuMixedState="MenuMixedState",t.MenuOnState="MenuOnState",t.MobileMe="MobileMe",t.MultipleDocuments="MultipleDocuments",t.Network="Network",t.Path="Path",t.PreferencesGeneral="PreferencesGeneral",t.QuickLook="QuickLook",t.RefreshFreestanding="RefreshFreestanding",t.Refresh="Refresh",t.Remove="Remove",t.RevealFreestanding="RevealFreestanding",t.RightFacingTriangle="RightFacingTriangle",t.Share="Share",t.Slideshow="Slideshow",t.SmartBadge="SmartBadge",t.StatusAvailable="StatusAvailable",t.StatusNone="StatusNone",t.StatusPartiallyAvailable="StatusPartiallyAvailable",t.StatusUnavailable="StatusUnavailable",t.StopProgressFreestanding="StopProgressFreestanding",t.StopProgress="StopProgress",t.TrashEmpty="TrashEmpty",t.TrashFull="TrashFull",t.User="User",t.UserAccounts="UserAccounts",t.UserGroup="UserGroup",t.UserGuest="UserGuest"})(Fs||(Fs={}));let ca=class gr extends on{constructor(e,n){super(e,n,"Icon")}static async new(e){return un("Icon",e).then(([n,l])=>new gr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return m("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return m("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},da=class _r extends on{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return un("MenuItem",e).then(([n,l])=>new _r(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}};function Hs(t,e,n){const l=t.slice();return l[16]=e[n],l[17]=e,l[18]=n,l}function Us(t,e,n){const l=t.slice();return l[19]=e[n],l[20]=e,l[21]=n,l}function Bs(t){let e,n,l,s,u,d,o=t[19]+"",c,h,k,b,O;function _(){t[9].call(n,t[20],t[21])}return{c(){e=r("div"),n=r("input"),u=p(),d=r("label"),c=w(o),k=p(),a(n,"id",l=t[19]+"Input"),n.checked=s=t[0]===t[19],a(n,"type","radio"),a(n,"name","kind"),a(d,"for",h=t[19]+"Input"),a(e,"class","flex gap-1")},m(A,v){S(A,e,v),i(e,n),z(n,t[19]),i(e,u),i(e,d),i(d,c),i(e,k),b||(O=[M(n,"change",t[6]),M(n,"change",_)],b=!0)},p(A,v){t=A,v&16&&l!==(l=t[19]+"Input")&&a(n,"id",l),v&17&&s!==(s=t[0]===t[19])&&(n.checked=s),v&16&&z(n,t[19]),v&16&&o!==(o=t[19]+"")&&se(c,o),v&16&&h!==(h=t[19]+"Input")&&a(d,"for",h)},d(A){A&&C(e),b=!1,Ce(O)}}}function Vs(t){let e,n,l;return{c(){e=r("input"),a(e,"class","input"),a(e,"type","text"),a(e,"placeholder","Text")},m(s,u){S(s,e,u),z(e,t[1]),n||(l=M(e,"input",t[10]),n=!0)},p(s,u){u&2&&e.value!==s[1]&&z(e,s[1])},d(s){s&&C(e),n=!1,l()}}}function ha(t){let e,n=he(t[5]),l=[];for(let s=0;sl("itemClick",{id:I,text:P})},W=await oa.new(L);break;case"Icon":L={text:u,icon:d,action:I=>l("itemClick",{id:I,text:P})},W=await ca.new(L);break;case"Check":L={text:u,checked:c,action:I=>l("itemClick",{id:I,text:P})},W=await pr.new(L);break;case"Predefined":L={item:o},W=await da.new(L);break}l("new",{item:W,options:L}),n(1,u=""),o=""}function A(L,W){L[W]=this.value,n(4,h)}function v(){u=this.value,n(1,u)}function E(){d=this.value,n(2,d)}function V(){c=this.checked,n(3,c)}function D(L,W){L[W]=this.value,n(5,k)}return[s,u,d,c,h,k,b,O,_,A,v,E,V,D]}class _a extends $e{constructor(e){super(),Ze(this,e,ga,ma,je,{})}}function Ns(t,e,n){const l=t.slice();return l[5]=e[n],l}function js(t){let e,n,l,s,u,d=Gs(t[5])+"",o,c;return{c(){e=r("div"),n=r("div"),s=p(),u=r("p"),o=w(d),c=p(),a(n,"class",l=t[3](t[5])),a(e,"class","flex flex-row gap-1")},m(h,k){S(h,e,k),i(e,n),i(e,s),i(e,u),i(u,o),i(e,c)},p(h,k){k&1&&l!==(l=h[3](h[5]))&&a(n,"class",l),k&1&&d!==(d=Gs(h[5])+"")&&se(o,d)},d(h){h&&C(e)}}}function ba(t){let e,n,l,s,u;n=new _a({}),n.$on("new",t[1]),n.$on("itemClick",t[2]);let d=he(t[0]),o=[];for(let c=0;c{"items"in c&&n(0,l=c.items)},[l,u,d,o]}class br extends $e{constructor(e){super(),Ze(this,e,wa,ba,je,{items:0})}}function ka(t){let e,n,l,s,u,d,o,c,h,k;function b(_){t[5](_)}let O={};return t[0]!==void 0&&(O.items=t[0]),n=new br({props:O}),Tn.push(()=>lr(n,"items",b)),n.$on("itemClick",t[3]),{c(){e=r("div"),On(n.$$.fragment),s=p(),u=r("button"),u.textContent="Create menu",d=p(),o=r("button"),o.textContent="Popup",a(u,"class","btn"),a(o,"class","btn")},m(_,A){S(_,e,A),rn(n,e,null),i(e,s),i(e,u),i(e,d),i(e,o),c=!0,h||(k=[M(u,"click",t[1]),M(o,"click",t[2])],h=!0)},p(_,[A]){const v={};!l&&A&1&&(l=!0,v.items=_[0],nr(()=>l=!1)),n.$set(v)},i(_){c||(sn(n.$$.fragment,_),c=!0)},o(_){zn(n.$$.fragment,_),c=!1},d(_){_&&C(e),an(n),h=!1,Ce(k)}}}function ya(t,e,n){let{onMessage:l}=e,s=[],u=null,d=null,o=0;const c=navigator.userAgent.includes("Macintosh");async function h(){d=await dr.new({text:"app",items:s.map(_=>_.item)}),o=s.length,u=await bt.new({items:[d]}),await(c?u.setAsAppMenu():u.setAsWindowMenu())}async function k(){(!d||o!==s.length)&&await h(),(await bt.new({items:[d]})).popup()}function b(_){l(`Item ${_.detail.text} clicked`)}function O(_){s=_,n(0,s)}return t.$$set=_=>{"onMessage"in _&&n(4,l=_.onMessage)},[s,h,k,b,l,O]}class va extends $e{constructor(e){super(),Ze(this,e,ya,ka,je,{onMessage:4})}}class Il extends cr{constructor(e,n){super(e),this.id=n}static async new(e){e!=null&&e.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e!=null&&e.icon&&(e.icon=typeof e.icon=="string"?e.icon:Array.from(e.icon));const n=new rr;return e!=null&&e.action&&(n.onmessage=e.action,delete e.action),m("plugin:tray|new",{options:e??{},handler:n}).then(([l,s])=>new Il(l,s))}async setIcon(e){let n=null;return e&&(n=typeof e=="string"?e:Array.from(e)),m("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),m("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return m("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return m("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return m("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return m("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return m("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return m("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}function Ca(t){let e,n,l,s,u,d,o,c,h,k,b,O,_,A,v,E,V,D,L,W,P,I,R,Y,q,Q;function ie(y){t[14](y)}let ee={};return t[5]!==void 0&&(ee.items=t[5]),L=new br({props:ee}),Tn.push(()=>lr(L,"items",ie)),L.$on("itemClick",t[6]),{c(){e=r("div"),n=r("div"),l=r("input"),s=p(),u=r("input"),d=p(),o=r("label"),c=w(`Menu on left click - `),h=r("input"),k=p(),b=r("div"),O=r("input"),_=p(),A=r("label"),v=w(`Icon as template - `),E=r("input"),V=p(),D=r("div"),On(L.$$.fragment),P=p(),I=r("div"),R=r("button"),R.textContent="Create tray",a(l,"class","input grow"),a(l,"type","text"),a(l,"placeholder","Title"),a(u,"class","input grow"),a(u,"type","text"),a(u,"placeholder","Tooltip"),a(h,"type","checkbox"),a(n,"class","flex gap-1"),a(O,"class","input grow"),a(O,"type","text"),a(O,"placeholder","Icon path"),a(E,"type","checkbox"),a(b,"class","flex gap-1"),a(D,"class","flex children:grow"),a(R,"class","btn"),a(R,"title","Creates the tray icon"),a(I,"class","flex"),a(e,"class","flex flex-col children:grow gap-2")},m(y,B){S(y,e,B),i(e,n),i(n,l),z(l,t[2]),i(n,s),i(n,u),z(u,t[1]),i(n,d),i(n,o),i(o,c),i(o,h),h.checked=t[4],i(e,k),i(e,b),i(b,O),z(O,t[0]),i(b,_),i(b,A),i(A,v),i(A,E),E.checked=t[3],i(e,V),i(e,D),rn(L,D,null),i(e,P),i(e,I),i(I,R),Y=!0,q||(Q=[M(l,"input",t[9]),M(u,"input",t[10]),M(h,"change",t[11]),M(O,"input",t[12]),M(E,"change",t[13]),M(R,"click",t[7])],q=!0)},p(y,[B]){B&4&&l.value!==y[2]&&z(l,y[2]),B&2&&u.value!==y[1]&&z(u,y[1]),B&16&&(h.checked=y[4]),B&1&&O.value!==y[0]&&z(O,y[0]),B&8&&(E.checked=y[3]);const G={};!W&&B&32&&(W=!0,G.items=y[5],nr(()=>W=!1)),L.$set(G)},i(y){Y||(sn(L.$$.fragment,y),Y=!0)},o(y){zn(L.$$.fragment,y),Y=!1},d(y){y&&C(e),an(L),q=!1,Ce(Q)}}}function Sa(t,e,n){let{onMessage:l}=e,s=null,u=null,d=null,o=!1,c=!0,h=[];function k(D){l(`Item ${D.detail.text} clicked`)}async function b(){Il.new({icon:s,tooltip:u,title:d,iconAsTemplate:o,menuOnLeftClick:c,menu:await bt.new({items:h.map(D=>D.item)}),action:D=>l(D)}).catch(l)}function O(){d=this.value,n(2,d)}function _(){u=this.value,n(1,u)}function A(){c=this.checked,n(4,c)}function v(){s=this.value,n(0,s)}function E(){o=this.checked,n(3,o)}function V(D){h=D,n(5,h)}return t.$$set=D=>{"onMessage"in D&&n(8,l=D.onMessage)},[s,u,d,o,c,h,k,b,l,O,_,A,v,E,V]}class Ma extends $e{constructor(e){super(),Ze(this,e,Sa,Ca,je,{onMessage:8})}}function Ks(t,e,n){const l=t.slice();return l[26]=e[n],l}function Xs(t,e,n){const l=t.slice();return l[29]=e[n],l}function La(t){let e;return{c(){e=r("span"),a(e,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,l){S(n,e,l)},d(n){n&&C(e)}}}function Aa(t){let e;return{c(){e=r("span"),a(e,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,l){S(n,e,l)},d(n){n&&C(e)}}}function Pa(t){let e,n;return{c(){e=w(`Switch to Dark mode + `),_=r("input"),P=p(),v=r("div"),E=r("label"),V=w(`Color + `),D=r("div"),L=r("input"),W=p(),A=r("input"),I=p(),R=r("input"),Y=p(),q=r("input"),Q=p(),ie=r("div"),ee=r("button"),ee.textContent="Add",y=p(),B=r("div"),G=r("div"),oe=w("Applied effects: "),we=w(Z),be=p(),fe=r("button"),fe.textContent="Clear",a(u,"class","input"),t[36]===void 0&&wt(()=>t[89].call(u)),a(h,"class","input"),t[37]===void 0&&wt(()=>t[90].call(h)),a(_,"class","input"),a(_,"type","number"),a(n,"class","flex"),$t(L,"max-width","120px"),a(L,"class","input"),a(L,"type","number"),a(L,"placeholder","R"),$t(A,"max-width","120px"),a(A,"class","input"),a(A,"type","number"),a(A,"placeholder","G"),$t(R,"max-width","120px"),a(R,"class","input"),a(R,"type","number"),a(R,"placeholder","B"),$t(q,"max-width","120px"),a(q,"class","input"),a(q,"type","number"),a(q,"placeholder","A"),a(D,"class","flex"),a(v,"class","flex"),a(ee,"class","btn"),$t(ee,"width","80px"),a(ie,"class","flex"),a(fe,"class","btn"),$t(fe,"width","80px"),a(B,"class","flex"),a(e,"class","flex flex-col gap-1")},m(T,J){S(T,e,J),i(e,n),i(n,l),i(l,s),i(l,u);for(let H=0;H=1,k,b,O,_=h&&Is(t),P=t[1][t[0]]&&zs(t);return{c(){e=r("div"),n=r("div"),l=r("input"),s=p(),u=r("button"),u.textContent="New window",d=p(),o=r("br"),c=p(),_&&_.c(),k=p(),P&&P.c(),a(l,"class","input grow"),a(l,"type","text"),a(l,"placeholder","New Window label.."),a(u,"class","btn"),a(n,"class","flex gap-1"),a(e,"class","flex flex-col children:grow gap-2")},m(v,E){S(v,e,E),i(e,n),i(n,l),z(l,t[28]),i(n,s),i(n,u),i(e,d),i(e,o),i(e,c),_&&_.m(e,null),i(e,k),P&&P.m(e,null),b||(O=[M(l,"input",t[58]),M(u,"click",t[53])],b=!0)},p(v,E){E[0]&268435456&&l.value!==v[28]&&z(l,v[28]),E[0]&2&&(h=Object.keys(v[1]).length>=1),h?_?_.p(v,E):(_=Is(v),_.c(),_.m(e,k)):_&&(_.d(1),_=null),v[1][v[0]]?P?P.p(v,E):(P=zs(v),P.c(),P.m(e,null)):P&&(P.d(1),P=null)},i:ne,o:ne,d(v){v&&C(e),_&&_.d(),P&&P.d(),b=!1,Ce(O)}}}function ta(t,e,n){const l=or();let s=l.label;const u={[l.label]:l},d=["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"],o=["mica","blur","acrylic","tabbed","tabbedDark","tabbedLight"],c=navigator.appVersion.includes("Windows"),h=navigator.appVersion.includes("Macintosh");let k=c?o:Object.keys(Gi).map(N=>Gi[N]).filter(N=>!o.includes(N));const b=Object.keys(Ki).map(N=>Ki[N]),O=Object.keys(ji).map(N=>ji[N]);let{onMessage:_}=e;const P=document.querySelector("main");let v,E=!0,V=!0,D=!0,L=!0,W=!1,A=!0,I=!1,R=!1,Y=!0,q=!1,Q=null,ie=null,ee=null,y=null,B=null,G=null,oe=null,Z=null,we=1,be=new it(oe,Z),fe=new it(oe,Z),ce=new ln(Q,ie),$=new ln(Q,ie),pe,K,le=!1,te=!0,T=null,J=null,H="default",re=!1,Le="Awesome Tauri Example!",ke=[],me,Oe,Pe,We,ge,_e,Se,Ae="none",de=0,Me;function ae(){u[s].setTitle(Le)}function Re(){u[s].hide(),setTimeout(u[s].show,2e3)}function De(){u[s].minimize(),setTimeout(u[s].unminimize,2e3)}function Ee(){if(!v)return;const N=new Rn(v);n(1,u[v]=N,u),N.once("tauri://error",function(){_("Error creating new webview")})}function ue(){u[s].innerSize().then(N=>{n(32,ce=N),n(12,Q=ce.width),n(13,ie=ce.height)}),u[s].outerSize().then(N=>{n(33,$=N)})}function F(){u[s].innerPosition().then(N=>{n(30,be=N)}),u[s].outerPosition().then(N=>{n(31,fe=N),n(18,oe=fe.x),n(19,Z=fe.y)})}async function x(N){N&&(pe&&pe(),K&&K(),K=await N.listen("tauri://move",F),pe=await N.listen("tauri://resize",ue))}async function U(){await u[s].minimize(),await u[s].requestUserAttention(Ni.Critical),await new Promise(N=>setTimeout(N,3e3)),await u[s].requestUserAttention(null)}async function Ie(){ke.includes(me)||n(35,ke=[...ke,me]);const N={effects:ke,state:Oe,radius:Pe};Number.isInteger(We)&&Number.isInteger(ge)&&Number.isInteger(_e)&&Number.isInteger(Se)&&(N.color=[We,ge,_e,Se]),P.classList.remove("bg-primary"),P.classList.remove("dark:bg-darkPrimary"),await u[s].clearEffects(),await u[s].setEffects(N)}async function Dn(){n(35,ke=[]),await u[s].clearEffects(),P.classList.add("bg-primary"),P.classList.add("dark:bg-darkPrimary")}function Fe(){v=this.value,n(28,v)}function Fn(){s=Pn(this),n(0,s),n(1,u)}function zt(){Me=this.value,n(43,Me)}const Hn=()=>u[s].center();function He(){W=this.checked,n(6,W)}function Un(){E=this.checked,n(2,E)}function lt(){V=this.checked,n(3,V)}function Ot(){D=this.checked,n(4,D)}function Bn(){L=this.checked,n(5,L)}function Ue(){A=this.checked,n(7,A)}function Vn(){I=this.checked,n(8,I)}function Wt(){R=this.checked,n(9,R)}function qn(){Y=this.checked,n(10,Y)}function Be(){q=this.checked,n(11,q)}function Nn(){oe=X(this.value),n(18,oe)}function st(){Z=X(this.value),n(19,Z)}function Rt(){Q=X(this.value),n(12,Q)}function jn(){ie=X(this.value),n(13,ie)}function Ge(){ee=X(this.value),n(14,ee)}function Gn(){y=X(this.value),n(15,y)}function Dt(){B=X(this.value),n(16,B)}function Kn(){G=X(this.value),n(17,G)}function Ke(){le=this.checked,n(20,le)}function Xn(){te=this.checked,n(21,te)}function rt(){re=this.checked,n(25,re)}function Ft(){H=Pn(this),n(24,H),n(44,d)}function Yn(){T=X(this.value),n(22,T)}function Ve(){J=X(this.value),n(23,J)}function Qn(){Le=this.value,n(34,Le)}function Ht(){Ae=Pn(this),n(26,Ae),n(49,O)}function Jn(){de=X(this.value),n(27,de)}function qe(){me=Pn(this),n(36,me),n(47,k)}function cn(){Oe=Pn(this),n(37,Oe),n(48,b)}function dn(){Pe=X(this.value),n(38,Pe)}function hn(){We=X(this.value),n(39,We)}function Te(){ge=X(this.value),n(40,ge)}function at(){_e=X(this.value),n(41,_e)}function Xe(){Se=X(this.value),n(42,Se)}return t.$$set=N=>{"onMessage"in N&&n(57,_=N.onMessage)},t.$$.update=()=>{var N,fn,kt,pn,yt,Ut,mn,vt,gn,Ct,Bt,_n,Ne,St,bn,Mt,wn,Lt,Vt,kn,Pt,yn,At,qt;t.$$.dirty[0]&3&&(u[s],F(),ue()),t.$$.dirty[0]&7&&((N=u[s])==null||N.setResizable(E)),t.$$.dirty[0]&11&&((fn=u[s])==null||fn.setMaximizable(V)),t.$$.dirty[0]&19&&((kt=u[s])==null||kt.setMinimizable(D)),t.$$.dirty[0]&35&&((pn=u[s])==null||pn.setClosable(L)),t.$$.dirty[0]&67&&(W?(yt=u[s])==null||yt.maximize():(Ut=u[s])==null||Ut.unmaximize()),t.$$.dirty[0]&131&&((mn=u[s])==null||mn.setDecorations(A)),t.$$.dirty[0]&259&&((vt=u[s])==null||vt.setAlwaysOnTop(I)),t.$$.dirty[0]&515&&((gn=u[s])==null||gn.setAlwaysOnBottom(R)),t.$$.dirty[0]&1027&&((Ct=u[s])==null||Ct.setContentProtected(Y)),t.$$.dirty[0]&2051&&((Bt=u[s])==null||Bt.setFullscreen(q)),t.$$.dirty[0]&12291&&Q&&ie&&((_n=u[s])==null||_n.setSize(new ln(Q,ie))),t.$$.dirty[0]&49155&&(ee&&y?(Ne=u[s])==null||Ne.setMinSize(new Ll(ee,y)):(St=u[s])==null||St.setMinSize(null)),t.$$.dirty[0]&196611&&(B>800&&G>400?(bn=u[s])==null||bn.setMaxSize(new Ll(B,G)):(Mt=u[s])==null||Mt.setMaxSize(null)),t.$$.dirty[0]&786435&&oe!==null&&Z!==null&&((wn=u[s])==null||wn.setPosition(new it(oe,Z))),t.$$.dirty[0]&3&&((Lt=u[s])==null||Lt.scaleFactor().then(Zn=>n(29,we=Zn))),t.$$.dirty[0]&3&&x(u[s]),t.$$.dirty[0]&1048579&&((Vt=u[s])==null||Vt.setCursorGrab(le)),t.$$.dirty[0]&2097155&&((kn=u[s])==null||kn.setCursorVisible(te)),t.$$.dirty[0]&16777219&&((Pt=u[s])==null||Pt.setCursorIcon(H)),t.$$.dirty[0]&12582915&&T!==null&&J!==null&&((yn=u[s])==null||yn.setCursorPosition(new it(T,J))),t.$$.dirty[0]&33554435&&((At=u[s])==null||At.setIgnoreCursorEvents(re)),t.$$.dirty[0]&201326595&&((qt=u[s])==null||qt.setProgressBar({status:Ae,progress:de}))},[s,u,E,V,D,L,W,A,I,R,Y,q,Q,ie,ee,y,B,G,oe,Z,le,te,T,J,H,re,Ae,de,v,we,be,fe,ce,$,Le,ke,me,Oe,Pe,We,ge,_e,Se,Me,d,c,h,k,b,O,ae,Re,De,Ee,U,Ie,Dn,_,Fe,Fn,zt,Hn,He,Un,lt,Ot,Bn,Ue,Vn,Wt,qn,Be,Nn,st,Rt,jn,Ge,Gn,Dt,Kn,Ke,Xn,rt,Ft,Yn,Ve,Qn,Ht,Jn,qe,cn,dn,hn,Te,at,Xe]}class na extends $e{constructor(e){super(),Ze(this,e,ta,ea,je,{onMessage:57},null,[-1,-1,-1,-1])}}function ia(t){let e;return{c(){e=r("div"),e.innerHTML='
Not available for Linux
',a(e,"class","flex flex-col gap-2")},m(n,l){S(n,e,l)},p:ne,i:ne,o:ne,d(n){n&&C(e)}}}function la(t,e,n){let{onMessage:l}=e;const s=window.constraints={audio:!0,video:!0};function u(o){const c=document.querySelector("video"),h=o.getVideoTracks();l("Got stream with constraints:",s),l(`Using video device: ${h[0].label}`),window.stream=o,c.srcObject=o}function d(o){if(o.name==="ConstraintNotSatisfiedError"){const c=s.video;l(`The resolution ${c.width.exact}x${c.height.exact} px is not supported by your device.`)}else o.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: ${o.name}`,o)}return Vi(async()=>{try{const o=await navigator.mediaDevices.getUserMedia(s);u(o)}catch(o){d(o)}}),er(()=>{var o;(o=window.stream)==null||o.getTracks().forEach(function(c){c.stop()})}),t.$$set=o=>{"onMessage"in o&&n(0,l=o.onMessage)},[l]}class sa extends $e{constructor(e){super(),Ze(this,e,la,ia,je,{onMessage:0})}}function ra(t){let e,n,l,s,u,d;return{c(){e=r("div"),n=r("button"),n.textContent="Show",l=p(),s=r("button"),s.textContent="Hide",a(n,"class","btn"),a(n,"id","show"),a(n,"title","Hides and shows the app after 2 seconds"),a(s,"class","btn"),a(s,"id","hide")},m(o,c){S(o,e,c),i(e,n),i(e,l),i(e,s),u||(d=[M(n,"click",t[0]),M(s,"click",t[1])],u=!0)},p:ne,i:ne,o:ne,d(o){o&&C(e),u=!1,Ce(d)}}}function aa(t,e,n){let{onMessage:l}=e;function s(){u().then(()=>{setTimeout(()=>{Vr().then(()=>l("Shown app")).catch(l)},2e3)}).catch(l)}function u(){return qr().then(()=>l("Hide app")).catch(l)}return t.$$set=d=>{"onMessage"in d&&n(2,l=d.onMessage)},[s,u,l]}class ua extends $e{constructor(e){super(),Ze(this,e,aa,ra,je,{onMessage:2})}}var Hi;class cr{get rid(){return Wn(this,Hi,"f")}constructor(e){Hi.set(this,void 0),qi(this,Hi,e,"f")}async close(){return m("plugin:resources|close",{rid:this.rid})}}Hi=new WeakMap;var Ui,Bi;async function un(t,e){const n=new rr;let l=null;return e&&typeof e=="object"&&("action"in e&&e.action&&(n.onmessage=e.action,delete e.action),"items"in e&&e.items&&(l=e.items.map(s=>[s.rid,s.kind]))),m("plugin:menu|new",{kind:t,options:e?{...e,items:l}:void 0,handler:n})}class on extends cr{get id(){return Wn(this,Ui,"f")}get kind(){return Wn(this,Bi,"f")}constructor(e,n,l){super(e),Ui.set(this,void 0),Bi.set(this,void 0),qi(this,Ui,n,"f"),qi(this,Bi,l,"f")}}Ui=new WeakMap,Bi=new WeakMap;function vl([t,e,n]){switch(n){case"Submenu":return new dr(t,e);case"Predefined":return new PredefinedMenuItem(t,e);case"Check":return new CheckMenuItem(t,e);case"Icon":return new IconMenuItem(t,e);case"MenuItem":default:return new MenuItem(t,e)}}let dr=class hr extends on{constructor(e,n){super(e,n,"Submenu")}static async new(e){return un("Submenu",e).then(([n,l])=>new hr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(l=>[l.rid,l.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(vl)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(vl))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?vl(n):null)}async popup(e,n){let l=null;return e&&(l={type:e instanceof it?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:l})}async setAsWindowsMenuForNSApp(){return m("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return m("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}},oa=class fr extends on{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return un("MenuItem",e).then(([n,l])=>new fr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}};function Cl([t,e,n]){switch(n){case"Submenu":return new Submenu(t,e);case"Predefined":return new PredefinedMenuItem(t,e);case"Check":return new CheckMenuItem(t,e);case"Icon":return new IconMenuItem(t,e);case"MenuItem":default:return new MenuItem(t,e)}}class bt extends on{constructor(e,n){super(e,n,"Menu")}static async new(e){return un("Menu",e).then(([n,l])=>new bt(n,l))}static async default(){return m("plugin:menu|default").then(([e,n])=>new bt(e,n))}async append(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async prepend(e){return m("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(n=>[n.rid,n.kind])})}async insert(e,n){return m("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map(l=>[l.rid,l.kind]),position:n})}async remove(e){return m("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return m("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(Cl)}async items(){return m("plugin:menu|append",{rid:this.rid,kind:this.kind}).then(e=>e.map(Cl))}async get(e){return m("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then(n=>n?Cl(n):null)}async popup(e,n){let l=null;return e&&(l={type:e instanceof it?"Physical":"Logical",data:e}),m("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:(n==null?void 0:n.label)??null,at:l})}async setAsAppMenu(){return m("plugin:menu|set_as_app_menu",{rid:this.rid}).then(e=>e?new bt(e[0],e[1]):null)}async setAsWindowMenu(e){return m("plugin:menu|set_as_window_menu",{rid:this.rid,window:(e==null?void 0:e.label)??null}).then(n=>n?new bt(n[0],n[1]):null)}}let pr=class mr extends on{constructor(e,n){super(e,n,"Check")}static async new(e){return un("Check",e).then(([n,l])=>new mr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return m("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return m("plugin:menu|set_checked",{rid:this.rid,checked:e})}};var Fs;(function(t){t.Add="Add",t.Advanced="Advanced",t.Bluetooth="Bluetooth",t.Bookmarks="Bookmarks",t.Caution="Caution",t.ColorPanel="ColorPanel",t.ColumnView="ColumnView",t.Computer="Computer",t.EnterFullScreen="EnterFullScreen",t.Everyone="Everyone",t.ExitFullScreen="ExitFullScreen",t.FlowView="FlowView",t.Folder="Folder",t.FolderBurnable="FolderBurnable",t.FolderSmart="FolderSmart",t.FollowLinkFreestanding="FollowLinkFreestanding",t.FontPanel="FontPanel",t.GoLeft="GoLeft",t.GoRight="GoRight",t.Home="Home",t.IChatTheater="IChatTheater",t.IconView="IconView",t.Info="Info",t.InvalidDataFreestanding="InvalidDataFreestanding",t.LeftFacingTriangle="LeftFacingTriangle",t.ListView="ListView",t.LockLocked="LockLocked",t.LockUnlocked="LockUnlocked",t.MenuMixedState="MenuMixedState",t.MenuOnState="MenuOnState",t.MobileMe="MobileMe",t.MultipleDocuments="MultipleDocuments",t.Network="Network",t.Path="Path",t.PreferencesGeneral="PreferencesGeneral",t.QuickLook="QuickLook",t.RefreshFreestanding="RefreshFreestanding",t.Refresh="Refresh",t.Remove="Remove",t.RevealFreestanding="RevealFreestanding",t.RightFacingTriangle="RightFacingTriangle",t.Share="Share",t.Slideshow="Slideshow",t.SmartBadge="SmartBadge",t.StatusAvailable="StatusAvailable",t.StatusNone="StatusNone",t.StatusPartiallyAvailable="StatusPartiallyAvailable",t.StatusUnavailable="StatusUnavailable",t.StopProgressFreestanding="StopProgressFreestanding",t.StopProgress="StopProgress",t.TrashEmpty="TrashEmpty",t.TrashFull="TrashFull",t.User="User",t.UserAccounts="UserAccounts",t.UserGroup="UserGroup",t.UserGuest="UserGuest"})(Fs||(Fs={}));let ca=class gr extends on{constructor(e,n){super(e,n,"Icon")}static async new(e){return un("Icon",e).then(([n,l])=>new gr(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return m("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return m("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return m("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return m("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return m("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},da=class _r extends on{constructor(e,n){super(e,n,"Predefined")}static async new(e){return un("Predefined",e).then(([n,l])=>new _r(n,l))}async text(){return m("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return m("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}};function Hs(t,e,n){const l=t.slice();return l[16]=e[n],l[17]=e,l[18]=n,l}function Us(t,e,n){const l=t.slice();return l[19]=e[n],l[20]=e,l[21]=n,l}function Bs(t){let e,n,l,s,u,d,o=t[19]+"",c,h,k,b,O;function _(){t[9].call(n,t[20],t[21])}return{c(){e=r("div"),n=r("input"),u=p(),d=r("label"),c=w(o),k=p(),a(n,"id",l=t[19]+"Input"),n.checked=s=t[0]===t[19],a(n,"type","radio"),a(n,"name","kind"),a(d,"for",h=t[19]+"Input"),a(e,"class","flex gap-1")},m(P,v){S(P,e,v),i(e,n),z(n,t[19]),i(e,u),i(e,d),i(d,c),i(e,k),b||(O=[M(n,"change",t[6]),M(n,"change",_)],b=!0)},p(P,v){t=P,v&16&&l!==(l=t[19]+"Input")&&a(n,"id",l),v&17&&s!==(s=t[0]===t[19])&&(n.checked=s),v&16&&z(n,t[19]),v&16&&o!==(o=t[19]+"")&&se(c,o),v&16&&h!==(h=t[19]+"Input")&&a(d,"for",h)},d(P){P&&C(e),b=!1,Ce(O)}}}function Vs(t){let e,n,l;return{c(){e=r("input"),a(e,"class","input"),a(e,"type","text"),a(e,"placeholder","Text")},m(s,u){S(s,e,u),z(e,t[1]),n||(l=M(e,"input",t[10]),n=!0)},p(s,u){u&2&&e.value!==s[1]&&z(e,s[1])},d(s){s&&C(e),n=!1,l()}}}function ha(t){let e,n=he(t[5]),l=[];for(let s=0;sl("itemClick",{id:I,text:A})},W=await oa.new(L);break;case"Icon":L={text:u,icon:d,action:I=>l("itemClick",{id:I,text:A})},W=await ca.new(L);break;case"Check":L={text:u,checked:c,action:I=>l("itemClick",{id:I,text:A})},W=await pr.new(L);break;case"Predefined":L={item:o},W=await da.new(L);break}l("new",{item:W,options:L}),n(1,u=""),o=""}function P(L,W){L[W]=this.value,n(4,h)}function v(){u=this.value,n(1,u)}function E(){d=this.value,n(2,d)}function V(){c=this.checked,n(3,c)}function D(L,W){L[W]=this.value,n(5,k)}return[s,u,d,c,h,k,b,O,_,P,v,E,V,D]}class _a extends $e{constructor(e){super(),Ze(this,e,ga,ma,je,{})}}function Ns(t,e,n){const l=t.slice();return l[5]=e[n],l}function js(t){let e,n,l,s,u,d=Gs(t[5])+"",o,c;return{c(){e=r("div"),n=r("div"),s=p(),u=r("p"),o=w(d),c=p(),a(n,"class",l=t[3](t[5])),a(e,"class","flex flex-row gap-1")},m(h,k){S(h,e,k),i(e,n),i(e,s),i(e,u),i(u,o),i(e,c)},p(h,k){k&1&&l!==(l=h[3](h[5]))&&a(n,"class",l),k&1&&d!==(d=Gs(h[5])+"")&&se(o,d)},d(h){h&&C(e)}}}function ba(t){let e,n,l,s,u;n=new _a({}),n.$on("new",t[1]),n.$on("itemClick",t[2]);let d=he(t[0]),o=[];for(let c=0;c{"items"in c&&n(0,l=c.items)},[l,u,d,o]}class br extends $e{constructor(e){super(),Ze(this,e,wa,ba,je,{items:0})}}function ka(t){let e,n,l,s,u,d,o,c,h,k;function b(_){t[5](_)}let O={};return t[0]!==void 0&&(O.items=t[0]),n=new br({props:O}),Tn.push(()=>lr(n,"items",b)),n.$on("itemClick",t[3]),{c(){e=r("div"),On(n.$$.fragment),s=p(),u=r("button"),u.textContent="Create menu",d=p(),o=r("button"),o.textContent="Popup",a(u,"class","btn"),a(o,"class","btn")},m(_,P){S(_,e,P),rn(n,e,null),i(e,s),i(e,u),i(e,d),i(e,o),c=!0,h||(k=[M(u,"click",t[1]),M(o,"click",t[2])],h=!0)},p(_,[P]){const v={};!l&&P&1&&(l=!0,v.items=_[0],nr(()=>l=!1)),n.$set(v)},i(_){c||(sn(n.$$.fragment,_),c=!0)},o(_){zn(n.$$.fragment,_),c=!1},d(_){_&&C(e),an(n),h=!1,Ce(k)}}}function ya(t,e,n){let{onMessage:l}=e,s=[],u=null,d=null,o=0;const c=navigator.userAgent.includes("Macintosh");async function h(){d=await dr.new({text:"app",items:s.map(_=>_.item)}),o=s.length,u=await bt.new({items:[d]}),await(c?u.setAsAppMenu():u.setAsWindowMenu())}async function k(){(!d||o!==s.length)&&await h(),(await bt.new({items:[d]})).popup()}function b(_){l(`Item ${_.detail.text} clicked`)}function O(_){s=_,n(0,s)}return t.$$set=_=>{"onMessage"in _&&n(4,l=_.onMessage)},[s,h,k,b,l,O]}class va extends $e{constructor(e){super(),Ze(this,e,ya,ka,je,{onMessage:4})}}class Il extends cr{constructor(e,n){super(e),this.id=n}static async new(e){e!=null&&e.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e!=null&&e.icon&&(e.icon=typeof e.icon=="string"?e.icon:Array.from(e.icon));const n=new rr;return e!=null&&e.action&&(n.onmessage=e.action,delete e.action),m("plugin:tray|new",{options:e??{},handler:n}).then(([l,s])=>new Il(l,s))}async setIcon(e){let n=null;return e&&(n=typeof e=="string"?e:Array.from(e)),m("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),m("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return m("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return m("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return m("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return m("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return m("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return m("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}function Ca(t){let e,n,l,s,u,d,o,c,h,k,b,O,_,P,v,E,V,D,L,W,A,I,R,Y,q,Q;function ie(y){t[14](y)}let ee={};return t[5]!==void 0&&(ee.items=t[5]),L=new br({props:ee}),Tn.push(()=>lr(L,"items",ie)),L.$on("itemClick",t[6]),{c(){e=r("div"),n=r("div"),l=r("input"),s=p(),u=r("input"),d=p(),o=r("label"),c=w(`Menu on left click + `),h=r("input"),k=p(),b=r("div"),O=r("input"),_=p(),P=r("label"),v=w(`Icon as template + `),E=r("input"),V=p(),D=r("div"),On(L.$$.fragment),A=p(),I=r("div"),R=r("button"),R.textContent="Create tray",a(l,"class","input grow"),a(l,"type","text"),a(l,"placeholder","Title"),a(u,"class","input grow"),a(u,"type","text"),a(u,"placeholder","Tooltip"),a(h,"type","checkbox"),a(n,"class","flex gap-1"),a(O,"class","input grow"),a(O,"type","text"),a(O,"placeholder","Icon path"),a(E,"type","checkbox"),a(b,"class","flex gap-1"),a(D,"class","flex children:grow"),a(R,"class","btn"),a(R,"title","Creates the tray icon"),a(I,"class","flex"),a(e,"class","flex flex-col children:grow gap-2")},m(y,B){S(y,e,B),i(e,n),i(n,l),z(l,t[2]),i(n,s),i(n,u),z(u,t[1]),i(n,d),i(n,o),i(o,c),i(o,h),h.checked=t[4],i(e,k),i(e,b),i(b,O),z(O,t[0]),i(b,_),i(b,P),i(P,v),i(P,E),E.checked=t[3],i(e,V),i(e,D),rn(L,D,null),i(e,A),i(e,I),i(I,R),Y=!0,q||(Q=[M(l,"input",t[9]),M(u,"input",t[10]),M(h,"change",t[11]),M(O,"input",t[12]),M(E,"change",t[13]),M(R,"click",t[7])],q=!0)},p(y,[B]){B&4&&l.value!==y[2]&&z(l,y[2]),B&2&&u.value!==y[1]&&z(u,y[1]),B&16&&(h.checked=y[4]),B&1&&O.value!==y[0]&&z(O,y[0]),B&8&&(E.checked=y[3]);const G={};!W&&B&32&&(W=!0,G.items=y[5],nr(()=>W=!1)),L.$set(G)},i(y){Y||(sn(L.$$.fragment,y),Y=!0)},o(y){zn(L.$$.fragment,y),Y=!1},d(y){y&&C(e),an(L),q=!1,Ce(Q)}}}function Sa(t,e,n){let{onMessage:l}=e,s=null,u=null,d=null,o=!1,c=!0,h=[];function k(D){l(`Item ${D.detail.text} clicked`)}async function b(){Il.new({icon:s,tooltip:u,title:d,iconAsTemplate:o,menuOnLeftClick:c,menu:await bt.new({items:h.map(D=>D.item)}),action:D=>l(D)}).catch(l)}function O(){d=this.value,n(2,d)}function _(){u=this.value,n(1,u)}function P(){c=this.checked,n(4,c)}function v(){s=this.value,n(0,s)}function E(){o=this.checked,n(3,o)}function V(D){h=D,n(5,h)}return t.$$set=D=>{"onMessage"in D&&n(8,l=D.onMessage)},[s,u,d,o,c,h,k,b,l,O,_,P,v,E,V]}class Ma extends $e{constructor(e){super(),Ze(this,e,Sa,Ca,je,{onMessage:8})}}function Ks(t,e,n){const l=t.slice();return l[26]=e[n],l}function Xs(t,e,n){const l=t.slice();return l[29]=e[n],l}function La(t){let e;return{c(){e=r("span"),a(e,"class","i-codicon-menu animate-duration-300ms animate-fade-in")},m(n,l){S(n,e,l)},d(n){n&&C(e)}}}function Pa(t){let e;return{c(){e=r("span"),a(e,"class","i-codicon-close animate-duration-300ms animate-fade-in")},m(n,l){S(n,e,l)},d(n){n&&C(e)}}}function Aa(t){let e,n;return{c(){e=w(`Switch to Dark mode `),n=r("div"),a(n,"class","i-ph-moon")},m(l,s){S(l,e,s),S(l,n,s)},d(l){l&&(C(e),C(n))}}}function Ea(t){let e,n;return{c(){e=w(`Switch to Light mode - `),n=r("div"),a(n,"class","i-ph-sun")},m(l,s){S(l,e,s),S(l,n,s)},d(l){l&&(C(e),C(n))}}}function Ia(t){let e,n,l,s,u,d,o;function c(){return t[14](t[29])}return{c(){e=r("a"),n=r("div"),l=p(),s=r("p"),s.textContent=`${t[29].label}`,a(n,"class",t[29].icon+" mr-2"),a(e,"href","##"),a(e,"class",u="nv "+(t[1]===t[29]?"nv_selected":""))},m(h,k){S(h,e,k),i(e,n),i(e,l),i(e,s),d||(o=M(e,"click",c),d=!0)},p(h,k){t=h,k[0]&2&&u!==(u="nv "+(t[1]===t[29]?"nv_selected":""))&&a(e,"class",u)},d(h){h&&C(e),d=!1,o()}}}function Ys(t){let e,n=t[29]&&Ia(t);return{c(){n&&n.c(),e=Al()},m(l,s){n&&n.m(l,s),S(l,e,s)},p(l,s){l[29]&&n.p(l,s)},d(l){l&&C(e),n&&n.d(l)}}}function Qs(t){let e,n=t[26].html+"",l;return{c(){e=new Pr(!1),l=Al(),e.a=l},m(s,u){e.m(n,s,u),S(s,l,u)},p(s,u){u[0]&16&&n!==(n=s[26].html+"")&&e.p(n)},d(s){s&&(C(l),e.d())}}}function Ta(t){let e,n,l,s,u,d,o,c,h,k,b,O,_,A,v,E,V,D,L,W,P,I,R,Y,q,Q,ie,ee,y,B,G,oe,Z=t[1].label+"",we,be,fe,ce,$,pe,K,le,te,T,J,H,re,Le,ke,me,Oe,Ae;function We(F,x){return F[0]?Aa:La}let ge=We(t),_e=ge(t);function Se(F,x){return F[2]?Ea:Pa}let Pe=Se(t),de=Pe(t),Me=he(t[5]),ae=[];for(let F=0;F`,V=p(),D=r("a"),D.innerHTML=`GitHub `,L=p(),W=r("a"),W.innerHTML=`Source - `,P=p(),I=r("br"),R=p(),Y=r("div"),q=p(),Q=r("br"),ie=p(),ee=r("div");for(let F=0;F
',Le=p(),ke=r("div");for(let F=0;F{an(U,1)}),Wr()}Re?($=Cs(Re,De(F)),On($.$$.fragment),sn($.$$.fragment,1),rn($,ce,null)):$=null}if(x[0]&16){Ee=he(F[4]);let U;for(U=0;U{y.ctrlKey&&y.key==="b"&&m("toggle_menu")});const s=navigator.userAgent.toLowerCase(),u=s.includes("android")||s.includes("iphone"),d=[{label:"Welcome",component:Gr,icon:"i-ph-hand-waving"},{label:"Communication",component:Qr,icon:"i-codicon-radio-tower"},!u&&{label:"App",component:ua,icon:"i-codicon-hubot"},{label:"Window",component:na,icon:"i-codicon-window"},{label:"Menu",component:va,icon:"i-ph-list"},{label:"Tray",component:Ma,icon:"i-ph-tray"},{label:"WebRTC",component:sa,icon:"i-ph-broadcast"}];let o=d[0];function c(y){n(1,o=y)}let h;Vi(()=>{n(2,h=localStorage&&localStorage.getItem("theme")=="dark"),Zs(h)});function k(){n(2,h=!h),Zs(h)}let b=Fr([]);Sr(t,b,y=>n(4,l=y));function O(y){b.update(B=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof y=="string"?y:JSON.stringify(y,null,1))+"
"},...B])}function _(y){b.update(B=>[{html:`
[${new Date().toLocaleTimeString()}]: `+y+"
"},...B])}function A(){b.update(()=>[])}let v,E,V;function D(y){V=y.clientY;const B=window.getComputedStyle(v);E=parseInt(B.height,10);const G=Z=>{const we=Z.clientY-V,be=E-we;n(3,v.style.height=`${be{document.removeEventListener("mouseup",oe),document.removeEventListener("mousemove",G)};document.addEventListener("mouseup",oe),document.addEventListener("mousemove",G)}let L=!1,W,P,I=!1,R=0,Y=0;const q=(y,B,G)=>Math.min(Math.max(B,y),G);Vi(()=>{n(13,W=document.querySelector("#sidebar")),P=document.querySelector("#sidebarToggle"),document.addEventListener("click",y=>{P.contains(y.target)?n(0,L=!L):L&&!W.contains(y.target)&&n(0,L=!1)}),document.addEventListener("touchstart",y=>{if(P.contains(y.target))return;const B=y.touches[0].clientX;(0{if(I){const B=y.touches[0].clientX;Y=B;const G=(B-R)/10;W.style.setProperty("--translate-x",`-${q(0,L?0-G:18.75-G,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(I){const y=(Y-R)/10;n(0,L=L?y>-(18.75/2):y>18.75/2)}I=!1})});const Q=y=>{c(y),n(0,L=!1)},ie=y=>y.key==="Enter"?A():{};function ee(y){Tn[y?"unshift":"push"](()=>{v=y,n(3,v)})}return t.$$.update=()=>{if(t.$$.dirty[0]&1){const y=document.querySelector("#sidebar");y&&za(y,L)}},[L,o,h,v,l,d,c,k,b,O,_,A,D,W,Q,ie,ee]}class Wa extends $e{constructor(e){super(),Ze(this,e,Oa,Ta,je,{},null,[-1,-1])}}new Wa({target:document.querySelector("#app")}); + `,A=p(),I=r("br"),R=p(),Y=r("div"),q=p(),Q=r("br"),ie=p(),ee=r("div");for(let F=0;F
',Le=p(),ke=r("div");for(let F=0;F{an(U,1)}),Wr()}Re?($=Cs(Re,De(F)),On($.$$.fragment),sn($.$$.fragment,1),rn($,ce,null)):$=null}if(x[0]&16){Ee=he(F[4]);let U;for(U=0;U{y.ctrlKey&&y.key==="b"&&m("toggle_menu")});const s=navigator.userAgent.toLowerCase(),u=s.includes("android")||s.includes("iphone"),d=[{label:"Welcome",component:Gr,icon:"i-ph-hand-waving"},{label:"Communication",component:Qr,icon:"i-codicon-radio-tower"},!u&&{label:"App",component:ua,icon:"i-codicon-hubot"},{label:"Window",component:na,icon:"i-codicon-window"},{label:"Menu",component:va,icon:"i-ph-list"},{label:"Tray",component:Ma,icon:"i-ph-tray"},{label:"WebRTC",component:sa,icon:"i-ph-broadcast"}];let o=d[0];function c(y){n(1,o=y)}let h;Vi(()=>{n(2,h=localStorage&&localStorage.getItem("theme")=="dark"),Zs(h)});function k(){n(2,h=!h),Zs(h)}let b=Fr([]);Sr(t,b,y=>n(4,l=y));function O(y){b.update(B=>[{html:`
[${new Date().toLocaleTimeString()}]: `+(typeof y=="string"?y:JSON.stringify(y,null,1))+"
"},...B])}function _(y){b.update(B=>[{html:`
[${new Date().toLocaleTimeString()}]: `+y+"
"},...B])}function P(){b.update(()=>[])}let v,E,V;function D(y){V=y.clientY;const B=window.getComputedStyle(v);E=parseInt(B.height,10);const G=Z=>{const we=Z.clientY-V,be=E-we;n(3,v.style.height=`${be{document.removeEventListener("mouseup",oe),document.removeEventListener("mousemove",G)};document.addEventListener("mouseup",oe),document.addEventListener("mousemove",G)}let L=!1,W,A,I=!1,R=0,Y=0;const q=(y,B,G)=>Math.min(Math.max(B,y),G);Vi(()=>{n(13,W=document.querySelector("#sidebar")),A=document.querySelector("#sidebarToggle"),document.addEventListener("click",y=>{A.contains(y.target)?n(0,L=!L):L&&!W.contains(y.target)&&n(0,L=!1)}),document.addEventListener("touchstart",y=>{if(A.contains(y.target))return;const B=y.touches[0].clientX;(0{if(I){const B=y.touches[0].clientX;Y=B;const G=(B-R)/10;W.style.setProperty("--translate-x",`-${q(0,L?0-G:18.75-G,18.75)}rem`)}}),document.addEventListener("touchend",()=>{if(I){const y=(Y-R)/10;n(0,L=L?y>-(18.75/2):y>18.75/2)}I=!1})});const Q=y=>{c(y),n(0,L=!1)},ie=y=>y.key==="Enter"?P():{};function ee(y){Tn[y?"unshift":"push"](()=>{v=y,n(3,v)})}return t.$$.update=()=>{if(t.$$.dirty[0]&1){const y=document.querySelector("#sidebar");y&&za(y,L)}},[L,o,h,v,l,d,c,k,b,O,_,P,D,W,Q,ie,ee]}class Wa extends $e{constructor(e){super(),Ze(this,e,Oa,Ta,je,{},null,[-1,-1])}}new Wa({target:document.querySelector("#app")}); diff --git a/tooling/api/src/menu/predefinedMenuItem.ts b/tooling/api/src/menu/predefinedMenuItem.ts index cba2f61ba3b..f78cf051eb9 100644 --- a/tooling/api/src/menu/predefinedMenuItem.ts +++ b/tooling/api/src/menu/predefinedMenuItem.ts @@ -110,14 +110,14 @@ export interface PredefinedMenuItemOptions { export class PredefinedMenuItem extends MenuItemBase { /** @ignore */ protected constructor(rid: number, id: string) { - super(rid, id, 'MenuItem') + super(rid, id, 'Predefined') } /** Create a new predefined menu item. */ static async new( opts?: PredefinedMenuItemOptions ): Promise { - return newMenu('MenuItem', opts).then( + return newMenu('Predefined', opts).then( ([rid, id]) => new PredefinedMenuItem(rid, id) ) } From d0eeaba4198c3b04b5f252bd87f5ff87b3359fe2 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 13:09:51 -0300 Subject: [PATCH 55/64] allow using objects directly for menu item construction for static menus allows something like: ```javascript await Menu.new({ items: [ { item: 'Copy' }, { text: 'Something', action: () => console.log('something clicked') }, { id: 'x', icon: '/home/lucas/projects/tauri/tauri/examples/.icons/32x32.png', text: 'Tauris', action: () => console.log('tauri clicked') }, { checked: true, text: 'chec', action: () => console.log('chec clicked') }, { text: 'Sub', items: [ { item: 'Paste' }, { text: 'subsubsub', action: () => console.log('sub clicked') } ] } ] }) ``` --- core/tauri/scripts/bundle.global.js | 2 +- core/tauri/src/ipc/channel.rs | 47 ++-- core/tauri/src/menu/plugin.rs | 385 ++++++++++++++++++++------- tooling/api/src/menu.ts | 17 +- tooling/api/src/menu/base.ts | 31 ++- tooling/api/src/menu/iconMenuItem.ts | 10 +- tooling/api/src/menu/menu.ts | 32 ++- tooling/api/src/menu/submenu.ts | 25 +- 8 files changed, 397 insertions(+), 152 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index cb4186d51b1..8b2f2962579 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1 +1 @@ -var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i;function r(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=r((e=>{n(this,i,"f").call(this,e)}))}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}i=new WeakMap;class s{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var o=Object.freeze({__proto__:null,Channel:a,PluginListener:s,addPluginListener:async function(e,n,t){const i=new a;return i.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:i}).then((()=>new s(e,n,i.id)))},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:l,transformCallback:r});var u,c=Object.freeze({__proto__:null,getName:async function(){return l("plugin:app|name")},getTauriVersion:async function(){return l("plugin:app|tauri_version")},getVersion:async function(){return l("plugin:app|version")},hide:async function(){return l("plugin:app|app_hide")},show:async function(){return l("plugin:app|app_show")}});async function d(e,n){await l("plugin:event|unlisten",{event:e,eventId:n})}async function p(e,n,t){return l("plugin:event|listen",{event:e,windowLabel:t?.target,handler:r(n)}).then((n=>async()=>d(e,n)))}async function h(e,n,t){return p(e,(t=>{n(t),d(e,t.id).catch((()=>{}))}),t)}async function y(e,n,t){await l("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}!function(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"}(u||(u={}));var g=Object.freeze({__proto__:null,get TauriEvent(){return u},emit:y,listen:p,once:h});class w{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class _{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new w(this.width/e,this.height/e)}}class m{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class b{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new m(this.x/e,this.y/e)}}var f,v,k=Object.freeze({__proto__:null,LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(f||(f={}));class D{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}}function A(){return new L(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function I(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new L(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(v||(v={}));const E=["tauri://created","tauri://error"];class L{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||l("plugin:window|create",{options:{...n,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return I().some((n=>n.label===e))?new L(e,{skip:!0}):null}static getCurrent(){return A()}static getAll(){return I()}static async getFocusedWindow(){for(const e of I())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):p(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):h(e,n,{target:this.label})}async emit(e,n){if(E.includes(e)){for(const t of this.listeners[e]||[])t({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return y(e,n,{target:this.label})}_handleTauriEvent(e,n){return!!E.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return l("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return l("plugin:window|inner_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async outerPosition(){return l("plugin:window|outer_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async innerSize(){return l("plugin:window|inner_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async outerSize(){return l("plugin:window|outer_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async isFullscreen(){return l("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return l("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return l("plugin:window|is_maximized",{label:this.label})}async isFocused(){return l("plugin:window|is_focused",{label:this.label})}async isDecorated(){return l("plugin:window|is_decorated",{label:this.label})}async isResizable(){return l("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return l("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return l("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return l("plugin:window|is_closable",{label:this.label})}async isVisible(){return l("plugin:window|is_visible",{label:this.label})}async title(){return l("plugin:window|title",{label:this.label})}async theme(){return l("plugin:window|theme",{label:this.label})}async center(){return l("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===f.Critical?{type:"Critical"}:{type:"Informational"}),l("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return l("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return l("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return l("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return l("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return l("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return l("plugin:window|maximize",{label:this.label})}async unmaximize(){return l("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return l("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return l("plugin:window|minimize",{label:this.label})}async unminimize(){return l("plugin:window|unminimize",{label:this.label})}async show(){return l("plugin:window|show",{label:this.label})}async hide(){return l("plugin:window|hide",{label:this.label})}async close(){return l("plugin:window|close",{label:this.label})}async setDecorations(e){return l("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return l("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return l("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return l("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return l("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return l("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return l("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return l("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return l("plugin:window|set_focus",{label:this.label})}async setIcon(e){return l("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return l("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return l("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return l("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return l("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return l("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return l("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return l("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,(n=>{n.payload=x(n.payload),e(n)}))}async onMoved(e){return this.listen(u.WINDOW_MOVED,(n=>{n.payload=T(n.payload),e(n)}))}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,(n=>{const t=new D(n);Promise.resolve(e(t)).then((()=>{if(!t.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const n=await this.listen(u.WINDOW_FOCUS,(n=>{e({...n,payload:!0})})),t=await this.listen(u.WINDOW_BLUR,(n=>{e({...n,payload:!1})}));return()=>{n(),t()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(u.WINDOW_FILE_DROP,(n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:T(n.payload.position)}})})),t=await this.listen(u.WINDOW_FILE_DROP_HOVER,(n=>{e({...n,payload:{type:"hover",paths:n.payload.paths,position:T(n.payload.position)}})})),i=await this.listen(u.WINDOW_FILE_DROP_CANCELLED,(n=>{e({...n,payload:{type:"cancel"}})}));return()=>{n(),t(),i()}}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var S,P;function C(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:T(e.position),size:x(e.size)}}function T(e){return new b(e.x,e.y)}function x(e){return new _(e.width,e.height)}!function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(S||(S={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(P||(P={}));var F,z=Object.freeze({__proto__:null,CloseRequestedEvent:D,get Effect(){return S},get EffectState(){return P},LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_,get ProgressBarStatus(){return v},get UserAttentionType(){return f},Window:L,availableMonitors:async function(){return l("plugin:window|available_monitors").then((e=>e.map(C)))},currentMonitor:async function(){return l("plugin:window|current_monitor").then(C)},getAll:I,getCurrent:A,primaryMonitor:async function(){return l("plugin:window|primary_monitor").then(C)}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(F||(F={}));var R,M=Object.freeze({__proto__:null,get BaseDirectory(){return F},appCacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppCache})},appConfigDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppConfig})},appDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppData})},appLocalDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLocalData})},appLogDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLog})},audioDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Audio})},basename:async function(e,n){return l("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Cache})},configDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Config})},dataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Desktop})},dirname:async function(e){return l("plugin:path|dirname",{path:e})},documentDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Document})},downloadDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Download})},executableDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Executable})},extname:async function(e){return l("plugin:path|extname",{path:e})},fontDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Font})},homeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Home})},isAbsolute:async function(e){return l("plugin:path|isAbsolute",{path:e})},join:async function(...e){return l("plugin:path|join",{paths:e})},localDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.LocalData})},normalize:async function(e){return l("plugin:path|normalize",{path:e})},pictureDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Picture})},publicDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Public})},resolve:async function(...e){return l("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return l("plugin:path|resolve_directory",{directory:F.Resource,path:e})},resourceDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Resource})},runtimeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Temp})},templateDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Template})},videoDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Video})}});class W{get rid(){return n(this,R,"f")}constructor(e){R.set(this,void 0),t(this,R,e,"f")}async close(){return l("plugin:resources|close",{rid:this.rid})}}R=new WeakMap;class N extends W{constructor(e,n){super(e),this.id=n}static async new(e){e?.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e?.icon&&(e.icon="string"==typeof e.icon?e.icon:Array.from(e.icon));const n=new a;return e?.action&&(n.onmessage=e.action,delete e.action),l("plugin:tray|new",{options:e??{},handler:n}).then((([e,n])=>new N(e,n)))}async setIcon(e){let n=null;return e&&(n="string"==typeof e?e:Array.from(e)),l("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),l("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return l("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return l("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return l("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return l("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return l("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return l("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var O,U,B=Object.freeze({__proto__:null,TrayIcon:N});async function V(e,n){const t=new a;let i=null;return n&&"object"==typeof n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"items"in n&&n.items&&(i=n.items.map((e=>[e.rid,e.kind])))),l("plugin:menu|new",{kind:e,options:n?{...n,items:i}:void 0,handler:t})}class H extends W{get id(){return n(this,O,"f")}get kind(){return n(this,U,"f")}constructor(e,n,i){super(e),O.set(this,void 0),U.set(this,void 0),t(this,O,n,"f"),t(this,U,i,"f")}}function G([e,n,t]){switch(t){case"Submenu":return new j(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}O=new WeakMap,U=new WeakMap;let j=class e extends H{constructor(e,n){super(e,n,"Submenu")}static async new(n){return V("Submenu",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(G)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(G)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?G(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsWindowsMenuForNSApp(){return l("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return l("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};function q([e,n,t]){switch(t){case"Submenu":return new Submenu(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}class Q extends H{constructor(e,n){super(e,n,"Menu")}static async new(e){return V("Menu",e).then((([e,n])=>new Q(e,n)))}static async default(){return l("plugin:menu|default").then((([e,n])=>new Q(e,n)))}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind]))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>[e.rid,e.kind])),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(q)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(q)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?q(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsAppMenu(){return l("plugin:menu|set_as_app_menu",{rid:this.rid}).then((e=>e?new Q(e[0],e[1]):null))}async setAsWindowMenu(e){return l("plugin:menu|set_as_window_menu",{rid:this.rid,window:e?.label??null}).then((e=>e?new Q(e[0],e[1]):null))}}var $;!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}($||($={}));var Z=Object.freeze({__proto__:null,CheckMenuItem:class e extends H{constructor(e,n){super(e,n,"Check")}static async new(n){return V("Check",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return l("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return l("plugin:menu|set_checked",{rid:this.rid,checked:e})}},IconMenuItem:class e extends H{constructor(e,n){super(e,n,"Icon")}static async new(n){return V("Icon",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return l("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return l("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},Menu:Q,MenuItem:class e extends H{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return V("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},get NativeIcon(){return $},PredefinedMenuItem:class e extends H{constructor(e,n){super(e,n,"Predefined")}static async new(n){return V("Predefined",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},Submenu:j});return e.app=c,e.dpi=k,e.event=g,e.menu=Z,e.path=M,e.primitives=o,e.tray=B,e.window=z,e}({});window.__TAURI__=__TAURI_IIFE__; +var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i;function r(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=r((e=>{n(this,i,"f").call(this,e)}))}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}i=new WeakMap;class s{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var o=Object.freeze({__proto__:null,Channel:a,PluginListener:s,addPluginListener:async function(e,n,t){const i=new a;return i.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:i}).then((()=>new s(e,n,i.id)))},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:l,transformCallback:r});var u,c=Object.freeze({__proto__:null,getName:async function(){return l("plugin:app|name")},getTauriVersion:async function(){return l("plugin:app|tauri_version")},getVersion:async function(){return l("plugin:app|version")},hide:async function(){return l("plugin:app|app_hide")},show:async function(){return l("plugin:app|app_show")}});async function d(e,n){await l("plugin:event|unlisten",{event:e,eventId:n})}async function p(e,n,t){return l("plugin:event|listen",{event:e,windowLabel:t?.target,handler:r(n)}).then((n=>async()=>d(e,n)))}async function h(e,n,t){return p(e,(t=>{n(t),d(e,t.id).catch((()=>{}))}),t)}async function y(e,n,t){await l("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}!function(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"}(u||(u={}));var g=Object.freeze({__proto__:null,get TauriEvent(){return u},emit:y,listen:p,once:h});class w{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class _{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new w(this.width/e,this.height/e)}}class m{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class b{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new m(this.x/e,this.y/e)}}var f,v,k=Object.freeze({__proto__:null,LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(f||(f={}));class D{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}}function A(){return new L(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function I(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new L(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(v||(v={}));const E=["tauri://created","tauri://error"];class L{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||l("plugin:window|create",{options:{...n,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return I().some((n=>n.label===e))?new L(e,{skip:!0}):null}static getCurrent(){return A()}static getAll(){return I()}static async getFocusedWindow(){for(const e of I())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):p(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):h(e,n,{target:this.label})}async emit(e,n){if(E.includes(e)){for(const t of this.listeners[e]||[])t({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return y(e,n,{target:this.label})}_handleTauriEvent(e,n){return!!E.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return l("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return l("plugin:window|inner_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async outerPosition(){return l("plugin:window|outer_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async innerSize(){return l("plugin:window|inner_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async outerSize(){return l("plugin:window|outer_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async isFullscreen(){return l("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return l("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return l("plugin:window|is_maximized",{label:this.label})}async isFocused(){return l("plugin:window|is_focused",{label:this.label})}async isDecorated(){return l("plugin:window|is_decorated",{label:this.label})}async isResizable(){return l("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return l("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return l("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return l("plugin:window|is_closable",{label:this.label})}async isVisible(){return l("plugin:window|is_visible",{label:this.label})}async title(){return l("plugin:window|title",{label:this.label})}async theme(){return l("plugin:window|theme",{label:this.label})}async center(){return l("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===f.Critical?{type:"Critical"}:{type:"Informational"}),l("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return l("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return l("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return l("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return l("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return l("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return l("plugin:window|maximize",{label:this.label})}async unmaximize(){return l("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return l("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return l("plugin:window|minimize",{label:this.label})}async unminimize(){return l("plugin:window|unminimize",{label:this.label})}async show(){return l("plugin:window|show",{label:this.label})}async hide(){return l("plugin:window|hide",{label:this.label})}async close(){return l("plugin:window|close",{label:this.label})}async setDecorations(e){return l("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return l("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return l("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return l("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return l("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return l("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return l("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return l("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return l("plugin:window|set_focus",{label:this.label})}async setIcon(e){return l("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return l("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return l("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return l("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return l("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return l("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return l("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return l("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,(n=>{n.payload=x(n.payload),e(n)}))}async onMoved(e){return this.listen(u.WINDOW_MOVED,(n=>{n.payload=T(n.payload),e(n)}))}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,(n=>{const t=new D(n);Promise.resolve(e(t)).then((()=>{if(!t.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const n=await this.listen(u.WINDOW_FOCUS,(n=>{e({...n,payload:!0})})),t=await this.listen(u.WINDOW_BLUR,(n=>{e({...n,payload:!1})}));return()=>{n(),t()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(u.WINDOW_FILE_DROP,(n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:T(n.payload.position)}})})),t=await this.listen(u.WINDOW_FILE_DROP_HOVER,(n=>{e({...n,payload:{type:"hover",paths:n.payload.paths,position:T(n.payload.position)}})})),i=await this.listen(u.WINDOW_FILE_DROP_CANCELLED,(n=>{e({...n,payload:{type:"cancel"}})}));return()=>{n(),t(),i()}}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var S,P;function C(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:T(e.position),size:x(e.size)}}function T(e){return new b(e.x,e.y)}function x(e){return new _(e.width,e.height)}!function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(S||(S={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(P||(P={}));var F,z=Object.freeze({__proto__:null,CloseRequestedEvent:D,get Effect(){return S},get EffectState(){return P},LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_,get ProgressBarStatus(){return v},get UserAttentionType(){return f},Window:L,availableMonitors:async function(){return l("plugin:window|available_monitors").then((e=>e.map(C)))},currentMonitor:async function(){return l("plugin:window|current_monitor").then(C)},getAll:I,getCurrent:A,primaryMonitor:async function(){return l("plugin:window|primary_monitor").then(C)}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(F||(F={}));var R,M=Object.freeze({__proto__:null,get BaseDirectory(){return F},appCacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppCache})},appConfigDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppConfig})},appDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppData})},appLocalDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLocalData})},appLogDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLog})},audioDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Audio})},basename:async function(e,n){return l("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Cache})},configDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Config})},dataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Desktop})},dirname:async function(e){return l("plugin:path|dirname",{path:e})},documentDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Document})},downloadDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Download})},executableDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Executable})},extname:async function(e){return l("plugin:path|extname",{path:e})},fontDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Font})},homeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Home})},isAbsolute:async function(e){return l("plugin:path|isAbsolute",{path:e})},join:async function(...e){return l("plugin:path|join",{paths:e})},localDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.LocalData})},normalize:async function(e){return l("plugin:path|normalize",{path:e})},pictureDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Picture})},publicDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Public})},resolve:async function(...e){return l("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return l("plugin:path|resolve_directory",{directory:F.Resource,path:e})},resourceDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Resource})},runtimeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Temp})},templateDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Template})},videoDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Video})}});class W{get rid(){return n(this,R,"f")}constructor(e){R.set(this,void 0),t(this,R,e,"f")}async close(){return l("plugin:resources|close",{rid:this.rid})}}R=new WeakMap;class N extends W{constructor(e,n){super(e),this.id=n}static async new(e){e?.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e?.icon&&(e.icon="string"==typeof e.icon?e.icon:Array.from(e.icon));const n=new a;return e?.action&&(n.onmessage=e.action,delete e.action),l("plugin:tray|new",{options:e??{},handler:n}).then((([e,n])=>new N(e,n)))}async setIcon(e){let n=null;return e&&(n="string"==typeof e?e:Array.from(e)),l("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),l("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return l("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return l("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return l("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return l("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return l("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return l("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var O,U,B=Object.freeze({__proto__:null,TrayIcon:N});function V(e){if("items"in e)e.items=e.items?.map((e=>"rid"in e?e:V(e)));else if("action"in e&&e.action){const n=new a;return n.onmessage=e.action,delete e.action,{...e,handler:n}}return e}async function H(e,n){const t=new a;let i=null;return n&&"object"==typeof n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"items"in n&&n.items&&(i=n.items.map((e=>"rid"in e?[e.rid,e.kind]:V(e))))),l("plugin:menu|new",{kind:e,options:n?{...n,items:i}:void 0,handler:t})}class G extends W{get id(){return n(this,O,"f")}get kind(){return n(this,U,"f")}constructor(e,n,i){super(e),O.set(this,void 0),U.set(this,void 0),t(this,O,n,"f"),t(this,U,i,"f")}}function j([e,n,t]){switch(t){case"Submenu":return new q(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}O=new WeakMap,U=new WeakMap;let q=class e extends G{constructor(e,n){super(e,n,"Submenu")}static async new(n){return H("Submenu",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e)),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(j)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(j)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?j(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsWindowsMenuForNSApp(){return l("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return l("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};function Q([e,n,t]){switch(t){case"Submenu":return new Submenu(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}class $ extends G{constructor(e,n){super(e,n,"Menu")}static async new(e){return H("Menu",e).then((([e,n])=>new $(e,n)))}static async default(){return l("plugin:menu|default").then((([e,n])=>new $(e,n)))}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e)),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(Q)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(Q)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?Q(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsAppMenu(){return l("plugin:menu|set_as_app_menu",{rid:this.rid}).then((e=>e?new $(e[0],e[1]):null))}async setAsWindowMenu(e){return l("plugin:menu|set_as_window_menu",{rid:this.rid,window:e?.label??null}).then((e=>e?new $(e[0],e[1]):null))}}var Z;!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}(Z||(Z={}));var J=Object.freeze({__proto__:null,CheckMenuItem:class e extends G{constructor(e,n){super(e,n,"Check")}static async new(n){return H("Check",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return l("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return l("plugin:menu|set_checked",{rid:this.rid,checked:e})}},IconMenuItem:class e extends G{constructor(e,n){super(e,n,"Icon")}static async new(n){return H("Icon",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return l("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return l("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},Menu:$,MenuItem:class e extends G{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return H("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},get NativeIcon(){return Z},PredefinedMenuItem:class e extends G{constructor(e,n){super(e,n,"Predefined")}static async new(n){return H("Predefined",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},Submenu:q});return e.app=c,e.dpi=k,e.event=g,e.menu=J,e.path=M,e.primitives=o,e.tray=B,e.window=z,e}({});window.__TAURI__=__TAURI_IIFE__; diff --git a/core/tauri/src/ipc/channel.rs b/core/tauri/src/ipc/channel.rs index f33ec4681e6..e510595a049 100644 --- a/core/tauri/src/ipc/channel.rs +++ b/core/tauri/src/ipc/channel.rs @@ -10,7 +10,7 @@ use std::{ }, }; -use serde::{Deserialize, Serialize, Serializer}; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; use crate::{ command, @@ -50,6 +50,32 @@ impl Serialize for Channel { } } +pub(crate) struct ChannelRef(pub(crate) CallbackFn); + +impl ChannelRef { + fn new(value: impl AsRef) -> Option { + value + .as_ref() + .split_once(IPC_PAYLOAD_PREFIX) + .and_then(|(_prefix, id)| id.parse().ok()) + .map(|id| Self(CallbackFn(id))) + } +} + +impl<'de> Deserialize<'de> for ChannelRef { + fn deserialize(deserializer: D) -> std::result::Result + where + D: Deserializer<'de>, + { + let value: String = Deserialize::deserialize(deserializer)?; + ChannelRef::new(&value).ok_or_else(|| { + serde::de::Error::custom(format!( + "invalid channel value `{value}`, expected a string in the `{IPC_PAYLOAD_PREFIX}ID` format" + )) + }) + } +} + impl Channel { /// Creates a new channel with the given message handler. pub fn new crate::Result<()> + Send + Sync + 'static>( @@ -90,17 +116,6 @@ impl Channel { }) } - pub(crate) fn load_from_ipc( - window: Window, - value: impl AsRef, - ) -> Option { - value - .as_ref() - .split_once(IPC_PAYLOAD_PREFIX) - .and_then(|(_prefix, id)| id.parse().ok()) - .map(|callback_id| Self::from_ipc(window, CallbackFn(callback_id))) - } - /// The channel identifier. pub fn id(&self) -> u32 { self.id @@ -121,11 +136,13 @@ impl<'de, R: Runtime> CommandArg<'de, R> for Channel { let window = command.message.window(); let value: String = Deserialize::deserialize(command).map_err(|e| crate::Error::InvalidArgs(name, arg, e))?; - Channel::load_from_ipc(window, &value).ok_or_else(|| { - InvokeError::from_anyhow(anyhow::anyhow!( + ChannelRef::new(&value) + .map(|r| Channel::from_ipc(window, r.0)) + .ok_or_else(|| { + InvokeError::from_anyhow(anyhow::anyhow!( "invalid channel value `{value}`, expected a string in the `{IPC_PAYLOAD_PREFIX}ID` format" )) - }) + }) } } diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index 64ace74cfb6..956dc2b4588 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -2,7 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -use std::{collections::HashMap, sync::Mutex}; +use std::{ + collections::HashMap, + sync::{Mutex, MutexGuard}, +}; use serde::{Deserialize, Serialize}; use tauri_runtime::window::dpi::Position; @@ -10,9 +13,9 @@ use tauri_runtime::window::dpi::Position; use super::{sealed::ContextMenuBase, *}; use crate::{ command, - ipc::Channel, + ipc::{channel::ChannelRef, Channel}, plugin::{Builder, TauriPlugin}, - resources::ResourceId, + resources::{ResourceId, ResourceTable}, AppHandle, IconDto, Manager, RunEvent, Runtime, State, Window, }; use tauri_macros::do_menu_item; @@ -82,6 +85,230 @@ enum Predefined { Services, } +#[derive(Deserialize)] +struct SubmenuPayload { + id: Option, + text: String, + enabled: Option, + items: Vec, +} + +impl SubmenuPayload { + pub fn create_item( + self, + window: &Window, + resources_table: &MutexGuard<'_, ResourceTable>, + ) -> crate::Result> { + let mut builder = if let Some(id) = self.id { + SubmenuBuilder::with_id(window, id, self.text) + } else { + SubmenuBuilder::new(window, self.text) + }; + if let Some(enabled) = self.enabled { + builder = builder.enabled(enabled); + } + for item in self.items { + builder = item.with_item(window, resources_table, |i| Ok(builder.item(i)))?; + } + + builder.build() + } +} + +#[derive(Deserialize)] +struct CheckMenuItemPayload { + handler: Option, + id: Option, + text: String, + checked: bool, + enabled: Option, + accelerator: Option, +} + +impl CheckMenuItemPayload { + pub fn create_item(self, window: &Window) -> CheckMenuItem { + let mut builder = if let Some(id) = self.id { + CheckMenuItemBuilder::with_id(id, self.text) + } else { + CheckMenuItemBuilder::new(self.text) + }; + if let Some(accelerator) = self.accelerator { + builder = builder.accelerator(accelerator); + } + if let Some(enabled) = self.enabled { + builder = builder.enabled(enabled); + } + + let item = builder.checked(self.checked).build(window); + + if let Some(handler) = self.handler { + let handler = Channel::from_ipc(window.clone(), handler.0); + window + .state::() + .0 + .lock() + .unwrap() + .insert(item.id().clone(), handler); + } + + item + } +} + +#[derive(Deserialize)] +#[serde(untagged)] +enum Icon { + Native(NativeIcon), + Icon(IconDto), +} + +#[derive(Deserialize)] +#[serde(rename_all = "camelCase")] +struct IconMenuItemPayload { + handler: Option, + id: Option, + text: String, + icon: Icon, + enabled: Option, + accelerator: Option, +} + +impl IconMenuItemPayload { + pub fn create_item(self, window: &Window) -> IconMenuItem { + let mut builder = if let Some(id) = self.id { + IconMenuItemBuilder::with_id(id, self.text) + } else { + IconMenuItemBuilder::new(self.text) + }; + if let Some(accelerator) = self.accelerator { + builder = builder.accelerator(accelerator); + } + if let Some(enabled) = self.enabled { + builder = builder.enabled(enabled); + } + builder = match self.icon { + Icon::Native(native_icon) => builder.native_icon(native_icon), + Icon::Icon(icon) => builder.icon(icon.into()), + }; + + let item = builder.build(window); + + if let Some(handler) = self.handler { + let handler = Channel::from_ipc(window.clone(), handler.0); + window + .state::() + .0 + .lock() + .unwrap() + .insert(item.id().clone(), handler); + } + + item + } +} + +#[derive(Deserialize)] +struct MenuItemPayload { + handler: Option, + id: Option, + text: String, + enabled: Option, + accelerator: Option, +} + +impl MenuItemPayload { + pub fn create_item(self, window: &Window) -> MenuItem { + let mut builder = if let Some(id) = self.id { + MenuItemBuilder::with_id(id, self.text) + } else { + MenuItemBuilder::new(self.text) + }; + if let Some(accelerator) = self.accelerator { + builder = builder.accelerator(accelerator); + } + if let Some(enabled) = self.enabled { + builder = builder.enabled(enabled); + } + + let item = builder.build(window); + + if let Some(handler) = self.handler { + let handler = Channel::from_ipc(window.clone(), handler.0); + window + .state::() + .0 + .lock() + .unwrap() + .insert(item.id().clone(), handler); + } + + item + } +} + +#[derive(Deserialize)] +struct PredefinedMenuItemPayload { + item: Predefined, + text: Option, +} + +impl PredefinedMenuItemPayload { + pub fn create_item(self, window: &Window) -> PredefinedMenuItem { + match self.item { + Predefined::Separator => PredefinedMenuItem::separator(window), + Predefined::Copy => PredefinedMenuItem::copy(window, self.text.as_deref()), + Predefined::Cut => PredefinedMenuItem::cut(window, self.text.as_deref()), + Predefined::Paste => PredefinedMenuItem::paste(window, self.text.as_deref()), + Predefined::SelectAll => PredefinedMenuItem::select_all(window, self.text.as_deref()), + Predefined::Undo => PredefinedMenuItem::undo(window, self.text.as_deref()), + Predefined::Redo => PredefinedMenuItem::redo(window, self.text.as_deref()), + Predefined::Minimize => PredefinedMenuItem::minimize(window, self.text.as_deref()), + Predefined::Maximize => PredefinedMenuItem::maximize(window, self.text.as_deref()), + Predefined::Fullscreen => PredefinedMenuItem::fullscreen(window, self.text.as_deref()), + Predefined::Hide => PredefinedMenuItem::hide(window, self.text.as_deref()), + Predefined::HideOthers => PredefinedMenuItem::hide_others(window, self.text.as_deref()), + Predefined::ShowAll => PredefinedMenuItem::show_all(window, self.text.as_deref()), + Predefined::CloseWindow => PredefinedMenuItem::close_window(window, self.text.as_deref()), + Predefined::Quit => PredefinedMenuItem::quit(window, self.text.as_deref()), + Predefined::About(metadata) => { + PredefinedMenuItem::about(window, self.text.as_deref(), metadata.map(Into::into)) + } + Predefined::Services => PredefinedMenuItem::services(window, self.text.as_deref()), + } + } +} + +#[derive(Deserialize)] +#[serde(untagged)] +enum MenuItemPayloadKind { + ExistingItem((ResourceId, ItemKind)), + Predefined(PredefinedMenuItemPayload), + Check(CheckMenuItemPayload), + Submenu(SubmenuPayload), + Icon(IconMenuItemPayload), + MenuItem(MenuItemPayload), +} + +impl MenuItemPayloadKind { + pub fn with_item) -> crate::Result>( + self, + window: &Window, + resources_table: &MutexGuard<'_, ResourceTable>, + f: F, + ) -> crate::Result { + match self { + Self::ExistingItem((rid, kind)) => { + do_menu_item!(resources_table, rid, kind, |i| f(&*i)) + } + Self::Submenu(i) => f(&i.create_item(window, resources_table)?), + Self::Predefined(i) => f(&i.create_item(window)), + Self::Check(i) => f(&i.create_item(window)), + Self::Icon(i) => f(&i.create_item(window)), + Self::MenuItem(i) => f(&i.create_item(window)), + } + } +} + #[derive(Deserialize, Default)] #[serde(rename_all = "camelCase")] struct NewOptions { @@ -92,14 +319,14 @@ struct NewOptions { accelerator: Option, #[serde(rename = "item")] predefined_item: Option, - icon: Option, - native_icon: Option, - items: Option>, + icon: Option, + items: Option>, } #[command(root = "crate")] fn new( app: AppHandle, + window: Window, kind: ItemKind, options: Option, channels: State<'_, MenuChannels>, @@ -115,8 +342,8 @@ fn new( builder = builder.id(id); } if let Some(items) = options.items { - for (rid, kind) in items { - builder = do_menu_item!(resources_table, rid, kind, |i| builder.item(&*i)); + for item in items { + builder = item.with_item(&window, &resources_table, |i| Ok(builder.item(i)))?; } } let menu = builder.build()?; @@ -127,17 +354,13 @@ fn new( } ItemKind::Submenu => { - let mut builder = SubmenuBuilder::new(&app, options.text.unwrap_or_default()); - if let Some(id) = options.id { - builder = builder.id(id); + let submenu = SubmenuPayload { + id: options.id, + text: options.text.unwrap_or_default(), + enabled: options.enabled, + items: options.items.unwrap_or_default(), } - if let Some(items) = options.items { - for (rid, kind) in items { - builder = do_menu_item!(resources_table, rid, kind, |i| builder.item(&*i)); - } - } - - let submenu = builder.build()?; + .create_item(&window, &resources_table)?; let id = submenu.id().clone(); let rid = resources_table.add(submenu); @@ -145,78 +368,58 @@ fn new( } ItemKind::MenuItem => { - let mut builder = MenuItemBuilder::new(options.text.unwrap_or_default()); - if let Some(accelerator) = options.accelerator { - builder = builder.accelerator(accelerator); - } - if let Some(enabled) = options.enabled { - builder = builder.enabled(enabled); + let item = MenuItemPayload { + // handler managed in this function instead + handler: None, + id: options.id, + text: options.text.unwrap_or_default(), + enabled: options.enabled, + accelerator: options.accelerator, } - let item = builder.build(&app); + .create_item(&window); let id = item.id().clone(); let rid = resources_table.add(item); (rid, id) } ItemKind::Predefined => { - let item = match options.predefined_item.unwrap() { - Predefined::Separator => PredefinedMenuItem::separator(&app), - Predefined::Copy => PredefinedMenuItem::copy(&app, options.text.as_deref()), - Predefined::Cut => PredefinedMenuItem::cut(&app, options.text.as_deref()), - Predefined::Paste => PredefinedMenuItem::paste(&app, options.text.as_deref()), - Predefined::SelectAll => PredefinedMenuItem::select_all(&app, options.text.as_deref()), - Predefined::Undo => PredefinedMenuItem::undo(&app, options.text.as_deref()), - Predefined::Redo => PredefinedMenuItem::redo(&app, options.text.as_deref()), - Predefined::Minimize => PredefinedMenuItem::minimize(&app, options.text.as_deref()), - Predefined::Maximize => PredefinedMenuItem::maximize(&app, options.text.as_deref()), - Predefined::Fullscreen => PredefinedMenuItem::fullscreen(&app, options.text.as_deref()), - Predefined::Hide => PredefinedMenuItem::hide(&app, options.text.as_deref()), - Predefined::HideOthers => PredefinedMenuItem::hide_others(&app, options.text.as_deref()), - Predefined::ShowAll => PredefinedMenuItem::show_all(&app, options.text.as_deref()), - Predefined::CloseWindow => PredefinedMenuItem::close_window(&app, options.text.as_deref()), - Predefined::Quit => PredefinedMenuItem::quit(&app, options.text.as_deref()), - Predefined::About(metadata) => { - PredefinedMenuItem::about(&app, options.text.as_deref(), metadata.map(Into::into)) - } - Predefined::Services => PredefinedMenuItem::services(&app, options.text.as_deref()), - }; + let item = PredefinedMenuItemPayload { + item: options.predefined_item.unwrap(), + text: options.text, + } + .create_item(&window); let id = item.id().clone(); let rid = resources_table.add(item); (rid, id) } ItemKind::Check => { - let mut builder = CheckMenuItemBuilder::new(options.text.unwrap_or_default()); - if let Some(accelerator) = options.accelerator { - builder = builder.accelerator(accelerator); - } - if let Some(enabled) = options.enabled { - builder = builder.enabled(enabled); - } - if let Some(checked) = options.checked { - builder = builder.checked(checked); + let item = CheckMenuItemPayload { + // handler managed in this function instead + handler: None, + id: options.id, + text: options.text.unwrap_or_default(), + checked: options.checked.unwrap_or_default(), + enabled: options.enabled, + accelerator: options.accelerator, } - let item = builder.build(&app); + .create_item(&window); let id = item.id().clone(); let rid = resources_table.add(item); (rid, id) } ItemKind::Icon => { - let mut builder = IconMenuItemBuilder::new(options.text.unwrap_or_default()); - if let Some(accelerator) = options.accelerator { - builder = builder.accelerator(accelerator); - } - if let Some(enabled) = options.enabled { - builder = builder.enabled(enabled); - } - if let Some(native_icon) = options.native_icon { - builder = builder.native_icon(native_icon); - } - if let Some(icon) = options.icon { - builder = builder.icon(icon.into()); + let item = IconMenuItemPayload { + // handler managed in this function instead + handler: None, + id: options.id, + text: options.text.unwrap_or_default(), + icon: options.icon.unwrap_or(Icon::Native(NativeIcon::User)), + enabled: options.enabled, + accelerator: options.accelerator, } - let item = builder.build(&app); + .create_item(&window); let id = item.id().clone(); let rid = resources_table.add(item); (rid, id) @@ -230,23 +433,23 @@ fn new( #[command(root = "crate")] fn append( - app: AppHandle, + window: Window, rid: ResourceId, kind: ItemKind, - items: Vec<(ResourceId, ItemKind)>, + items: Vec, ) -> crate::Result<()> { - let resources_table = app.manager.resources_table(); + let resources_table = window.manager.resources_table(); match kind { ItemKind::Menu => { let menu = resources_table.get::>(rid)?; - for (rid, kind) in items { - do_menu_item!(resources_table, rid, kind, |i| menu.append(&*i))?; + for item in items { + item.with_item(&window, &resources_table, |i| menu.append(i))?; } } ItemKind::Submenu => { let submenu = resources_table.get::>(rid)?; - for (rid, kind) in items { - do_menu_item!(resources_table, rid, kind, |i| submenu.append(&*i))?; + for item in items { + item.with_item(&window, &resources_table, |i| submenu.append(i))?; } } _ => unreachable!(), @@ -257,23 +460,23 @@ fn append( #[command(root = "crate")] fn prepend( - app: AppHandle, + window: Window, rid: ResourceId, kind: ItemKind, - items: Vec<(ResourceId, ItemKind)>, + items: Vec, ) -> crate::Result<()> { - let resources_table = app.manager.resources_table(); + let resources_table = window.manager.resources_table(); match kind { ItemKind::Menu => { let menu = resources_table.get::>(rid)?; - for (rid, kind) in items { - do_menu_item!(resources_table, rid, kind, |i| menu.prepend(&*i))?; + for item in items { + item.with_item(&window, &resources_table, |i| menu.prepend(i))?; } } ItemKind::Submenu => { let submenu = resources_table.get::>(rid)?; - for (rid, kind) in items { - do_menu_item!(resources_table, rid, kind, |i| submenu.prepend(&*i))?; + for item in items { + item.with_item(&window, &resources_table, |i| submenu.prepend(i))?; } } _ => unreachable!(), @@ -284,27 +487,25 @@ fn prepend( #[command(root = "crate")] fn insert( - app: AppHandle, + window: Window, rid: ResourceId, kind: ItemKind, - items: Vec<(ResourceId, ItemKind)>, + items: Vec, mut position: usize, ) -> crate::Result<()> { - let resources_table = app.manager.resources_table(); + let resources_table = window.manager.resources_table(); match kind { ItemKind::Menu => { let menu = resources_table.get::>(rid)?; - for (rid, kind) in items { - do_menu_item!(resources_table, rid, kind, |i| menu.insert(&*i, position))?; + for item in items { + item.with_item(&window, &resources_table, |i| menu.insert(i, position))?; position += 1 } } ItemKind::Submenu => { let submenu = resources_table.get::>(rid)?; - for (rid, kind) in items { - do_menu_item!(resources_table, rid, kind, |i| { - submenu.insert(&*i, position) - })?; + for item in items { + item.with_item(&window, &resources_table, |i| submenu.insert(i, position))?; position += 1 } } diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index 02859e82aca..ead0f5bd5c0 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -2,6 +2,12 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT +import { CheckMenuItemOptions } from './menu/checkMenuItem' +import { SubmenuOptions } from './menu/submenu' +import { MenuItemOptions } from './menu/menuItem' +import { IconMenuItemOptions } from './menu/iconMenuItem' +import { PredefinedMenuItemOptions } from './menu/predefinedMenuItem' + export * from './menu/submenu' export * from './menu/menuItem' export * from './menu/menu' @@ -16,8 +22,9 @@ export * from './menu/predefinedMenuItem' * @module */ -/** Describes a menu event emitted when a menu item is activated */ -export interface MenuEvent { - /** Id of the menu item that triggered this event */ - id: string -} +export type MenuItemKind = + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions diff --git a/tooling/api/src/menu/base.ts b/tooling/api/src/menu/base.ts index 79e4f92df85..ca78977b10f 100644 --- a/tooling/api/src/menu/base.ts +++ b/tooling/api/src/menu/base.ts @@ -3,6 +3,7 @@ // SPDX-License-Identifier: MIT import { Resource } from '../internal' +import { MenuItemKind } from '../menu' import { Channel, invoke } from '../primitives' export type ItemKind = @@ -13,12 +14,28 @@ export type ItemKind = | 'Submenu' | 'Menu' +function injectChannel( + i: MenuItemKind +): MenuItemKind & { handler?: Channel } { + if ('items' in i) { + i.items = i.items?.map((item) => + 'rid' in item ? item : injectChannel(item) + ) + } else if ('action' in i && i.action) { + const handler = new Channel() + handler.onmessage = i.action + delete i.action + return { ...i, handler } + } + return i +} + export async function newMenu( kind: ItemKind, opts?: unknown ): Promise<[number, string]> { const handler = new Channel() - let items: null | Array<[number, string]> = null + let items: null | Array<[number, string] | MenuItemKind> = null if (opts && typeof opts === 'object') { if ('action' in opts && opts.action) { handler.onmessage = opts.action as () => void @@ -26,10 +43,14 @@ export async function newMenu( } if ('items' in opts && opts.items) { - items = (opts.items as { rid: number; kind: string }[]).map((i) => [ - i.rid, - i.kind - ]) + items = ( + opts.items as Array<{ rid: number; kind: string } | MenuItemKind> + ).map((i) => { + if ('rid' in i) { + return [i.rid, i.kind] + } + return injectChannel(i) + }) } } diff --git a/tooling/api/src/menu/iconMenuItem.ts b/tooling/api/src/menu/iconMenuItem.ts index d248c9e4a20..06ec2251cd8 100644 --- a/tooling/api/src/menu/iconMenuItem.ts +++ b/tooling/api/src/menu/iconMenuItem.ts @@ -132,16 +132,8 @@ export enum NativeIcon { export interface IconMenuItemOptions extends MenuItemOptions { /** * Icon to be used for the new icon menu item. - * - * if both {@linkcode IconMenuItemOptions.icon|icon} and {@linkcode IconMenuItemOptions.nativeIcon|nativeIcon} are specified, only {@linkcode IconMenuItemOptions.icon|icon} is used. */ - icon?: string | Uint8Array - /** - * NativeIcon to be used for the new icon menu item. - * - * if both {@linkcode IconMenuItemOptions.icon|icon} and {@linkcode IconMenuItemOptions.nativeIcon|nativeIcon} are specified, only {@linkcode IconMenuItemOptions.icon|icon} is used. - */ - nativeIcon?: NativeIcon + icon?: NativeIcon | string | Uint8Array } /** diff --git a/tooling/api/src/menu/menu.ts b/tooling/api/src/menu/menu.ts index 573208e5308..299a4e1499a 100644 --- a/tooling/api/src/menu/menu.ts +++ b/tooling/api/src/menu/menu.ts @@ -3,6 +3,7 @@ // SPDX-License-Identifier: MIT import { + MenuItemKind, type CheckMenuItem, type IconMenuItem, type MenuItem, @@ -48,7 +49,12 @@ export interface MenuOptions { id?: string /** List of items to add to the new menu. */ items?: Array< - Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem + | Submenu + | MenuItem + | PredefinedMenuItem + | CheckMenuItem + | IconMenuItem + | MenuItemKind > } @@ -87,14 +93,14 @@ export class Menu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem + | MenuItemKind >(items: T | T[]): Promise { return invoke('plugin:menu|append', { rid: this.rid, kind: this.kind, - items: (Array.isArray(items) ? items : [items]).map((i) => [ - i.rid, - i.kind - ]) + items: (Array.isArray(items) ? items : [items]).map((i) => + 'rid' in i ? [i.rid, i.kind] : i + ) }) } @@ -112,14 +118,14 @@ export class Menu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem + | MenuItemKind >(items: T | T[]): Promise { return invoke('plugin:menu|prepend', { rid: this.rid, kind: this.kind, - items: (Array.isArray(items) ? items : [items]).map((i) => [ - i.rid, - i.kind - ]) + items: (Array.isArray(items) ? items : [items]).map((i) => + 'rid' in i ? [i.rid, i.kind] : i + ) }) } @@ -137,14 +143,14 @@ export class Menu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem + | MenuItemKind >(items: T | T[], position: number): Promise { return invoke('plugin:menu|insert', { rid: this.rid, kind: this.kind, - items: (Array.isArray(items) ? items : [items]).map((i) => [ - i.rid, - i.kind - ]), + items: (Array.isArray(items) ? items : [items]).map((i) => + 'rid' in i ? [i.rid, i.kind] : i + ), position }) } diff --git a/tooling/api/src/menu/submenu.ts b/tooling/api/src/menu/submenu.ts index ec994142faa..bbb62fd1184 100644 --- a/tooling/api/src/menu/submenu.ts +++ b/tooling/api/src/menu/submenu.ts @@ -3,6 +3,7 @@ // SPDX-License-Identifier: MIT import { + MenuItemKind, type CheckMenuItem, type IconMenuItem, type MenuItem, @@ -99,14 +100,14 @@ export class Submenu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem + | MenuItemKind >(items: T | T[]): Promise { return invoke('plugin:menu|append', { rid: this.rid, kind: this.kind, - items: (Array.isArray(items) ? items : [items]).map((i) => [ - i.rid, - i.kind - ]) + items: (Array.isArray(items) ? items : [items]).map((i) => + 'rid' in i ? [i.rid, i.kind] : i + ) }) } @@ -124,14 +125,14 @@ export class Submenu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem + | MenuItemKind >(items: T | T[]): Promise { return invoke('plugin:menu|prepend', { rid: this.rid, kind: this.kind, - items: (Array.isArray(items) ? items : [items]).map((i) => [ - i.rid, - i.kind - ]) + items: (Array.isArray(items) ? items : [items]).map((i) => + 'rid' in i ? [i.rid, i.kind] : i + ) }) } @@ -149,14 +150,14 @@ export class Submenu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem + | MenuItemKind >(items: T | T[], position: number): Promise { return invoke('plugin:menu|insert', { rid: this.rid, kind: this.kind, - items: (Array.isArray(items) ? items : [items]).map((i) => [ - i.rid, - i.kind - ]), + items: (Array.isArray(items) ? items : [items]).map((i) => + 'rid' in i ? [i.rid, i.kind] : i + ), position }) } From 5f8b9d72215e0b780555deac77af433615d28e3e Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 13:16:06 -0300 Subject: [PATCH 56/64] fix mobile channel load --- core/tauri/src/window/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/tauri/src/window/mod.rs b/core/tauri/src/window/mod.rs index 6601d24b80f..eb06bf4f2b1 100644 --- a/core/tauri/src/window/mod.rs +++ b/core/tauri/src/window/mod.rs @@ -2289,9 +2289,11 @@ impl Window { if let serde_json::Value::Object(map) = payload { for v in map.values() { if let serde_json::Value::String(s) = v { - if s.starts_with(crate::ipc::channel::IPC_PAYLOAD_PREFIX) { - crate::ipc::Channel::load_from_ipc(window.clone(), s); - } + s.split_once(crate::ipc::channel::IPC_PAYLOAD_PREFIX) + .and_then(|(_prefix, id)| id.parse().ok()) + .map(|callback_id| { + crate::ipc::Channel::from_ipc(window.clone(), CallbackFn(callback_id)) + }); } } } From 4c3699315c57bb7439f9e5e5c24455bdc091dd67 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 13:17:46 -0300 Subject: [PATCH 57/64] avoid panics --- core/tauri/src/menu/plugin.rs | 16 ++++++++-------- core/tauri/src/tray/plugin.rs | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index 956dc2b4588..e2a560d632e 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -452,7 +452,7 @@ fn append( item.with_item(&window, &resources_table, |i| submenu.append(i))?; } } - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; Ok(()) @@ -479,7 +479,7 @@ fn prepend( item.with_item(&window, &resources_table, |i| submenu.prepend(i))?; } } - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; Ok(()) @@ -509,7 +509,7 @@ fn insert( position += 1 } } - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; Ok(()) @@ -533,7 +533,7 @@ fn remove( let submenu = resources_table.get::>(menu_rid)?; do_menu_item!(resources_table, rid, kind, |i| submenu.remove(&*i))?; } - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; Ok(()) @@ -574,7 +574,7 @@ fn remove_at( return Ok(Some(make_item_resource!(resources_table, item))); } } - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; Ok(None) @@ -590,7 +590,7 @@ fn items( let items = match kind { ItemKind::Menu => resources_table.get::>(rid)?.items()?, ItemKind::Submenu => resources_table.get::>(rid)?.items()?, - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; Ok( @@ -622,7 +622,7 @@ fn get( return Ok(Some(make_item_resource!(resources_table, item))); } } - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; Ok(None) @@ -652,7 +652,7 @@ async fn popup( let submenu = resources_table.get::>(rid)?; submenu.popup_inner(window, at)?; } - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; } diff --git a/core/tauri/src/tray/plugin.rs b/core/tauri/src/tray/plugin.rs index 308eb040254..03d4ebd55e6 100644 --- a/core/tauri/src/tray/plugin.rs +++ b/core/tauri/src/tray/plugin.rs @@ -59,7 +59,7 @@ fn new( let submenu = resources_table.get::>(rid)?; builder = builder.menu(&*submenu); } - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; } if let Some(icon) = options.icon { @@ -117,7 +117,7 @@ fn set_menu( let submenu = resources_table.get::>(rid)?; tray.set_menu(Some((*submenu).clone()))?; } - _ => unreachable!(), + _ => return Err(anyhow::anyhow!("unexpected menu item kind").into()), }; } else { tray.set_menu(None::>)?; From b36a7717d5d253c34e9842f95a6d209d5641558f Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 14:56:36 -0300 Subject: [PATCH 58/64] inline MenuItemKind --- tooling/api/src/menu.ts | 13 ----------- tooling/api/src/menu/base.ts | 38 ++++++++++++++++++++++++++++----- tooling/api/src/menu/menu.ts | 32 +++++++++++++++++++++------ tooling/api/src/menu/submenu.ts | 24 ++++++++++++++++----- 4 files changed, 78 insertions(+), 29 deletions(-) diff --git a/tooling/api/src/menu.ts b/tooling/api/src/menu.ts index ead0f5bd5c0..a32c1b16ba5 100644 --- a/tooling/api/src/menu.ts +++ b/tooling/api/src/menu.ts @@ -2,12 +2,6 @@ // SPDX-License-Identifier: Apache-2.0 // SPDX-License-Identifier: MIT -import { CheckMenuItemOptions } from './menu/checkMenuItem' -import { SubmenuOptions } from './menu/submenu' -import { MenuItemOptions } from './menu/menuItem' -import { IconMenuItemOptions } from './menu/iconMenuItem' -import { PredefinedMenuItemOptions } from './menu/predefinedMenuItem' - export * from './menu/submenu' export * from './menu/menuItem' export * from './menu/menu' @@ -21,10 +15,3 @@ export * from './menu/predefinedMenuItem' * This package is also accessible with `window.__TAURI__.menu` when [`build.withGlobalTauri`](https://tauri.app/v1/api/config/#buildconfig.withglobaltauri) in `tauri.conf.json` is set to `true`. * @module */ - -export type MenuItemKind = - | MenuItemOptions - | SubmenuOptions - | IconMenuItemOptions - | PredefinedMenuItemOptions - | CheckMenuItemOptions diff --git a/tooling/api/src/menu/base.ts b/tooling/api/src/menu/base.ts index ca78977b10f..7ca111f7172 100644 --- a/tooling/api/src/menu/base.ts +++ b/tooling/api/src/menu/base.ts @@ -3,8 +3,12 @@ // SPDX-License-Identifier: MIT import { Resource } from '../internal' -import { MenuItemKind } from '../menu' import { Channel, invoke } from '../primitives' +import { CheckMenuItemOptions } from './checkMenuItem' +import { IconMenuItemOptions } from './iconMenuItem' +import { MenuItemOptions } from './menuItem' +import { PredefinedMenuItemOptions } from './predefinedMenuItem' +import { SubmenuOptions } from './submenu' export type ItemKind = | 'MenuItem' @@ -15,8 +19,18 @@ export type ItemKind = | 'Menu' function injectChannel( - i: MenuItemKind -): MenuItemKind & { handler?: Channel } { + i: + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions +): + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | (CheckMenuItemOptions & { handler?: Channel }) { if ('items' in i) { i.items = i.items?.map((item) => 'rid' in item ? item : injectChannel(item) @@ -35,7 +49,14 @@ export async function newMenu( opts?: unknown ): Promise<[number, string]> { const handler = new Channel() - let items: null | Array<[number, string] | MenuItemKind> = null + let items: null | Array< + | [number, string] + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions + > = null if (opts && typeof opts === 'object') { if ('action' in opts && opts.action) { handler.onmessage = opts.action as () => void @@ -44,7 +65,14 @@ export async function newMenu( if ('items' in opts && opts.items) { items = ( - opts.items as Array<{ rid: number; kind: string } | MenuItemKind> + opts.items as Array< + | { rid: number; kind: string } + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions + > ).map((i) => { if ('rid' in i) { return [i.rid, i.kind] diff --git a/tooling/api/src/menu/menu.ts b/tooling/api/src/menu/menu.ts index 299a4e1499a..c10b0ad1760 100644 --- a/tooling/api/src/menu/menu.ts +++ b/tooling/api/src/menu/menu.ts @@ -3,12 +3,16 @@ // SPDX-License-Identifier: MIT import { - MenuItemKind, + MenuItemOptions, type CheckMenuItem, type IconMenuItem, type MenuItem, type PredefinedMenuItem, - type Submenu + type Submenu, + SubmenuOptions, + IconMenuItemOptions, + PredefinedMenuItemOptions, + CheckMenuItemOptions } from '../menu' import { type LogicalPosition, PhysicalPosition } from '../dpi' import { type Window } from '../window' @@ -54,7 +58,11 @@ export interface MenuOptions { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - | MenuItemKind + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions > } @@ -93,7 +101,11 @@ export class Menu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - | MenuItemKind + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions >(items: T | T[]): Promise { return invoke('plugin:menu|append', { rid: this.rid, @@ -118,7 +130,11 @@ export class Menu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - | MenuItemKind + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions >(items: T | T[]): Promise { return invoke('plugin:menu|prepend', { rid: this.rid, @@ -143,7 +159,11 @@ export class Menu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - | MenuItemKind + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions >(items: T | T[], position: number): Promise { return invoke('plugin:menu|insert', { rid: this.rid, diff --git a/tooling/api/src/menu/submenu.ts b/tooling/api/src/menu/submenu.ts index bbb62fd1184..1c03bb05017 100644 --- a/tooling/api/src/menu/submenu.ts +++ b/tooling/api/src/menu/submenu.ts @@ -3,12 +3,14 @@ // SPDX-License-Identifier: MIT import { - MenuItemKind, + IconMenuItemOptions, type CheckMenuItem, type IconMenuItem, type MenuItem, type MenuItemOptions, - type PredefinedMenuItem + type PredefinedMenuItem, + PredefinedMenuItemOptions, + CheckMenuItemOptions } from '../menu' import { invoke } from '../primitives' import { type LogicalPosition, PhysicalPosition, type Window } from '../window' @@ -100,7 +102,11 @@ export class Submenu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - | MenuItemKind + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions >(items: T | T[]): Promise { return invoke('plugin:menu|append', { rid: this.rid, @@ -125,7 +131,11 @@ export class Submenu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - | MenuItemKind + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions >(items: T | T[]): Promise { return invoke('plugin:menu|prepend', { rid: this.rid, @@ -150,7 +160,11 @@ export class Submenu extends MenuItemBase { | PredefinedMenuItem | CheckMenuItem | IconMenuItem - | MenuItemKind + | MenuItemOptions + | SubmenuOptions + | IconMenuItemOptions + | PredefinedMenuItemOptions + | CheckMenuItemOptions >(items: T | T[], position: number): Promise { return invoke('plugin:menu|insert', { rid: this.rid, From 61a363999eaf611b32afd95380704189b62479aa Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 15:09:42 -0300 Subject: [PATCH 59/64] cleanup new channel interface --- core/tauri/src/ipc/channel.rs | 61 +++++++++++++++++++++++++--------- core/tauri/src/ipc/mod.rs | 2 +- core/tauri/src/ipc/protocol.rs | 5 +-- core/tauri/src/menu/plugin.rs | 14 ++++---- core/tauri/src/window/mod.rs | 9 +++-- 5 files changed, 61 insertions(+), 30 deletions(-) diff --git a/core/tauri/src/ipc/channel.rs b/core/tauri/src/ipc/channel.rs index e510595a049..d650371961d 100644 --- a/core/tauri/src/ipc/channel.rs +++ b/core/tauri/src/ipc/channel.rs @@ -4,6 +4,7 @@ use std::{ collections::HashMap, + str::FromStr, sync::{ atomic::{AtomicU32, Ordering}, Arc, Mutex, @@ -50,25 +51,55 @@ impl Serialize for Channel { } } -pub(crate) struct ChannelRef(pub(crate) CallbackFn); - -impl ChannelRef { - fn new(value: impl AsRef) -> Option { - value - .as_ref() - .split_once(IPC_PAYLOAD_PREFIX) - .and_then(|(_prefix, id)| id.parse().ok()) +/// The ID of a channel that was defined on the JavaScript layer. +/// +/// Useful when expecting [`Channel`] as part of a JSON object instead of a top-level command argument. +/// +/// # Examples +/// +/// ```rust +/// use tauri::{ipc::JavaScriptChannelId, Runtime, Window}; +/// +/// #[derive(serde::Deserialize)] +/// #[serde(rename_all = "camelCase")] +/// struct Button { +/// label: String, +/// on_click: JavaScriptChannelId, +/// } +/// +/// #[tauri::command] +/// fn add_button(window: Window, button: Button) { +/// let channel = button.on_click.channel_on(window); +/// channel.send("clicked").unwrap(); +/// } +/// ``` +pub struct JavaScriptChannelId(CallbackFn); + +impl FromStr for JavaScriptChannelId { + type Err = &'static str; + + fn from_str(s: &str) -> Result { + s.split_once(IPC_PAYLOAD_PREFIX) + .ok_or("invalid channel string") + .and_then(|(_prefix, id)| id.parse().map_err(|_| "invalid channel ID")) .map(|id| Self(CallbackFn(id))) } } -impl<'de> Deserialize<'de> for ChannelRef { +impl JavaScriptChannelId { + /// Gets a [`Channel`] for this channel ID on the given [`Window`]. + pub fn channel_on(&self, window: Window) -> Channel { + Channel::from_callback_fn(window, self.0) + } +} + +impl<'de> Deserialize<'de> for JavaScriptChannelId { fn deserialize(deserializer: D) -> std::result::Result where D: Deserializer<'de>, { let value: String = Deserialize::deserialize(deserializer)?; - ChannelRef::new(&value).ok_or_else(|| { + Self::from_str(&value).map_err(|_| { serde::de::Error::custom(format!( "invalid channel value `{value}`, expected a string in the `{IPC_PAYLOAD_PREFIX}ID` format" )) @@ -84,7 +115,7 @@ impl Channel { Self::new_with_id(CHANNEL_COUNTER.fetch_add(1, Ordering::Relaxed), on_message) } - pub(crate) fn new_with_id crate::Result<()> + Send + Sync + 'static>( + fn new_with_id crate::Result<()> + Send + Sync + 'static>( id: u32, on_message: F, ) -> Self { @@ -100,7 +131,7 @@ impl Channel { channel } - pub(crate) fn from_ipc(window: Window, callback: CallbackFn) -> Self { + pub(crate) fn from_callback_fn(window: Window, callback: CallbackFn) -> Self { Channel::new_with_id(callback.0, move |body| { let data_id = CHANNEL_DATA_COUNTER.fetch_add(1, Ordering::Relaxed); window @@ -136,9 +167,9 @@ impl<'de, R: Runtime> CommandArg<'de, R> for Channel { let window = command.message.window(); let value: String = Deserialize::deserialize(command).map_err(|e| crate::Error::InvalidArgs(name, arg, e))?; - ChannelRef::new(&value) - .map(|r| Channel::from_ipc(window, r.0)) - .ok_or_else(|| { + JavaScriptChannelId::from_str(&value) + .map(|id| id.channel_on(window)) + .map_err(|_| { InvokeError::from_anyhow(anyhow::anyhow!( "invalid channel value `{value}`, expected a string in the `{IPC_PAYLOAD_PREFIX}ID` format" )) diff --git a/core/tauri/src/ipc/mod.rs b/core/tauri/src/ipc/mod.rs index 02bf1f6a83c..eb37295f959 100644 --- a/core/tauri/src/ipc/mod.rs +++ b/core/tauri/src/ipc/mod.rs @@ -25,7 +25,7 @@ pub(crate) mod channel; pub(crate) mod format_callback; pub(crate) mod protocol; -pub use channel::Channel; +pub use channel::{Channel, JavaScriptChannelId}; /// A closure that is run every time Tauri receives a message it doesn't explicitly handle. pub type InvokeHandler = dyn Fn(Invoke) -> bool + Send + Sync + 'static; diff --git a/core/tauri/src/ipc/protocol.rs b/core/tauri/src/ipc/protocol.rs index 61bf68ee9b4..14e5780dec3 100644 --- a/core/tauri/src/ipc/protocol.rs +++ b/core/tauri/src/ipc/protocol.rs @@ -245,7 +245,7 @@ fn handle_ipc_message(message: String, manager: &AppManager, labe if !(cfg!(target_os = "macos") || cfg!(target_os = "ios")) && matches!(v, JsonValue::Object(_) | JsonValue::Array(_)) { - let _ = Channel::from_ipc(window, callback).send(v); + let _ = Channel::from_callback_fn(window, callback).send(v); } else { responder_eval( &window, @@ -262,7 +262,8 @@ fn handle_ipc_message(message: String, manager: &AppManager, labe error, ); } else { - let _ = Channel::from_ipc(window, callback).send(InvokeBody::Raw(v.clone())); + let _ = + Channel::from_callback_fn(window, callback).send(InvokeBody::Raw(v.clone())); } } InvokeResponse::Err(e) => responder_eval( diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index e2a560d632e..5d6ea989971 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -13,7 +13,7 @@ use tauri_runtime::window::dpi::Position; use super::{sealed::ContextMenuBase, *}; use crate::{ command, - ipc::{channel::ChannelRef, Channel}, + ipc::{channel::JavaScriptChannelId, Channel}, plugin::{Builder, TauriPlugin}, resources::{ResourceId, ResourceTable}, AppHandle, IconDto, Manager, RunEvent, Runtime, State, Window, @@ -117,7 +117,7 @@ impl SubmenuPayload { #[derive(Deserialize)] struct CheckMenuItemPayload { - handler: Option, + handler: Option, id: Option, text: String, checked: bool, @@ -142,7 +142,7 @@ impl CheckMenuItemPayload { let item = builder.checked(self.checked).build(window); if let Some(handler) = self.handler { - let handler = Channel::from_ipc(window.clone(), handler.0); + let handler = handler.channel_on(window.clone()); window .state::() .0 @@ -165,7 +165,7 @@ enum Icon { #[derive(Deserialize)] #[serde(rename_all = "camelCase")] struct IconMenuItemPayload { - handler: Option, + handler: Option, id: Option, text: String, icon: Icon, @@ -194,7 +194,7 @@ impl IconMenuItemPayload { let item = builder.build(window); if let Some(handler) = self.handler { - let handler = Channel::from_ipc(window.clone(), handler.0); + let handler = handler.channel_on(window.clone()); window .state::() .0 @@ -209,7 +209,7 @@ impl IconMenuItemPayload { #[derive(Deserialize)] struct MenuItemPayload { - handler: Option, + handler: Option, id: Option, text: String, enabled: Option, @@ -233,7 +233,7 @@ impl MenuItemPayload { let item = builder.build(window); if let Some(handler) = self.handler { - let handler = Channel::from_ipc(window.clone(), handler.0); + let handler = handler.channel_on(window.clone()); window .state::() .0 diff --git a/core/tauri/src/window/mod.rs b/core/tauri/src/window/mod.rs index eb06bf4f2b1..6ec2b8fe0e0 100644 --- a/core/tauri/src/window/mod.rs +++ b/core/tauri/src/window/mod.rs @@ -2286,14 +2286,13 @@ impl Window { handled = true; fn load_channels(payload: &serde_json::Value, window: &Window) { + use std::str::FromStr; + if let serde_json::Value::Object(map) = payload { for v in map.values() { if let serde_json::Value::String(s) = v { - s.split_once(crate::ipc::channel::IPC_PAYLOAD_PREFIX) - .and_then(|(_prefix, id)| id.parse().ok()) - .map(|callback_id| { - crate::ipc::Channel::from_ipc(window.clone(), CallbackFn(callback_id)) - }); + crate::ipc::JavaScriptChannelId::from_str(s) + .map(|id| id.channel_on(window.clone())); } } } From d97086df7afe8bfa582341b35906c4b40392a717 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 16:28:00 -0300 Subject: [PATCH 60/64] fix pre-commit hook --- .husky/pre-commit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index 3050d5d43f9..7178a541726 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -11,7 +11,7 @@ if [ -z "$(git diff --name-only tooling/api)" ]; then else cd tooling/api yarn format - yarn lint-fix + yarn lint:fix cd ../.. fi From 8eb4cda6936a4d30f39beda2d6c71963fd002598 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 16:28:18 -0300 Subject: [PATCH 61/64] camel case --- core/tauri/src/menu/plugin.rs | 1 + tooling/api/src/menu/predefinedMenuItem.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index 5d6ea989971..9580a3e490e 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -31,6 +31,7 @@ pub(crate) enum ItemKind { } #[derive(Deserialize)] +#[serde(rename_all = "camelCase")] pub(crate) struct AboutMetadata { pub name: Option, pub version: Option, diff --git a/tooling/api/src/menu/predefinedMenuItem.ts b/tooling/api/src/menu/predefinedMenuItem.ts index f78cf051eb9..3f45c728487 100644 --- a/tooling/api/src/menu/predefinedMenuItem.ts +++ b/tooling/api/src/menu/predefinedMenuItem.ts @@ -18,7 +18,7 @@ export interface AboutMetadata { * * - **Windows / Linux:** Appended to the end of `version` in parentheses. */ - short_version?: string + shortVersion?: string /** * The authors of the application. * @@ -60,7 +60,7 @@ export interface AboutMetadata { * * - **macOS:** Unsupported. */ - website_label?: string + websiteLabel?: string /** * The credits. * From 8883bf561a114b467ceecba64d1a418a5f80b3dd Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 16:28:47 -0300 Subject: [PATCH 62/64] merge set_icon and set_native_icon --- core/tauri/src/menu/plugin.rs | 24 ++++++++++-------------- tooling/api/src/menu/iconMenuItem.ts | 7 +------ 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/core/tauri/src/menu/plugin.rs b/core/tauri/src/menu/plugin.rs index 9580a3e490e..c659bf349f4 100644 --- a/core/tauri/src/menu/plugin.rs +++ b/core/tauri/src/menu/plugin.rs @@ -818,22 +818,19 @@ fn set_checked(app: AppHandle, rid: ResourceId, checked: bool) -> fn set_icon( app: AppHandle, rid: ResourceId, - icon: Option, -) -> crate::Result<()> { - let resources_table = app.manager.resources_table(); - let icon_item = resources_table.get::>(rid)?; - icon_item.set_icon(icon.map(Into::into)) -} - -#[command(root = "crate")] -fn set_native_icon( - app: AppHandle, - rid: ResourceId, - icon: Option, + icon: Option, ) -> crate::Result<()> { let resources_table = app.manager.resources_table(); let icon_item = resources_table.get::>(rid)?; - icon_item.set_native_icon(icon) + match icon { + Some(Icon::Native(icon)) => icon_item.set_native_icon(Some(icon)), + Some(Icon::Icon(icon)) => icon_item.set_icon(Some(icon.into())), + None => { + icon_item.set_icon(None)?; + icon_item.set_native_icon(None)?; + Ok(()) + } + } } struct MenuChannels(Mutex>); @@ -874,7 +871,6 @@ pub(crate) fn init() -> TauriPlugin { is_checked, set_checked, set_icon, - set_native_icon, ]) .build() } diff --git a/tooling/api/src/menu/iconMenuItem.ts b/tooling/api/src/menu/iconMenuItem.ts index 06ec2251cd8..03faeb5af6a 100644 --- a/tooling/api/src/menu/iconMenuItem.ts +++ b/tooling/api/src/menu/iconMenuItem.ts @@ -189,12 +189,7 @@ export class IconMenuItem extends MenuItemBase { } /** Sets an icon for this icon menu item */ - async setIcon(icon: string | Uint8Array | null): Promise { + async setIcon(icon: NativeIcon | string | Uint8Array | null): Promise { return invoke('plugin:menu|set_icon', { rid: this.rid, icon }) } - - /** Sets a native icon for this icon menu item */ - async setNativeIcon(icon: NativeIcon | null): Promise { - return invoke('plugin:menu|set_native_icon', { rid: this.rid, icon }) - } } From 2a156f22580762f9a108158a714a65a08aba02b3 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 16:34:28 -0300 Subject: [PATCH 63/64] fix items(), get() --- core/tauri/scripts/bundle.global.js | 2 +- tooling/api/src/menu/menu.ts | 14 +++++++------- tooling/api/src/menu/submenu.ts | 13 ++++++------- 3 files changed, 14 insertions(+), 15 deletions(-) diff --git a/core/tauri/scripts/bundle.global.js b/core/tauri/scripts/bundle.global.js index 8b2f2962579..62903986339 100644 --- a/core/tauri/scripts/bundle.global.js +++ b/core/tauri/scripts/bundle.global.js @@ -1 +1 @@ -var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i;function r(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=r((e=>{n(this,i,"f").call(this,e)}))}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}i=new WeakMap;class s{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var o=Object.freeze({__proto__:null,Channel:a,PluginListener:s,addPluginListener:async function(e,n,t){const i=new a;return i.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:i}).then((()=>new s(e,n,i.id)))},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:l,transformCallback:r});var u,c=Object.freeze({__proto__:null,getName:async function(){return l("plugin:app|name")},getTauriVersion:async function(){return l("plugin:app|tauri_version")},getVersion:async function(){return l("plugin:app|version")},hide:async function(){return l("plugin:app|app_hide")},show:async function(){return l("plugin:app|app_show")}});async function d(e,n){await l("plugin:event|unlisten",{event:e,eventId:n})}async function p(e,n,t){return l("plugin:event|listen",{event:e,windowLabel:t?.target,handler:r(n)}).then((n=>async()=>d(e,n)))}async function h(e,n,t){return p(e,(t=>{n(t),d(e,t.id).catch((()=>{}))}),t)}async function y(e,n,t){await l("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}!function(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"}(u||(u={}));var g=Object.freeze({__proto__:null,get TauriEvent(){return u},emit:y,listen:p,once:h});class w{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class _{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new w(this.width/e,this.height/e)}}class m{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class b{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new m(this.x/e,this.y/e)}}var f,v,k=Object.freeze({__proto__:null,LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(f||(f={}));class D{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}}function A(){return new L(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function I(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new L(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(v||(v={}));const E=["tauri://created","tauri://error"];class L{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||l("plugin:window|create",{options:{...n,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return I().some((n=>n.label===e))?new L(e,{skip:!0}):null}static getCurrent(){return A()}static getAll(){return I()}static async getFocusedWindow(){for(const e of I())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):p(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):h(e,n,{target:this.label})}async emit(e,n){if(E.includes(e)){for(const t of this.listeners[e]||[])t({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return y(e,n,{target:this.label})}_handleTauriEvent(e,n){return!!E.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return l("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return l("plugin:window|inner_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async outerPosition(){return l("plugin:window|outer_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async innerSize(){return l("plugin:window|inner_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async outerSize(){return l("plugin:window|outer_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async isFullscreen(){return l("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return l("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return l("plugin:window|is_maximized",{label:this.label})}async isFocused(){return l("plugin:window|is_focused",{label:this.label})}async isDecorated(){return l("plugin:window|is_decorated",{label:this.label})}async isResizable(){return l("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return l("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return l("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return l("plugin:window|is_closable",{label:this.label})}async isVisible(){return l("plugin:window|is_visible",{label:this.label})}async title(){return l("plugin:window|title",{label:this.label})}async theme(){return l("plugin:window|theme",{label:this.label})}async center(){return l("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===f.Critical?{type:"Critical"}:{type:"Informational"}),l("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return l("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return l("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return l("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return l("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return l("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return l("plugin:window|maximize",{label:this.label})}async unmaximize(){return l("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return l("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return l("plugin:window|minimize",{label:this.label})}async unminimize(){return l("plugin:window|unminimize",{label:this.label})}async show(){return l("plugin:window|show",{label:this.label})}async hide(){return l("plugin:window|hide",{label:this.label})}async close(){return l("plugin:window|close",{label:this.label})}async setDecorations(e){return l("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return l("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return l("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return l("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return l("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return l("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return l("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return l("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return l("plugin:window|set_focus",{label:this.label})}async setIcon(e){return l("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return l("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return l("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return l("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return l("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return l("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return l("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return l("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,(n=>{n.payload=x(n.payload),e(n)}))}async onMoved(e){return this.listen(u.WINDOW_MOVED,(n=>{n.payload=T(n.payload),e(n)}))}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,(n=>{const t=new D(n);Promise.resolve(e(t)).then((()=>{if(!t.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const n=await this.listen(u.WINDOW_FOCUS,(n=>{e({...n,payload:!0})})),t=await this.listen(u.WINDOW_BLUR,(n=>{e({...n,payload:!1})}));return()=>{n(),t()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(u.WINDOW_FILE_DROP,(n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:T(n.payload.position)}})})),t=await this.listen(u.WINDOW_FILE_DROP_HOVER,(n=>{e({...n,payload:{type:"hover",paths:n.payload.paths,position:T(n.payload.position)}})})),i=await this.listen(u.WINDOW_FILE_DROP_CANCELLED,(n=>{e({...n,payload:{type:"cancel"}})}));return()=>{n(),t(),i()}}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var S,P;function C(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:T(e.position),size:x(e.size)}}function T(e){return new b(e.x,e.y)}function x(e){return new _(e.width,e.height)}!function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(S||(S={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(P||(P={}));var F,z=Object.freeze({__proto__:null,CloseRequestedEvent:D,get Effect(){return S},get EffectState(){return P},LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_,get ProgressBarStatus(){return v},get UserAttentionType(){return f},Window:L,availableMonitors:async function(){return l("plugin:window|available_monitors").then((e=>e.map(C)))},currentMonitor:async function(){return l("plugin:window|current_monitor").then(C)},getAll:I,getCurrent:A,primaryMonitor:async function(){return l("plugin:window|primary_monitor").then(C)}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(F||(F={}));var R,M=Object.freeze({__proto__:null,get BaseDirectory(){return F},appCacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppCache})},appConfigDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppConfig})},appDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppData})},appLocalDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLocalData})},appLogDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLog})},audioDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Audio})},basename:async function(e,n){return l("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Cache})},configDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Config})},dataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Desktop})},dirname:async function(e){return l("plugin:path|dirname",{path:e})},documentDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Document})},downloadDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Download})},executableDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Executable})},extname:async function(e){return l("plugin:path|extname",{path:e})},fontDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Font})},homeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Home})},isAbsolute:async function(e){return l("plugin:path|isAbsolute",{path:e})},join:async function(...e){return l("plugin:path|join",{paths:e})},localDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.LocalData})},normalize:async function(e){return l("plugin:path|normalize",{path:e})},pictureDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Picture})},publicDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Public})},resolve:async function(...e){return l("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return l("plugin:path|resolve_directory",{directory:F.Resource,path:e})},resourceDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Resource})},runtimeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Temp})},templateDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Template})},videoDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Video})}});class W{get rid(){return n(this,R,"f")}constructor(e){R.set(this,void 0),t(this,R,e,"f")}async close(){return l("plugin:resources|close",{rid:this.rid})}}R=new WeakMap;class N extends W{constructor(e,n){super(e),this.id=n}static async new(e){e?.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e?.icon&&(e.icon="string"==typeof e.icon?e.icon:Array.from(e.icon));const n=new a;return e?.action&&(n.onmessage=e.action,delete e.action),l("plugin:tray|new",{options:e??{},handler:n}).then((([e,n])=>new N(e,n)))}async setIcon(e){let n=null;return e&&(n="string"==typeof e?e:Array.from(e)),l("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),l("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return l("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return l("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return l("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return l("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return l("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return l("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var O,U,B=Object.freeze({__proto__:null,TrayIcon:N});function V(e){if("items"in e)e.items=e.items?.map((e=>"rid"in e?e:V(e)));else if("action"in e&&e.action){const n=new a;return n.onmessage=e.action,delete e.action,{...e,handler:n}}return e}async function H(e,n){const t=new a;let i=null;return n&&"object"==typeof n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"items"in n&&n.items&&(i=n.items.map((e=>"rid"in e?[e.rid,e.kind]:V(e))))),l("plugin:menu|new",{kind:e,options:n?{...n,items:i}:void 0,handler:t})}class G extends W{get id(){return n(this,O,"f")}get kind(){return n(this,U,"f")}constructor(e,n,i){super(e),O.set(this,void 0),U.set(this,void 0),t(this,O,n,"f"),t(this,U,i,"f")}}function j([e,n,t]){switch(t){case"Submenu":return new q(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}O=new WeakMap,U=new WeakMap;let q=class e extends G{constructor(e,n){super(e,n,"Submenu")}static async new(n){return H("Submenu",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e)),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(j)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(j)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?j(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsWindowsMenuForNSApp(){return l("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return l("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}};function Q([e,n,t]){switch(t){case"Submenu":return new Submenu(e,n);case"Predefined":return new PredefinedMenuItem(e,n);case"Check":return new CheckMenuItem(e,n);case"Icon":return new IconMenuItem(e,n);default:return new MenuItem(e,n)}}class $ extends G{constructor(e,n){super(e,n,"Menu")}static async new(e){return H("Menu",e).then((([e,n])=>new $(e,n)))}static async default(){return l("plugin:menu|default").then((([e,n])=>new $(e,n)))}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e)),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(Q)}async items(){return l("plugin:menu|append",{rid:this.rid,kind:this.kind}).then((e=>e.map(Q)))}async get(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?Q(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsAppMenu(){return l("plugin:menu|set_as_app_menu",{rid:this.rid}).then((e=>e?new $(e[0],e[1]):null))}async setAsWindowMenu(e){return l("plugin:menu|set_as_window_menu",{rid:this.rid,window:e?.label??null}).then((e=>e?new $(e[0],e[1]):null))}}var Z;!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}(Z||(Z={}));var J=Object.freeze({__proto__:null,CheckMenuItem:class e extends G{constructor(e,n){super(e,n,"Check")}static async new(n){return H("Check",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return l("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return l("plugin:menu|set_checked",{rid:this.rid,checked:e})}},IconMenuItem:class e extends G{constructor(e,n){super(e,n,"Icon")}static async new(n){return H("Icon",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return l("plugin:menu|set_icon",{rid:this.rid,icon:e})}async setNativeIcon(e){return l("plugin:menu|set_native_icon",{rid:this.rid,icon:e})}},Menu:$,MenuItem:class e extends G{constructor(e,n){super(e,n,"MenuItem")}static async new(n){return H("MenuItem",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}},get NativeIcon(){return Z},PredefinedMenuItem:class e extends G{constructor(e,n){super(e,n,"Predefined")}static async new(n){return H("Predefined",n).then((([n,t])=>new e(n,t)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}},Submenu:q});return e.app=c,e.dpi=k,e.event=g,e.menu=J,e.path=M,e.primitives=o,e.tray=B,e.window=z,e}({});window.__TAURI__=__TAURI_IIFE__; +var __TAURI_IIFE__=function(e){"use strict";function n(e,n,t,i){if("a"===t&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof n?e!==n||!i:!n.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?i:"a"===t?i.call(e):i?i.value:n.get(e)}function t(e,n,t,i,r){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof n?e!==n||!r:!n.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?r.call(e,t):r?r.value=t:n.set(e,t),t}var i;function r(e,n=!1){return window.__TAURI_INTERNALS__.transformCallback(e,n)}"function"==typeof SuppressedError&&SuppressedError;class a{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,i.set(this,(()=>{})),this.id=r((e=>{n(this,i,"f").call(this,e)}))}set onmessage(e){t(this,i,e,"f")}get onmessage(){return n(this,i,"f")}toJSON(){return`__CHANNEL__:${this.id}`}}i=new WeakMap;class s{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}}async function l(e,n={},t){return window.__TAURI_INTERNALS__.invoke(e,n,t)}var o=Object.freeze({__proto__:null,Channel:a,PluginListener:s,addPluginListener:async function(e,n,t){const i=new a;return i.onmessage=t,l(`plugin:${e}|register_listener`,{event:n,handler:i}).then((()=>new s(e,n,i.id)))},convertFileSrc:function(e,n="asset"){return window.__TAURI_INTERNALS__.convertFileSrc(e,n)},invoke:l,transformCallback:r});var u,c=Object.freeze({__proto__:null,getName:async function(){return l("plugin:app|name")},getTauriVersion:async function(){return l("plugin:app|tauri_version")},getVersion:async function(){return l("plugin:app|version")},hide:async function(){return l("plugin:app|app_hide")},show:async function(){return l("plugin:app|app_show")}});async function d(e,n){await l("plugin:event|unlisten",{event:e,eventId:n})}async function p(e,n,t){return l("plugin:event|listen",{event:e,windowLabel:t?.target,handler:r(n)}).then((n=>async()=>d(e,n)))}async function h(e,n,t){return p(e,(t=>{n(t),d(e,t.id).catch((()=>{}))}),t)}async function y(e,n,t){await l("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}!function(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"}(u||(u={}));var g=Object.freeze({__proto__:null,get TauriEvent(){return u},emit:y,listen:p,once:h});class w{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class _{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new w(this.width/e,this.height/e)}}class m{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class b{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new m(this.x/e,this.y/e)}}var f,v,k=Object.freeze({__proto__:null,LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_});!function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(f||(f={}));class D{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}}function A(){return new L(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function E(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new L(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(v||(v={}));const I=["tauri://created","tauri://error"];class L{constructor(e,n={}){this.label=e,this.listeners=Object.create(null),n?.skip||l("plugin:window|create",{options:{...n,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return E().some((n=>n.label===e))?new L(e,{skip:!0}):null}static getCurrent(){return A()}static getAll(){return E()}static async getFocusedWindow(){for(const e of E())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):p(e,n,{target:this.label})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const t=this.listeners[e];t.splice(t.indexOf(n),1)})):h(e,n,{target:this.label})}async emit(e,n){if(I.includes(e)){for(const t of this.listeners[e]||[])t({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return y(e,n,{target:this.label})}_handleTauriEvent(e,n){return!!I.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}async scaleFactor(){return l("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return l("plugin:window|inner_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async outerPosition(){return l("plugin:window|outer_position",{label:this.label}).then((({x:e,y:n})=>new b(e,n)))}async innerSize(){return l("plugin:window|inner_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async outerSize(){return l("plugin:window|outer_size",{label:this.label}).then((({width:e,height:n})=>new _(e,n)))}async isFullscreen(){return l("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return l("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return l("plugin:window|is_maximized",{label:this.label})}async isFocused(){return l("plugin:window|is_focused",{label:this.label})}async isDecorated(){return l("plugin:window|is_decorated",{label:this.label})}async isResizable(){return l("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return l("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return l("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return l("plugin:window|is_closable",{label:this.label})}async isVisible(){return l("plugin:window|is_visible",{label:this.label})}async title(){return l("plugin:window|title",{label:this.label})}async theme(){return l("plugin:window|theme",{label:this.label})}async center(){return l("plugin:window|center",{label:this.label})}async requestUserAttention(e){let n=null;return e&&(n=e===f.Critical?{type:"Critical"}:{type:"Informational"}),l("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return l("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return l("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return l("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return l("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return l("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return l("plugin:window|maximize",{label:this.label})}async unmaximize(){return l("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return l("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return l("plugin:window|minimize",{label:this.label})}async unminimize(){return l("plugin:window|unminimize",{label:this.label})}async show(){return l("plugin:window|show",{label:this.label})}async hide(){return l("plugin:window|hide",{label:this.label})}async close(){return l("plugin:window|close",{label:this.label})}async setDecorations(e){return l("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return l("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return l("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return l("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return l("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return l("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return l("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_size",{label:this.label,value:{type:e.type,data:{width:e.width,height:e.height}}})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_min_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");return l("plugin:window|set_max_size",{label:this.label,value:e?{type:e.type,data:{width:e.width,height:e.height}}:null})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return l("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return l("plugin:window|set_focus",{label:this.label})}async setIcon(e){return l("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return l("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return l("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return l("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return l("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");return l("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return l("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return l("plugin:window|start_dragging",{label:this.label})}async setProgressBar(e){return l("plugin:window|set_progress_bar",{label:this.label,value:e})}async onResized(e){return this.listen(u.WINDOW_RESIZED,(n=>{n.payload=x(n.payload),e(n)}))}async onMoved(e){return this.listen(u.WINDOW_MOVED,(n=>{n.payload=T(n.payload),e(n)}))}async onCloseRequested(e){return this.listen(u.WINDOW_CLOSE_REQUESTED,(n=>{const t=new D(n);Promise.resolve(e(t)).then((()=>{if(!t.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const n=await this.listen(u.WINDOW_FOCUS,(n=>{e({...n,payload:!0})})),t=await this.listen(u.WINDOW_BLUR,(n=>{e({...n,payload:!1})}));return()=>{n(),t()}}async onScaleChanged(e){return this.listen(u.WINDOW_SCALE_FACTOR_CHANGED,e)}async onFileDropEvent(e){const n=await this.listen(u.WINDOW_FILE_DROP,(n=>{e({...n,payload:{type:"drop",paths:n.payload.paths,position:T(n.payload.position)}})})),t=await this.listen(u.WINDOW_FILE_DROP_HOVER,(n=>{e({...n,payload:{type:"hover",paths:n.payload.paths,position:T(n.payload.position)}})})),i=await this.listen(u.WINDOW_FILE_DROP_CANCELLED,(n=>{e({...n,payload:{type:"cancel"}})}));return()=>{n(),t(),i()}}async onThemeChanged(e){return this.listen(u.WINDOW_THEME_CHANGED,e)}}var S,P;function C(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:T(e.position),size:x(e.size)}}function T(e){return new b(e.x,e.y)}function x(e){return new _(e.width,e.height)}!function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"}(S||(S={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(P||(P={}));var F,z=Object.freeze({__proto__:null,CloseRequestedEvent:D,get Effect(){return S},get EffectState(){return P},LogicalPosition:m,LogicalSize:w,PhysicalPosition:b,PhysicalSize:_,get ProgressBarStatus(){return v},get UserAttentionType(){return f},Window:L,availableMonitors:async function(){return l("plugin:window|available_monitors").then((e=>e.map(C)))},currentMonitor:async function(){return l("plugin:window|current_monitor").then(C)},getAll:E,getCurrent:A,primaryMonitor:async function(){return l("plugin:window|primary_monitor").then(C)}});!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(F||(F={}));var R,W=Object.freeze({__proto__:null,get BaseDirectory(){return F},appCacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppCache})},appConfigDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppConfig})},appDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppData})},appLocalDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLocalData})},appLogDir:async function(){return l("plugin:path|resolve_directory",{directory:F.AppLog})},audioDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Audio})},basename:async function(e,n){return l("plugin:path|basename",{path:e,ext:n})},cacheDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Cache})},configDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Config})},dataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Data})},delimiter:function(){return window.__TAURI_INTERNALS__.plugins.path.delimiter},desktopDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Desktop})},dirname:async function(e){return l("plugin:path|dirname",{path:e})},documentDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Document})},downloadDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Download})},executableDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Executable})},extname:async function(e){return l("plugin:path|extname",{path:e})},fontDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Font})},homeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Home})},isAbsolute:async function(e){return l("plugin:path|isAbsolute",{path:e})},join:async function(...e){return l("plugin:path|join",{paths:e})},localDataDir:async function(){return l("plugin:path|resolve_directory",{directory:F.LocalData})},normalize:async function(e){return l("plugin:path|normalize",{path:e})},pictureDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Picture})},publicDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Public})},resolve:async function(...e){return l("plugin:path|resolve",{paths:e})},resolveResource:async function(e){return l("plugin:path|resolve_directory",{directory:F.Resource,path:e})},resourceDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Resource})},runtimeDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Runtime})},sep:function(){return window.__TAURI_INTERNALS__.plugins.path.sep},tempDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Temp})},templateDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Template})},videoDir:async function(){return l("plugin:path|resolve_directory",{directory:F.Video})}});class N{get rid(){return n(this,R,"f")}constructor(e){R.set(this,void 0),t(this,R,e,"f")}async close(){return l("plugin:resources|close",{rid:this.rid})}}R=new WeakMap;class O extends N{constructor(e,n){super(e),this.id=n}static async new(e){e?.menu&&(e.menu=[e.menu.rid,e.menu.kind]),e?.icon&&(e.icon="string"==typeof e.icon?e.icon:Array.from(e.icon));const n=new a;return e?.action&&(n.onmessage=e.action,delete e.action),l("plugin:tray|new",{options:e??{},handler:n}).then((([e,n])=>new O(e,n)))}async setIcon(e){let n=null;return e&&(n="string"==typeof e?e:Array.from(e)),l("plugin:tray|set_icon",{rid:this.rid,icon:n})}async setMenu(e){return e&&(e=[e.rid,e.kind]),l("plugin:tray|set_menu",{rid:this.rid,menu:e})}async setTooltip(e){return l("plugin:tray|set_tooltip",{rid:this.rid,tooltip:e})}async setTitle(e){return l("plugin:tray|set_title",{rid:this.rid,title:e})}async setVisible(e){return l("plugin:tray|set_visible",{rid:this.rid,visible:e})}async setTempDirPath(e){return l("plugin:tray|set_temp_dir_path",{rid:this.rid,path:e})}async setIconAsTemplate(e){return l("plugin:tray|set_icon_as_template",{rid:this.rid,asTemplate:e})}async setMenuOnLeftClick(e){return l("plugin:tray|set_show_menu_on_left_click",{rid:this.rid,onLeft:e})}}var M,U,B,V=Object.freeze({__proto__:null,TrayIcon:O});function H(e){if("items"in e)e.items=e.items?.map((e=>"rid"in e?e:H(e)));else if("action"in e&&e.action){const n=new a;return n.onmessage=e.action,delete e.action,{...e,handler:n}}return e}async function G(e,n){const t=new a;let i=null;return n&&"object"==typeof n&&("action"in n&&n.action&&(t.onmessage=n.action,delete n.action),"items"in n&&n.items&&(i=n.items.map((e=>"rid"in e?[e.rid,e.kind]:H(e))))),l("plugin:menu|new",{kind:e,options:n?{...n,items:i}:void 0,handler:t})}class j extends N{get id(){return n(this,M,"f")}get kind(){return n(this,U,"f")}constructor(e,n,i){super(e),M.set(this,void 0),U.set(this,void 0),t(this,M,n,"f"),t(this,U,i,"f")}}M=new WeakMap,U=new WeakMap;class q extends j{constructor(e,n){super(e,n,"MenuItem")}static async new(e){return G("MenuItem",e).then((([e,n])=>new q(e,n)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}}class Q extends j{constructor(e,n){super(e,n,"Check")}static async new(e){return G("Check",e).then((([e,n])=>new Q(e,n)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async isChecked(){return l("plugin:menu|is_checked",{rid:this.rid})}async setChecked(e){return l("plugin:menu|set_checked",{rid:this.rid,checked:e})}}!function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}(B||(B={}));class $ extends j{constructor(e,n){super(e,n,"Icon")}static async new(e){return G("Icon",e).then((([e,n])=>new $(e,n)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async setAccelerator(e){return l("plugin:menu|set_accelerator",{rid:this.rid,kind:this.kind,accelerator:e})}async setIcon(e){return l("plugin:menu|set_icon",{rid:this.rid,icon:e})}}class Z extends j{constructor(e,n){super(e,n,"Predefined")}static async new(e){return G("Predefined",e).then((([e,n])=>new Z(e,n)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}}function J([e,n,t]){switch(t){case"Submenu":return new K(e,n);case"Predefined":return new Z(e,n);case"Check":return new Q(e,n);case"Icon":return new $(e,n);default:return new q(e,n)}}class K extends j{constructor(e,n){super(e,n,"Submenu")}static async new(e){return G("Submenu",e).then((([e,n])=>new K(e,n)))}async text(){return l("plugin:menu|text",{rid:this.rid,kind:this.kind})}async setText(e){return l("plugin:menu|set_text",{rid:this.rid,kind:this.kind,text:e})}async isEnabled(){return l("plugin:menu|is_enabled",{rid:this.rid,kind:this.kind})}async setEnabled(e){return l("plugin:menu|set_enabled",{rid:this.rid,kind:this.kind,enabled:e})}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e)),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(J)}async items(){return l("plugin:menu|items",{rid:this.rid,kind:this.kind}).then((e=>e.map(J)))}async get(e){return l("plugin:menu|get",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?J(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsWindowsMenuForNSApp(){return l("plugin:menu|set_as_windows_menu_for_nsapp",{rid:this.rid})}async setAsHelpMenuForNSApp(){return l("plugin:menu|set_as_help_menu_for_nsapp",{rid:this.rid})}}function Y([e,n,t]){switch(t){case"Submenu":return new K(e,n);case"Predefined":return new Z(e,n);case"Check":return new Q(e,n);case"Icon":return new $(e,n);default:return new q(e,n)}}class X extends j{constructor(e,n){super(e,n,"Menu")}static async new(e){return G("Menu",e).then((([e,n])=>new X(e,n)))}static async default(){return l("plugin:menu|default").then((([e,n])=>new X(e,n)))}async append(e){return l("plugin:menu|append",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async prepend(e){return l("plugin:menu|prepend",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e))})}async insert(e,n){return l("plugin:menu|insert",{rid:this.rid,kind:this.kind,items:(Array.isArray(e)?e:[e]).map((e=>"rid"in e?[e.rid,e.kind]:e)),position:n})}async remove(e){return l("plugin:menu|remove",{rid:this.rid,kind:this.kind,item:[e.rid,e.kind]})}async removeAt(e){return l("plugin:menu|remove_at",{rid:this.rid,kind:this.kind,position:e}).then(Y)}async items(){return l("plugin:menu|items",{rid:this.rid,kind:this.kind}).then((e=>e.map(Y)))}async get(e){return l("plugin:menu|get",{rid:this.rid,kind:this.kind,id:e}).then((e=>e?Y(e):null))}async popup(e,n){let t=null;return e&&(t={type:e instanceof b?"Physical":"Logical",data:e}),l("plugin:menu|popup",{rid:this.rid,kind:this.kind,window:n?.label??null,at:t})}async setAsAppMenu(){return l("plugin:menu|set_as_app_menu",{rid:this.rid}).then((e=>e?new X(e[0],e[1]):null))}async setAsWindowMenu(e){return l("plugin:menu|set_as_window_menu",{rid:this.rid,window:e?.label??null}).then((e=>e?new X(e[0],e[1]):null))}}var ee=Object.freeze({__proto__:null,CheckMenuItem:Q,IconMenuItem:$,Menu:X,MenuItem:q,get NativeIcon(){return B},PredefinedMenuItem:Z,Submenu:K});return e.app=c,e.dpi=k,e.event=g,e.menu=ee,e.path=W,e.primitives=o,e.tray=V,e.window=z,e}({});window.__TAURI__=__TAURI_IIFE__; diff --git a/tooling/api/src/menu/menu.ts b/tooling/api/src/menu/menu.ts index c10b0ad1760..593b58eedfc 100644 --- a/tooling/api/src/menu/menu.ts +++ b/tooling/api/src/menu/menu.ts @@ -4,16 +4,16 @@ import { MenuItemOptions, - type CheckMenuItem, - type IconMenuItem, - type MenuItem, - type PredefinedMenuItem, - type Submenu, SubmenuOptions, IconMenuItemOptions, PredefinedMenuItemOptions, CheckMenuItemOptions } from '../menu' +import { MenuItem } from './menuItem' +import { CheckMenuItem } from './checkMenuItem' +import { IconMenuItem } from './iconMenuItem' +import { PredefinedMenuItem } from './predefinedMenuItem' +import { Submenu } from './submenu' import { type LogicalPosition, PhysicalPosition } from '../dpi' import { type Window } from '../window' import { invoke } from '../primitives' @@ -210,7 +210,7 @@ export class Menu extends MenuItemBase { Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem > > { - return invoke>('plugin:menu|append', { + return invoke>('plugin:menu|items', { rid: this.rid, kind: this.kind }).then((i) => i.map(itemFromKind)) @@ -227,7 +227,7 @@ export class Menu extends MenuItemBase { | IconMenuItem | null > { - return invoke<[number, string, ItemKind] | null>('plugin:menu|append', { + return invoke<[number, string, ItemKind] | null>('plugin:menu|get', { rid: this.rid, kind: this.kind, id diff --git a/tooling/api/src/menu/submenu.ts b/tooling/api/src/menu/submenu.ts index 1c03bb05017..96456ad1812 100644 --- a/tooling/api/src/menu/submenu.ts +++ b/tooling/api/src/menu/submenu.ts @@ -4,14 +4,13 @@ import { IconMenuItemOptions, - type CheckMenuItem, - type IconMenuItem, - type MenuItem, - type MenuItemOptions, - type PredefinedMenuItem, PredefinedMenuItemOptions, CheckMenuItemOptions } from '../menu' +import { MenuItem, type MenuItemOptions } from './menuItem' +import { CheckMenuItem } from './checkMenuItem' +import { IconMenuItem } from './iconMenuItem' +import { PredefinedMenuItem } from './predefinedMenuItem' import { invoke } from '../primitives' import { type LogicalPosition, PhysicalPosition, type Window } from '../window' import { type ItemKind, MenuItemBase, newMenu } from './base' @@ -211,7 +210,7 @@ export class Submenu extends MenuItemBase { Submenu | MenuItem | PredefinedMenuItem | CheckMenuItem | IconMenuItem > > { - return invoke>('plugin:menu|append', { + return invoke>('plugin:menu|items', { rid: this.rid, kind: this.kind }).then((i) => i.map(itemFromKind)) @@ -228,7 +227,7 @@ export class Submenu extends MenuItemBase { | IconMenuItem | null > { - return invoke<[number, string, ItemKind] | null>('plugin:menu|append', { + return invoke<[number, string, ItemKind] | null>('plugin:menu|get', { rid: this.rid, kind: this.kind, id From 5369a9bc3f74aa4c067d16214b7336dc95b5e084 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 18 Nov 2023 16:42:50 -0300 Subject: [PATCH 64/64] fix example [skip ci] --- examples/api/src/views/Menu.svelte | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/api/src/views/Menu.svelte b/examples/api/src/views/Menu.svelte index ca4ed4dd15d..96be93ac639 100644 --- a/examples/api/src/views/Menu.svelte +++ b/examples/api/src/views/Menu.svelte @@ -10,11 +10,15 @@ const macOS = navigator.userAgent.includes('Macintosh') - async function create() { + async function createSubmenu() { submenu = await Submenu.new({ text: 'app', items: items.map((i) => i.item) }) + } + + async function create() { + await createSubmenu() menuItemCount = items.length menu = await Menu.new({ items: [submenu] @@ -24,9 +28,9 @@ async function popup() { if (!submenu || menuItemCount !== items.length) { - await create() + await createSubmenu() } - // we can't popup the menu because it's the app menu (it crashes on macOS) + // we can't popup the same menu because it's the app menu (it crashes on macOS) const m = await Menu.new({ items: [submenu] }) m.popup() }