From c0456fbb84fd77b7ebcdcab830e78b4b3f80a0ce Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Sat, 17 Jun 2023 17:32:30 -0300 Subject: [PATCH] feat: update to 2.0.0-alpha.10 --- Cargo.lock | 93 ++++----- Cargo.toml | 4 +- examples/api/package.json | 6 +- plugins/app/package.json | 4 +- plugins/authenticator/package.json | 4 +- plugins/autostart/package.json | 4 +- plugins/cli/package.json | 4 +- plugins/clipboard-manager/package.json | 4 +- plugins/dialog/package.json | 4 +- plugins/fs/package.json | 4 +- plugins/fs/src/api-iife.js | 2 +- plugins/global-shortcut/package.json | 4 +- plugins/http/package.json | 4 +- plugins/log/package.json | 4 +- plugins/log/src/api-iife.js | 2 +- plugins/notification/package.json | 4 +- plugins/os/package.json | 4 +- plugins/positioner/package.json | 4 +- plugins/process/package.json | 4 +- plugins/shell/package.json | 4 +- .../examples/vanilla/package.json | 4 +- plugins/sql/package.json | 4 +- plugins/store/package.json | 4 +- plugins/store/src/api-iife.js | 2 +- plugins/stronghold/package.json | 4 +- plugins/updater/package.json | 4 +- plugins/upload/package.json | 4 +- .../examples/svelte-app/package.json | 4 +- plugins/websocket/package.json | 4 +- plugins/window-state/package.json | 4 +- plugins/window/guest-js/event.ts | 107 ---------- plugins/window/guest-js/index.ts | 10 +- plugins/window/package.json | 4 +- plugins/window/src/api-iife.js | 2 +- pnpm-lock.yaml | 186 +++++++++--------- shared/template/package.json | 4 +- 36 files changed, 210 insertions(+), 308 deletions(-) delete mode 100644 plugins/window/guest-js/event.ts diff --git a/Cargo.lock b/Cargo.lock index 5fb1c522..d5c3a540 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -376,7 +376,7 @@ checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -398,7 +398,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -415,7 +415,7 @@ checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -1196,7 +1196,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -1213,14 +1213,14 @@ checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] name = "darling" -version = "0.14.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" +checksum = "0558d22a7b463ed0241e993f76f09f30b126687447751a8638587b864e4b3944" dependencies = [ "darling_core", "darling_macro", @@ -1228,27 +1228,27 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" +checksum = "ab8bfa2e259f8ee1ce5e97824a3c55ec4404a0d772ca7fa96bf19f0752a046eb" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] name = "darling_macro" -version = "0.14.4" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" +checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -1449,7 +1449,7 @@ checksum = "5e9a1f9f7d83e59740248a6e14ecf93929ade55027844dfcea78beafccc15745" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -1693,7 +1693,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -3361,7 +3361,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -3834,9 +3834,9 @@ checksum = "dc375e1527247fe1a97d8b7156678dfe7c1af2fc075c9a4db3690ecd2a148068" [[package]] name = "proc-macro2" -version = "1.0.56" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" +checksum = "dec2b086b7a862cf4de201096214fa870344cf922b2b30c167badb3af3195406" dependencies = [ "unicode-ident", ] @@ -3867,9 +3867,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.26" +version = "1.0.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc" +checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" dependencies = [ "proc-macro2", ] @@ -4361,7 +4361,7 @@ checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -4383,7 +4383,7 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -4409,11 +4409,11 @@ dependencies = [ [[package]] name = "serde_with" -version = "2.3.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331bb8c3bf9b92457ab7abecf07078c13f7d270ba490103e84e8b014490cd0b0" +checksum = "9f02d8aa6e3c385bf084924f660ce2a3a6bd333ba55b35e8590b321f35d88513" dependencies = [ - "base64 0.13.1", + "base64 0.21.0", "chrono", "hex", "indexmap", @@ -4425,14 +4425,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "2.3.2" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859011bddcc11f289f07f467cc1fe01c7a941daa4d8f6c40d4d1c92eb6d9319c" +checksum = "edc7d5d3932fb12ce722ee5e64dd38c504efba37567f0c402f6ca728c3b8b070" dependencies = [ "darling", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.18", ] [[package]] @@ -4902,9 +4902,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.13" +version = "2.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec" +checksum = "32d41677bcbe24c20c52e7c70b0d8db04134c5d1066bf98662e2871ad200ea3e" dependencies = [ "proc-macro2", "quote", @@ -5007,9 +5007,9 @@ dependencies = [ [[package]] name = "tauri" -version = "2.0.0-alpha.9" +version = "2.0.0-alpha.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695b6c1cdf861002bc2ea17a53cf0669e62da5def6ffcbff02fa00c7515d40b4" +checksum = "2e18377a75e314aa1d476896af881ed63f57a78ca84889fe63e69067f0de158d" dependencies = [ "anyhow", "bytes 1.4.0", @@ -5058,9 +5058,9 @@ dependencies = [ [[package]] name = "tauri-build" -version = "2.0.0-alpha.5" +version = "2.0.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34a5b16abedfa53fdb6ad4c68c41612e097dbfac1c18390fe6e4ded18d9ec28d" +checksum = "a52990870fd043f1d3bd6719ae713ef2e0c50431334d7249f6ae8509d1b8c326" dependencies = [ "anyhow", "cargo_toml", @@ -5079,9 +5079,9 @@ dependencies = [ [[package]] name = "tauri-codegen" -version = "2.0.0-alpha.5" +version = "2.0.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f03863ab7ecf1fea3a748c4a9ace7b0a6a2051b4ce10ae954ec546957fb529" +checksum = "5c1f1611ab0896f2693163ba4e8f3e39c02a1b70cdca4314286b5e365a5e08c6" dependencies = [ "base64 0.21.0", "brotli", @@ -5105,9 +5105,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "2.0.0-alpha.5" +version = "2.0.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74f9a2623fed6b5bc04f2e1344c88df6415617bd223599c60a4171630b63fb74" +checksum = "22752425c6dd6f3a058f376db7371f1d5bac250e340d40ba6c97ecf7182eef29" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -5491,9 +5491,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.13.0-alpha.5" +version = "0.13.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de05147581dd8cfdac638455029eb06c57fa64eb17eb03d5d7f229c571941cd9" +checksum = "d7ce19f1309299bbc38ee9236307fad4943bd8fb09dd3fea5e9dd93c1d0898d6" dependencies = [ "gtk", "http", @@ -5512,9 +5512,9 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.13.0-alpha.5" +version = "0.13.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7784048ef49a57ff32d55bf4ce89ec72fc97e3d4fdc68785d164b23965170e49" +checksum = "1231be42085f3a8b150e615601f8a070bd16bf579771a5dafe2931970a05b518" dependencies = [ "cocoa", "gtk", @@ -5533,13 +5533,14 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "2.0.0-alpha.5" +version = "2.0.0-alpha.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58eca5e3b6714c6bd87052182ebb7d5392d551f478f994878f136f49d4e6d640" +checksum = "2e2812e0cdfffb892c654555b2f1b8c84a035b4c56eb1646cb3eb5a9d8164d8e" dependencies = [ "aes-gcm 0.10.1", "brotli", "ctor", + "dunce", "getrandom 0.2.9", "glob", "heck 0.4.1", @@ -5639,7 +5640,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] @@ -7014,7 +7015,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.13", + "syn 2.0.18", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 7d05f86c..fce72255 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,8 +5,8 @@ resolver = "2" [workspace.dependencies] serde = { version = "1", features = ["derive"] } log = "0.4" -tauri = "2.0.0-alpha.9" -tauri-build = "2.0.0-alpha.5" +tauri = "2.0.0-alpha.10" +tauri-build = "2.0.0-alpha.6" serde_json = "1" thiserror = "1" diff --git a/examples/api/package.json b/examples/api/package.json index 74272660..9700ab0e 100644 --- a/examples/api/package.json +++ b/examples/api/package.json @@ -9,7 +9,7 @@ "serve": "vite preview" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4", + "@tauri-apps/api": "2.0.0-alpha.5", "@zerodevx/svelte-json-view": "0.2.1", "@tauri-apps/plugin-app": "2.0.0-alpha.0", "@tauri-apps/plugin-cli": "2.0.0-alpha.0", @@ -29,10 +29,10 @@ "@iconify-json/codicon": "^1.1.10", "@iconify-json/ph": "^1.1.1", "@sveltejs/vite-plugin-svelte": "^1.0.1", - "@tauri-apps/cli": "2.0.0-alpha.9", + "@tauri-apps/cli": "2.0.0-alpha.10", "internal-ip": "^7.0.0", "svelte": "^3.49.0", "unocss": "^0.39.3", "vite": "^3.0.9" } -} +} \ No newline at end of file diff --git a/plugins/app/package.json b/plugins/app/package.json index f875fdb0..614bb424 100644 --- a/plugins/app/package.json +++ b/plugins/app/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/authenticator/package.json b/plugins/authenticator/package.json index 08c5a25a..1231dda9 100644 --- a/plugins/authenticator/package.json +++ b/plugins/authenticator/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/autostart/package.json b/plugins/autostart/package.json index 5557933d..116c00a9 100644 --- a/plugins/autostart/package.json +++ b/plugins/autostart/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/cli/package.json b/plugins/cli/package.json index c47c63e4..524ec278 100644 --- a/plugins/cli/package.json +++ b/plugins/cli/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/clipboard-manager/package.json b/plugins/clipboard-manager/package.json index 0121be50..e3d84db9 100644 --- a/plugins/clipboard-manager/package.json +++ b/plugins/clipboard-manager/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/dialog/package.json b/plugins/dialog/package.json index 5d83f64d..9c947901 100644 --- a/plugins/dialog/package.json +++ b/plugins/dialog/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/fs/package.json b/plugins/fs/package.json index 071c6f1a..1136bf80 100644 --- a/plugins/fs/package.json +++ b/plugins/fs/package.json @@ -28,6 +28,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/fs/src/api-iife.js b/plugins/fs/src/api-iife.js index c87b63b8..64aae16a 100644 --- a/plugins/fs/src/api-iife.js +++ b/plugins/fs/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_FS__=function(e){"use strict";var t=Object.defineProperty,n=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},r=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},i=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e));function o(e,t=!1){let n=window.crypto.getRandomValues(new Uint32Array(1))[0],r=`_${n}`;return Object.defineProperty(window,r,{value:n=>(t&&Reflect.deleteProperty(window,r),e?.(n)),writable:!1,configurable:!0}),n}n({},{Channel:()=>c,PluginListener:()=>s,addPluginListener:()=>u,convertFileSrc:()=>l,invoke:()=>p,transformCallback:()=>o});var a,c=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((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)})(this,a,(()=>{})),this.id=o((e=>{i(this,a).call(this,e)}))}set onmessage(e){((e,t,n,i)=>{r(e,t,"write to private field"),i?i.call(e,n):t.set(e,n)})(this,a,e)}get onmessage(){return i(this,a)}toJSON(){return`__CHANNEL__:${this.id}`}};a=new WeakMap;var s=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return p(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,t,n){let r=new c;return r.onmessage=n,p(`plugin:${e}|register_listener`,{event:t,handler:r}).then((()=>new s(e,t,r.id)))}async function p(e,t={}){return new Promise(((n,r)=>{let i=o((e=>{n(e),Reflect.deleteProperty(window,`_${a}`)}),!0),a=o((e=>{r(e),Reflect.deleteProperty(window,`_${i}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:i,error:a,...t})}))}function l(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}function d(){return navigator.appVersion.includes("Win")}n({},{BaseDirectory:()=>y,appCacheDir:()=>g,appConfigDir:()=>f,appDataDir:()=>h,appLocalDataDir:()=>w,appLogDir:()=>x,audioDir:()=>v,basename:()=>H,cacheDir:()=>m,configDir:()=>A,dataDir:()=>D,delimiter:()=>$,desktopDir:()=>I,dirname:()=>M,documentDir:()=>R,downloadDir:()=>b,executableDir:()=>T,extname:()=>S,fontDir:()=>U,homeDir:()=>E,isAbsolute:()=>W,join:()=>B,localDataDir:()=>O,normalize:()=>z,pictureDir:()=>C,publicDir:()=>N,resolve:()=>k,resolveResource:()=>V,resourceDir:()=>P,runtimeDir:()=>j,sep:()=>L,templateDir:()=>F,videoDir:()=>K});var _,y=((_=y||{})[_.Audio=1]="Audio",_[_.Cache=2]="Cache",_[_.Config=3]="Config",_[_.Data=4]="Data",_[_.LocalData=5]="LocalData",_[_.Document=6]="Document",_[_.Download=7]="Download",_[_.Picture=8]="Picture",_[_.Public=9]="Public",_[_.Video=10]="Video",_[_.Resource=11]="Resource",_[_.Temp=12]="Temp",_[_.AppConfig=13]="AppConfig",_[_.AppData=14]="AppData",_[_.AppLocalData=15]="AppLocalData",_[_.AppCache=16]="AppCache",_[_.AppLog=17]="AppLog",_[_.Desktop=18]="Desktop",_[_.Executable=19]="Executable",_[_.Font=20]="Font",_[_.Home=21]="Home",_[_.Runtime=22]="Runtime",_[_.Template=23]="Template",_);async function f(){return p("plugin:path|resolve_directory",{directory:13})}async function h(){return p("plugin:path|resolve_directory",{directory:14})}async function w(){return p("plugin:path|resolve_directory",{directory:15})}async function g(){return p("plugin:path|resolve_directory",{directory:16})}async function v(){return p("plugin:path|resolve_directory",{directory:1})}async function m(){return p("plugin:path|resolve_directory",{directory:2})}async function A(){return p("plugin:path|resolve_directory",{directory:3})}async function D(){return p("plugin:path|resolve_directory",{directory:4})}async function I(){return p("plugin:path|resolve_directory",{directory:18})}async function R(){return p("plugin:path|resolve_directory",{directory:6})}async function b(){return p("plugin:path|resolve_directory",{directory:7})}async function T(){return p("plugin:path|resolve_directory",{directory:19})}async function U(){return p("plugin:path|resolve_directory",{directory:20})}async function E(){return p("plugin:path|resolve_directory",{directory:21})}async function O(){return p("plugin:path|resolve_directory",{directory:5})}async function C(){return p("plugin:path|resolve_directory",{directory:8})}async function N(){return p("plugin:path|resolve_directory",{directory:9})}async function P(){return p("plugin:path|resolve_directory",{directory:11})}async function V(e){return p("plugin:path|resolve_directory",{directory:11,path:e})}async function j(){return p("plugin:path|resolve_directory",{directory:22})}async function F(){return p("plugin:path|resolve_directory",{directory:23})}async function K(){return p("plugin:path|resolve_directory",{directory:10})}async function x(){return p("plugin:path|resolve_directory",{directory:17})}var L=d()?"\\":"/",$=d()?";":":";async function k(...e){return p("plugin:path|resolve",{paths:e})}async function z(e){return p("plugin:path|normalize",{path:e})}async function B(...e){return p("plugin:path|join",{paths:e})}async function M(e){return p("plugin:path|dirname",{path:e})}async function S(e){return p("plugin:path|extname",{path:e})}async function H(e,t){return p("plugin:path|basename",{path:e,ext:t})}async function W(e){return p("plugin:path|isAbsolute",{path:e})}async function J(e,t,n){"object"==typeof n&&Object.freeze(n),"object"==typeof e&&Object.freeze(e);const r={path:"",contents:""};let i=n;return"string"==typeof e?r.path=e:(r.path=e.path,r.contents=e.contents),"string"==typeof t?r.contents=null!=t?t:"":i=t,await window.__TAURI_INVOKE__("plugin:fs|write_file",{path:r.path,contents:Array.from((new TextEncoder).encode(r.contents)),options:i})}return e.BaseDirectory=y,e.Dir=y,e.copyFile=async function(e,t,n={}){return await window.__TAURI_INVOKE__("plugin:fs|copy_file",{source:e,destination:t,options:n})},e.createDir=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|create_dir",{path:e,options:t})},e.exists=async function(e){return await window.__TAURI_INVOKE__("plugin:fs|exists",{path:e})},e.metadata=async function(e){return await window.__TAURI_INVOKE__("plugin:fs|metadata",{path:e}).then((e=>{const{accessedAtMs:t,createdAtMs:n,modifiedAtMs:r,...i}=e;return{accessedAt:new Date(t),createdAt:new Date(n),modifiedAt:new Date(r),...i}}))},e.readBinaryFile=async function(e,t={}){const n=await window.__TAURI_INVOKE__("plugin:fs|read_file",{path:e,options:t});return Uint8Array.from(n)},e.readDir=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|read_dir",{path:e,options:t})},e.readTextFile=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|read_text_file",{path:e,options:t})},e.removeDir=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|remove_dir",{path:e,options:t})},e.removeFile=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|remove_file",{path:e,options:t})},e.renameFile=async function(e,t,n={}){return await window.__TAURI_INVOKE__("plugin:fs|rename_file",{oldPath:e,newPath:t,options:n})},e.writeBinaryFile=async function(e,t,n){"object"==typeof n&&Object.freeze(n),"object"==typeof e&&Object.freeze(e);const r={path:"",contents:[]};let i=n;return"string"==typeof e?r.path=e:(r.path=e.path,r.contents=e.contents),t&&"dir"in t?i=t:"string"==typeof e&&(r.contents=null!=t?t:[]),await window.__TAURI_INVOKE__("plugin:fs|write_binary_file",{path:r.path,contents:Array.from(r.contents instanceof ArrayBuffer?new Uint8Array(r.contents):r.contents),options:i})},e.writeFile=J,e.writeTextFile=J,e}({});Object.defineProperty(window.__TAURI__,"fs",{value:__TAURI_FS__})} +if("__TAURI__"in window){var __TAURI_FS__=function(e){"use strict";var t=Object.defineProperty,n=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},r=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},i=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),o=(e,t,n,i)=>(r(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);function a(e,t=!1){let n=window.crypto.getRandomValues(new Uint32Array(1))[0],r=`_${n}`;return Object.defineProperty(window,r,{value:n=>(t&&Reflect.deleteProperty(window,r),e?.(n)),writable:!1,configurable:!0}),n}n({},{Channel:()=>s,PluginListener:()=>u,addPluginListener:()=>p,convertFileSrc:()=>_,invoke:()=>l,transformCallback:()=>a});var c,s=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((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)})(this,c,(()=>{})),this.id=a((e=>{i(this,c).call(this,e)}))}set onmessage(e){o(this,c,e)}get onmessage(){return i(this,c)}toJSON(){return`__CHANNEL__:${this.id}`}};c=new WeakMap;var u=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return l(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function p(e,t,n){let r=new s;return r.onmessage=n,l(`plugin:${e}|register_listener`,{event:t,handler:r}).then((()=>new u(e,t,r.id)))}async function l(e,t={}){return new Promise(((n,r)=>{let i=a((e=>{n(e),Reflect.deleteProperty(window,`_${o}`)}),!0),o=a((e=>{r(e),Reflect.deleteProperty(window,`_${i}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:i,error:o,...t})}))}function _(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}n({},{BaseDirectory:()=>y,appCacheDir:()=>g,appConfigDir:()=>f,appDataDir:()=>h,appLocalDataDir:()=>w,appLogDir:()=>x,audioDir:()=>m,basename:()=>W,cacheDir:()=>v,configDir:()=>A,dataDir:()=>D,delimiter:()=>k,desktopDir:()=>I,dirname:()=>S,documentDir:()=>R,downloadDir:()=>T,executableDir:()=>b,extname:()=>H,fontDir:()=>U,homeDir:()=>E,isAbsolute:()=>J,join:()=>M,localDataDir:()=>O,normalize:()=>B,pictureDir:()=>C,publicDir:()=>N,resolve:()=>z,resolveResource:()=>V,resourceDir:()=>P,runtimeDir:()=>j,sep:()=>$,tempDir:()=>L,templateDir:()=>F,videoDir:()=>K});var d,y=((d=y||{})[d.Audio=1]="Audio",d[d.Cache=2]="Cache",d[d.Config=3]="Config",d[d.Data=4]="Data",d[d.LocalData=5]="LocalData",d[d.Document=6]="Document",d[d.Download=7]="Download",d[d.Picture=8]="Picture",d[d.Public=9]="Public",d[d.Video=10]="Video",d[d.Resource=11]="Resource",d[d.Temp=12]="Temp",d[d.AppConfig=13]="AppConfig",d[d.AppData=14]="AppData",d[d.AppLocalData=15]="AppLocalData",d[d.AppCache=16]="AppCache",d[d.AppLog=17]="AppLog",d[d.Desktop=18]="Desktop",d[d.Executable=19]="Executable",d[d.Font=20]="Font",d[d.Home=21]="Home",d[d.Runtime=22]="Runtime",d[d.Template=23]="Template",d);async function f(){return l("plugin:path|resolve_directory",{directory:13})}async function h(){return l("plugin:path|resolve_directory",{directory:14})}async function w(){return l("plugin:path|resolve_directory",{directory:15})}async function g(){return l("plugin:path|resolve_directory",{directory:16})}async function m(){return l("plugin:path|resolve_directory",{directory:1})}async function v(){return l("plugin:path|resolve_directory",{directory:2})}async function A(){return l("plugin:path|resolve_directory",{directory:3})}async function D(){return l("plugin:path|resolve_directory",{directory:4})}async function I(){return l("plugin:path|resolve_directory",{directory:18})}async function R(){return l("plugin:path|resolve_directory",{directory:6})}async function T(){return l("plugin:path|resolve_directory",{directory:7})}async function b(){return l("plugin:path|resolve_directory",{directory:19})}async function U(){return l("plugin:path|resolve_directory",{directory:20})}async function E(){return l("plugin:path|resolve_directory",{directory:21})}async function O(){return l("plugin:path|resolve_directory",{directory:5})}async function C(){return l("plugin:path|resolve_directory",{directory:8})}async function N(){return l("plugin:path|resolve_directory",{directory:9})}async function P(){return l("plugin:path|resolve_directory",{directory:11})}async function V(e){return l("plugin:path|resolve_directory",{directory:11,path:e})}async function j(){return l("plugin:path|resolve_directory",{directory:22})}async function F(){return l("plugin:path|resolve_directory",{directory:23})}async function K(){return l("plugin:path|resolve_directory",{directory:10})}async function x(){return l("plugin:path|resolve_directory",{directory:17})}async function L(e){return l("plugin:path|resolve_directory",{directory:12})}function $(){return window.__TAURI__.path.__sep}function k(){return window.__TAURI__.path.__delimiter}async function z(...e){return l("plugin:path|resolve",{paths:e})}async function B(e){return l("plugin:path|normalize",{path:e})}async function M(...e){return l("plugin:path|join",{paths:e})}async function S(e){return l("plugin:path|dirname",{path:e})}async function H(e){return l("plugin:path|extname",{path:e})}async function W(e,t){return l("plugin:path|basename",{path:e,ext:t})}async function J(e){return l("plugin:path|isAbsolute",{path:e})}async function q(e,t,n){"object"==typeof n&&Object.freeze(n),"object"==typeof e&&Object.freeze(e);const r={path:"",contents:""};let i=n;return"string"==typeof e?r.path=e:(r.path=e.path,r.contents=e.contents),"string"==typeof t?r.contents=null!=t?t:"":i=t,await window.__TAURI_INVOKE__("plugin:fs|write_file",{path:r.path,contents:Array.from((new TextEncoder).encode(r.contents)),options:i})}return e.BaseDirectory=y,e.Dir=y,e.copyFile=async function(e,t,n={}){return await window.__TAURI_INVOKE__("plugin:fs|copy_file",{source:e,destination:t,options:n})},e.createDir=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|create_dir",{path:e,options:t})},e.exists=async function(e){return await window.__TAURI_INVOKE__("plugin:fs|exists",{path:e})},e.metadata=async function(e){return await window.__TAURI_INVOKE__("plugin:fs|metadata",{path:e}).then((e=>{const{accessedAtMs:t,createdAtMs:n,modifiedAtMs:r,...i}=e;return{accessedAt:new Date(t),createdAt:new Date(n),modifiedAt:new Date(r),...i}}))},e.readBinaryFile=async function(e,t={}){const n=await window.__TAURI_INVOKE__("plugin:fs|read_file",{path:e,options:t});return Uint8Array.from(n)},e.readDir=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|read_dir",{path:e,options:t})},e.readTextFile=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|read_text_file",{path:e,options:t})},e.removeDir=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|remove_dir",{path:e,options:t})},e.removeFile=async function(e,t={}){return await window.__TAURI_INVOKE__("plugin:fs|remove_file",{path:e,options:t})},e.renameFile=async function(e,t,n={}){return await window.__TAURI_INVOKE__("plugin:fs|rename_file",{oldPath:e,newPath:t,options:n})},e.writeBinaryFile=async function(e,t,n){"object"==typeof n&&Object.freeze(n),"object"==typeof e&&Object.freeze(e);const r={path:"",contents:[]};let i=n;return"string"==typeof e?r.path=e:(r.path=e.path,r.contents=e.contents),t&&"dir"in t?i=t:"string"==typeof e&&(r.contents=null!=t?t:[]),await window.__TAURI_INVOKE__("plugin:fs|write_binary_file",{path:r.path,contents:Array.from(r.contents instanceof ArrayBuffer?new Uint8Array(r.contents):r.contents),options:i})},e.writeFile=q,e.writeTextFile=q,e}({});Object.defineProperty(window.__TAURI__,"fs",{value:__TAURI_FS__})} diff --git a/plugins/global-shortcut/package.json b/plugins/global-shortcut/package.json index 227625c1..6d50bb48 100644 --- a/plugins/global-shortcut/package.json +++ b/plugins/global-shortcut/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/http/package.json b/plugins/http/package.json index d1fe48e2..779cb49c 100644 --- a/plugins/http/package.json +++ b/plugins/http/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/log/package.json b/plugins/log/package.json index 388c7aa6..0ebdafd6 100644 --- a/plugins/log/package.json +++ b/plugins/log/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/log/src/api-iife.js b/plugins/log/src/api-iife.js index 0eb88e8f..e733187f 100644 --- a/plugins/log/src/api-iife.js +++ b/plugins/log/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_LOG__=function(e){"use strict";var n=Object.defineProperty,t=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},r=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},a=(e,n,t)=>(r(e,n,"read from private field"),t?t.call(e):n.get(e)),i=(e,n,t,a)=>(r(e,n,"write to private field"),a?a.call(e,t):n.set(e,t),t);function o(e,n=!1){let t=window.crypto.getRandomValues(new Uint32Array(1))[0],r=`_${t}`;return Object.defineProperty(window,r,{value:t=>(n&&Reflect.deleteProperty(window,r),e?.(t)),writable:!1,configurable:!0}),t}t({},{Channel:()=>c,PluginListener:()=>s,addPluginListener:()=>u,convertFileSrc:()=>_,invoke:()=>d,transformCallback:()=>o});var l,c=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,l,(()=>{})),this.id=o((e=>{a(this,l).call(this,e)}))}set onmessage(e){i(this,l,e)}get onmessage(){return a(this,l)}toJSON(){return`__CHANNEL__:${this.id}`}};l=new WeakMap;var s=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return d(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,n,t){let r=new c;return r.onmessage=t,d(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new s(e,n,r.id)))}async function d(e,n={}){return new Promise(((t,r)=>{let a=o((e=>{t(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=o((e=>{r(e),Reflect.deleteProperty(window,`_${a}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:a,error:i,...n})}))}function _(e,n="asset"){let t=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${n}.localhost/${t}`:`${n}://localhost/${t}`}async function w(e,n){await d("plugin:event|unlisten",{event:e,eventId:n})}async function f(e,n,t){return d("plugin:event|listen",{event:e,windowLabel:n,handler:o(t)}).then((n=>async()=>w(e,n)))}t({},{TauriEvent:()=>h,emit:()=>I,listen:()=>E,once:()=>y});var v,g,h=((v=h||{}).WINDOW_RESIZED="tauri://resize",v.WINDOW_MOVED="tauri://move",v.WINDOW_CLOSE_REQUESTED="tauri://close-requested",v.WINDOW_CREATED="tauri://window-created",v.WINDOW_DESTROYED="tauri://destroyed",v.WINDOW_FOCUS="tauri://focus",v.WINDOW_BLUR="tauri://blur",v.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",v.WINDOW_THEME_CHANGED="tauri://theme-changed",v.WINDOW_FILE_DROP="tauri://file-drop",v.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",v.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",v.MENU="tauri://menu",v);async function E(e,n){return f(e,null,n)}async function y(e,n){return async function(e,n,t){return f(e,n,(n=>{t(n),w(e,n.id).catch((()=>{}))}))}(e,null,n)}async function I(e,n){return async function(e,n,t){await d("plugin:event|emit",{event:e,windowLabel:n,payload:t})}(e,void 0,n)}async function p(e,n,t){var r,a;const i=null===(r=(new Error).stack)||void 0===r?void 0:r.split("\n").map((e=>e.split("@"))),o=null==i?void 0:i.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:l,line:c,keyValues:s}=null!=t?t:{};let u=null===(a=null==o?void 0:o[0])||void 0===a?void 0:a.filter((e=>e.length>0)).join("@");"Error"===u&&(u="webview::unknown"),await window.__TAURI_INVOKE__("plugin:log|log",{level:e,message:n,location:u,file:l,line:c,keyValues:s})}return function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(g||(g={})),e.attachConsole=async function(){return await E("log://log",(e=>{const n=e.payload,t=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case g.Trace:console.log(t);break;case g.Debug:console.debug(t);break;case g.Info:console.info(t);break;case g.Warn:console.warn(t);break;case g.Error:console.error(t);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await p(g.Debug,e,n)},e.error=async function(e,n){await p(g.Error,e,n)},e.info=async function(e,n){await p(g.Info,e,n)},e.trace=async function(e,n){await p(g.Trace,e,n)},e.warn=async function(e,n){await p(g.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_LOG__})} +if("__TAURI__"in window){var __TAURI_LOG__=function(e){"use strict";var n=Object.defineProperty,t=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},r=(e,n,t)=>{if(!n.has(e))throw TypeError("Cannot "+t)},a=(e,n,t)=>(r(e,n,"read from private field"),t?t.call(e):n.get(e)),i=(e,n,t,a)=>(r(e,n,"write to private field"),a?a.call(e,t):n.set(e,t),t);function o(e,n=!1){let t=window.crypto.getRandomValues(new Uint32Array(1))[0],r=`_${t}`;return Object.defineProperty(window,r,{value:t=>(n&&Reflect.deleteProperty(window,r),e?.(t)),writable:!1,configurable:!0}),t}t({},{Channel:()=>c,PluginListener:()=>s,addPluginListener:()=>u,convertFileSrc:()=>d,invoke:()=>_,transformCallback:()=>o});var l,c=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,t)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,t)})(this,l,(()=>{})),this.id=o((e=>{a(this,l).call(this,e)}))}set onmessage(e){i(this,l,e)}get onmessage(){return a(this,l)}toJSON(){return`__CHANNEL__:${this.id}`}};l=new WeakMap;var s=class{constructor(e,n,t){this.plugin=e,this.event=n,this.channelId=t}async unregister(){return _(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,n,t){let r=new c;return r.onmessage=t,_(`plugin:${e}|register_listener`,{event:n,handler:r}).then((()=>new s(e,n,r.id)))}async function _(e,n={}){return new Promise(((t,r)=>{let a=o((e=>{t(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=o((e=>{r(e),Reflect.deleteProperty(window,`_${a}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:a,error:i,...n})}))}function d(e,n="asset"){let t=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${n}.localhost/${t}`:`${n}://localhost/${t}`}t({},{TauriEvent:()=>f,emit:()=>E,listen:()=>v,once:()=>h});var w,f=(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))(f||{});async function g(e,n){await _("plugin:event|unlisten",{event:e,eventId:n})}async function v(e,n,t){return _("plugin:event|listen",{event:e,windowLabel:t?.target,handler:o(n)}).then((n=>async()=>g(e,n)))}async function h(e,n,t){return v(e,(t=>{n(t),g(e,t.id).catch((()=>{}))}),t)}async function E(e,n,t){await _("plugin:event|emit",{event:e,windowLabel:t?.target,payload:n})}async function I(e,n,t){var r,a;const i=null===(r=(new Error).stack)||void 0===r?void 0:r.split("\n").map((e=>e.split("@"))),o=null==i?void 0:i.filter((([e,n])=>e.length>0&&"[native code]"!==n)),{file:l,line:c,keyValues:s}=null!=t?t:{};let u=null===(a=null==o?void 0:o[0])||void 0===a?void 0:a.filter((e=>e.length>0)).join("@");"Error"===u&&(u="webview::unknown"),await window.__TAURI_INVOKE__("plugin:log|log",{level:e,message:n,location:u,file:l,line:c,keyValues:s})}return function(e){e[e.Trace=1]="Trace",e[e.Debug=2]="Debug",e[e.Info=3]="Info",e[e.Warn=4]="Warn",e[e.Error=5]="Error"}(w||(w={})),e.attachConsole=async function(){return await v("log://log",(e=>{const n=e.payload,t=n.message.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,"");switch(n.level){case w.Trace:console.log(t);break;case w.Debug:console.debug(t);break;case w.Info:console.info(t);break;case w.Warn:console.warn(t);break;case w.Error:console.error(t);break;default:throw new Error(`unknown log level ${n.level}`)}}))},e.debug=async function(e,n){await I(w.Debug,e,n)},e.error=async function(e,n){await I(w.Error,e,n)},e.info=async function(e,n){await I(w.Info,e,n)},e.trace=async function(e,n){await I(w.Trace,e,n)},e.warn=async function(e,n){await I(w.Warn,e,n)},e}({});Object.defineProperty(window.__TAURI__,"log",{value:__TAURI_LOG__})} diff --git a/plugins/notification/package.json b/plugins/notification/package.json index 1b18b55c..3c000af5 100644 --- a/plugins/notification/package.json +++ b/plugins/notification/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/os/package.json b/plugins/os/package.json index e2aae9c2..8b530cce 100644 --- a/plugins/os/package.json +++ b/plugins/os/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/positioner/package.json b/plugins/positioner/package.json index 2f064127..6b757d08 100644 --- a/plugins/positioner/package.json +++ b/plugins/positioner/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/process/package.json b/plugins/process/package.json index d5517cf3..c35e4679 100644 --- a/plugins/process/package.json +++ b/plugins/process/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/shell/package.json b/plugins/shell/package.json index 79d2c0c1..891d8825 100644 --- a/plugins/shell/package.json +++ b/plugins/shell/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/single-instance/examples/vanilla/package.json b/plugins/single-instance/examples/vanilla/package.json index 750f083e..945a0dfd 100644 --- a/plugins/single-instance/examples/vanilla/package.json +++ b/plugins/single-instance/examples/vanilla/package.json @@ -9,6 +9,6 @@ "author": "", "license": "MIT", "devDependencies": { - "@tauri-apps/cli": "^2.0.0-alpha.9" + "@tauri-apps/cli": "2.0.0-alpha.10" } -} +} \ No newline at end of file diff --git a/plugins/sql/package.json b/plugins/sql/package.json index faea80a8..bdf4457b 100644 --- a/plugins/sql/package.json +++ b/plugins/sql/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/store/package.json b/plugins/store/package.json index 9bfaabe1..929be8ab 100644 --- a/plugins/store/package.json +++ b/plugins/store/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/store/src/api-iife.js b/plugins/store/src/api-iife.js index df38427d..9e7f497b 100644 --- a/plugins/store/src/api-iife.js +++ b/plugins/store/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_STORE__=function(e){"use strict";var t=Object.defineProperty,n=(e,n)=>{for(var a in n)t(e,a,{get:n[a],enumerable:!0})},a=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},r=(e,t,n)=>(a(e,t,"read from private field"),n?n.call(e):t.get(e)),i=(e,t,n,r)=>(a(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function s(e,t=!1){let n=window.crypto.getRandomValues(new Uint32Array(1))[0],a=`_${n}`;return Object.defineProperty(window,a,{value:n=>(t&&Reflect.deleteProperty(window,a),e?.(n)),writable:!1,configurable:!0}),n}n({},{Channel:()=>o,PluginListener:()=>l,addPluginListener:()=>u,convertFileSrc:()=>h,invoke:()=>c,transformCallback:()=>s});var _,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((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)})(this,_,(()=>{})),this.id=s((e=>{r(this,_).call(this,e)}))}set onmessage(e){i(this,_,e)}get onmessage(){return r(this,_)}toJSON(){return`__CHANNEL__:${this.id}`}};_=new WeakMap;var l=class{constructor(e,t,n){this.plugin=e,this.event=t,this.channelId=n}async unregister(){return c(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,t,n){let a=new o;return a.onmessage=n,c(`plugin:${e}|register_listener`,{event:t,handler:a}).then((()=>new l(e,t,a.id)))}async function c(e,t={}){return new Promise(((n,a)=>{let r=s((e=>{n(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=s((e=>{a(e),Reflect.deleteProperty(window,`_${r}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:r,error:i,...t})}))}function h(e,t="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${n}`:`${t}://localhost/${n}`}async function d(e,t){await c("plugin:event|unlisten",{event:e,eventId:t})}async function p(e,t,n){return c("plugin:event|listen",{event:e,windowLabel:t,handler:s(n)}).then((t=>async()=>d(e,t)))}n({},{TauriEvent:()=>y,emit:()=>E,listen:()=>I,once:()=>g});var w,y=((w=y||{}).WINDOW_RESIZED="tauri://resize",w.WINDOW_MOVED="tauri://move",w.WINDOW_CLOSE_REQUESTED="tauri://close-requested",w.WINDOW_CREATED="tauri://window-created",w.WINDOW_DESTROYED="tauri://destroyed",w.WINDOW_FOCUS="tauri://focus",w.WINDOW_BLUR="tauri://blur",w.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",w.WINDOW_THEME_CHANGED="tauri://theme-changed",w.WINDOW_FILE_DROP="tauri://file-drop",w.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",w.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",w.MENU="tauri://menu",w);async function I(e,t){return p(e,null,t)}async function g(e,t){return async function(e,t,n){return p(e,t,(t=>{n(t),d(e,t.id).catch((()=>{}))}))}(e,null,t)}async function E(e,t){return async function(e,t,n){await c("plugin:event|emit",{event:e,windowLabel:t,payload:n})}(e,void 0,t)}return e.Store=class{constructor(e){this.path=e}async set(e,t){return await window.__TAURI_INVOKE__("plugin:store|set",{path:this.path,key:e,value:t})}async get(e){return await window.__TAURI_INVOKE__("plugin:store|get",{path:this.path,key:e})}async has(e){return await window.__TAURI_INVOKE__("plugin:store|has",{path:this.path,key:e})}async delete(e){return await window.__TAURI_INVOKE__("plugin:store|delete",{path:this.path,key:e})}async clear(){return await window.__TAURI_INVOKE__("plugin:store|clear",{path:this.path})}async reset(){return await window.__TAURI_INVOKE__("plugin:store|reset",{path:this.path})}async keys(){return await window.__TAURI_INVOKE__("plugin:store|keys",{path:this.path})}async values(){return await window.__TAURI_INVOKE__("plugin:store|values",{path:this.path})}async entries(){return await window.__TAURI_INVOKE__("plugin:store|entries",{path:this.path})}async length(){return await window.__TAURI_INVOKE__("plugin:store|length",{path:this.path})}async load(){return await window.__TAURI_INVOKE__("plugin:store|load",{path:this.path})}async save(){return await window.__TAURI_INVOKE__("plugin:store|save",{path:this.path})}async onKeyChange(e,t){return await I("store://change",(n=>{n.payload.path===this.path&&n.payload.key===e&&t(n.payload.value)}))}async onChange(e){return await I("store://change",(t=>{t.payload.path===this.path&&e(t.payload.key,t.payload.value)}))}},e}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_STORE__})} +if("__TAURI__"in window){var __TAURI_STORE__=function(e){"use strict";var t=Object.defineProperty,a=(e,a)=>{for(var n in a)t(e,n,{get:a[n],enumerable:!0})},n=(e,t,a)=>{if(!t.has(e))throw TypeError("Cannot "+a)},r=(e,t,a)=>(n(e,t,"read from private field"),a?a.call(e):t.get(e)),i=(e,t,a,r)=>(n(e,t,"write to private field"),r?r.call(e,a):t.set(e,a),a);function s(e,t=!1){let a=window.crypto.getRandomValues(new Uint32Array(1))[0],n=`_${a}`;return Object.defineProperty(window,n,{value:a=>(t&&Reflect.deleteProperty(window,n),e?.(a)),writable:!1,configurable:!0}),a}a({},{Channel:()=>o,PluginListener:()=>l,addPluginListener:()=>u,convertFileSrc:()=>c,invoke:()=>h,transformCallback:()=>s});var _,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,t,a)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,a)})(this,_,(()=>{})),this.id=s((e=>{r(this,_).call(this,e)}))}set onmessage(e){i(this,_,e)}get onmessage(){return r(this,_)}toJSON(){return`__CHANNEL__:${this.id}`}};_=new WeakMap;var l=class{constructor(e,t,a){this.plugin=e,this.event=t,this.channelId=a}async unregister(){return h(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function u(e,t,a){let n=new o;return n.onmessage=a,h(`plugin:${e}|register_listener`,{event:t,handler:n}).then((()=>new l(e,t,n.id)))}async function h(e,t={}){return new Promise(((a,n)=>{let r=s((e=>{a(e),Reflect.deleteProperty(window,`_${i}`)}),!0),i=s((e=>{n(e),Reflect.deleteProperty(window,`_${r}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:r,error:i,...t})}))}function c(e,t="asset"){let a=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${t}.localhost/${a}`:`${t}://localhost/${a}`}a({},{TauriEvent:()=>d,emit:()=>y,listen:()=>w,once:()=>I});var d=(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))(d||{});async function p(e,t){await h("plugin:event|unlisten",{event:e,eventId:t})}async function w(e,t,a){return h("plugin:event|listen",{event:e,windowLabel:a?.target,handler:s(t)}).then((t=>async()=>p(e,t)))}async function I(e,t,a){return w(e,(a=>{t(a),p(e,a.id).catch((()=>{}))}),a)}async function y(e,t,a){await h("plugin:event|emit",{event:e,windowLabel:a?.target,payload:t})}return e.Store=class{constructor(e){this.path=e}async set(e,t){return await window.__TAURI_INVOKE__("plugin:store|set",{path:this.path,key:e,value:t})}async get(e){return await window.__TAURI_INVOKE__("plugin:store|get",{path:this.path,key:e})}async has(e){return await window.__TAURI_INVOKE__("plugin:store|has",{path:this.path,key:e})}async delete(e){return await window.__TAURI_INVOKE__("plugin:store|delete",{path:this.path,key:e})}async clear(){return await window.__TAURI_INVOKE__("plugin:store|clear",{path:this.path})}async reset(){return await window.__TAURI_INVOKE__("plugin:store|reset",{path:this.path})}async keys(){return await window.__TAURI_INVOKE__("plugin:store|keys",{path:this.path})}async values(){return await window.__TAURI_INVOKE__("plugin:store|values",{path:this.path})}async entries(){return await window.__TAURI_INVOKE__("plugin:store|entries",{path:this.path})}async length(){return await window.__TAURI_INVOKE__("plugin:store|length",{path:this.path})}async load(){return await window.__TAURI_INVOKE__("plugin:store|load",{path:this.path})}async save(){return await window.__TAURI_INVOKE__("plugin:store|save",{path:this.path})}async onKeyChange(e,t){return await w("store://change",(a=>{a.payload.path===this.path&&a.payload.key===e&&t(a.payload.value)}))}async onChange(e){return await w("store://change",(t=>{t.payload.path===this.path&&e(t.payload.key,t.payload.value)}))}},e}({});Object.defineProperty(window.__TAURI__,"store",{value:__TAURI_STORE__})} diff --git a/plugins/stronghold/package.json b/plugins/stronghold/package.json index fcb1364e..8c8a6162 100644 --- a/plugins/stronghold/package.json +++ b/plugins/stronghold/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/updater/package.json b/plugins/updater/package.json index 1117938d..8330f08b 100644 --- a/plugins/updater/package.json +++ b/plugins/updater/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/upload/package.json b/plugins/upload/package.json index 67ecc76d..faec00c5 100644 --- a/plugins/upload/package.json +++ b/plugins/upload/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/websocket/examples/svelte-app/package.json b/plugins/websocket/examples/svelte-app/package.json index 67d63a59..f8811e24 100644 --- a/plugins/websocket/examples/svelte-app/package.json +++ b/plugins/websocket/examples/svelte-app/package.json @@ -13,7 +13,7 @@ "devDependencies": { "@sveltejs/adapter-auto": "^2.0.0", "@sveltejs/kit": "^1.15.5", - "@tauri-apps/cli": "2.0.0-alpha.9", + "@tauri-apps/cli": "2.0.0-alpha.10", "svelte": "^3.58.0", "svelte-check": "^3.2.0", "tslib": "^2.5.0", @@ -24,4 +24,4 @@ "@tauri-apps/plugin-websocket": "link:../../" }, "type": "module" -} +} \ No newline at end of file diff --git a/plugins/websocket/package.json b/plugins/websocket/package.json index 7cc1628b..6a3597c5 100644 --- a/plugins/websocket/package.json +++ b/plugins/websocket/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/window-state/package.json b/plugins/window-state/package.json index 060ae802..fed9522f 100644 --- a/plugins/window-state/package.json +++ b/plugins/window-state/package.json @@ -28,6 +28,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/window/guest-js/event.ts b/plugins/window/guest-js/event.ts deleted file mode 100644 index 9ff16f1d..00000000 --- a/plugins/window/guest-js/event.ts +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright 2019-2023 Tauri Programme within The Commons Conservancy -// SPDX-License-Identifier: Apache-2.0 -// SPDX-License-Identifier: MIT - -declare global { - interface Window { - __TAURI_INVOKE__: (cmd: string, args?: unknown) => Promise; - __TAURI__: { - transformCallback: (cb: (payload: T) => void) => number; - }; - } -} - -export interface Event { - /** Event name */ - event: string; - /** The label of the window that emitted this event. */ - windowLabel: string; - /** Event identifier used to unlisten */ - id: number; - /** Event payload */ - payload: T; -} - -export type EventCallback = (event: Event) => void; - -export type UnlistenFn = () => void; - -/** - * Unregister the event listener associated with the given name and id. - * - * @ignore - * @param event The event name - * @param eventId Event identifier - * @returns - */ -async function _unlisten(event: string, eventId: number): Promise { - await window.__TAURI_INVOKE__("plugin:event|unlisten", { - event, - eventId, - }); -} - -/** - * Emits an event to the backend. - * - * @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. - * @param [windowLabel] The label of the window to which the event is sent, if null/undefined the event will be sent to all windows - * @param [payload] Event payload - * @returns - */ -async function emit( - event: string, - windowLabel?: string, - payload?: unknown -): Promise { - await window.__TAURI_INVOKE__("plugin:event|emit", { - event, - windowLabel, - payload, - }); -} - -/** - * Listen to an event from the backend. - * - * @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. - * @param handler Event handler callback. - * @return A promise resolving to a function to unlisten to the event. - */ -async function listen( - event: string, - windowLabel: string | null, - handler: EventCallback -): Promise { - return window - .__TAURI_INVOKE__("plugin:event|listen", { - event, - windowLabel, - handler: window.__TAURI__.transformCallback(handler), - }) - .then((eventId) => { - return async () => _unlisten(event, eventId); - }); -} - -/** - * Listen to an one-off event from the backend. - * - * @param event Event name. Must include only alphanumeric characters, `-`, `/`, `:` and `_`. - * @param handler Event handler callback. - * @returns A promise resolving to a function to unlisten to the event. - */ -async function once( - event: string, - windowLabel: string | null, - handler: EventCallback -): Promise { - return listen(event, windowLabel, (eventData) => { - handler(eventData); - _unlisten(event, eventData.id).catch(() => { - // do nothing - }); - }); -} - -export { emit, listen, once }; diff --git a/plugins/window/guest-js/index.ts b/plugins/window/guest-js/index.ts index f1ae5e0d..518383b2 100644 --- a/plugins/window/guest-js/index.ts +++ b/plugins/window/guest-js/index.ts @@ -22,9 +22,7 @@ import type { EventCallback, UnlistenFn, } from "@tauri-apps/api/event"; -import { TauriEvent } from "@tauri-apps/api/event"; -// TODO: use from @tauri-apps/api v2 -import { emit, listen, once } from "./event"; +import { TauriEvent, emit, listen, once } from "@tauri-apps/api/event"; declare global { interface Window { @@ -320,7 +318,7 @@ class WebviewWindowHandle { listeners.splice(listeners.indexOf(handler), 1); }); } - return listen(event, this.label, handler); + return listen(event, handler, { target: this.label }); } /** @@ -352,7 +350,7 @@ class WebviewWindowHandle { listeners.splice(listeners.indexOf(handler), 1); }); } - return once(event, this.label, handler); + return once(event, handler, { target: this.label }); } /** @@ -374,7 +372,7 @@ class WebviewWindowHandle { } return Promise.resolve(); } - return emit(event, this.label, payload); + return emit(event, payload, { target: this.label }); } /** @ignore */ diff --git a/plugins/window/package.json b/plugins/window/package.json index 1de59aeb..94d4e014 100644 --- a/plugins/window/package.json +++ b/plugins/window/package.json @@ -27,6 +27,6 @@ "tslib": "^2.5.0" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file diff --git a/plugins/window/src/api-iife.js b/plugins/window/src/api-iife.js index ffa35ae0..2079c27b 100644 --- a/plugins/window/src/api-iife.js +++ b/plugins/window/src/api-iife.js @@ -1 +1 @@ -if("__TAURI__"in window){var __TAURI_WINDOW__=function(e){"use strict";var n=Object.defineProperty,i=(e,i)=>{for(var t in i)n(e,t,{get:i[t],enumerable:!0})},t=(e,n,i)=>{if(!n.has(e))throw TypeError("Cannot "+i)},l=(e,n,i)=>(t(e,n,"read from private field"),i?i.call(e):n.get(e)),a=(e,n,i,l)=>(t(e,n,"write to private field"),l?l.call(e,i):n.set(e,i),i);function s(e,n=!1){let i=window.crypto.getRandomValues(new Uint32Array(1))[0],t=`_${i}`;return Object.defineProperty(window,t,{value:i=>(n&&Reflect.deleteProperty(window,t),e?.(i)),writable:!1,configurable:!0}),i}i({},{Channel:()=>o,PluginListener:()=>_,addPluginListener:()=>w,convertFileSrc:()=>c,invoke:()=>u,transformCallback:()=>s});var r,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,n,i)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,i)})(this,r,(()=>{})),this.id=s((e=>{l(this,r).call(this,e)}))}set onmessage(e){a(this,r,e)}get onmessage(){return l(this,r)}toJSON(){return`__CHANNEL__:${this.id}`}};r=new WeakMap;var _=class{constructor(e,n,i){this.plugin=e,this.event=n,this.channelId=i}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function w(e,n,i){let t=new o;return t.onmessage=i,u(`plugin:${e}|register_listener`,{event:n,handler:t}).then((()=>new _(e,n,t.id)))}async function u(e,n={}){return new Promise(((i,t)=>{let l=s((e=>{i(e),Reflect.deleteProperty(window,`_${a}`)}),!0),a=s((e=>{t(e),Reflect.deleteProperty(window,`_${l}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:l,error:a,...n})}))}function c(e,n="asset"){let i=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${n}.localhost/${i}`:`${n}://localhost/${i}`}async function d(e,n){await u("plugin:event|unlisten",{event:e,eventId:n})}async function h(e,n,i){return u("plugin:event|listen",{event:e,windowLabel:n,handler:s(i)}).then((n=>async()=>d(e,n)))}i({},{TauriEvent:()=>I,emit:()=>E,listen:()=>b,once:()=>g});var p,y,I=((p=I||{}).WINDOW_RESIZED="tauri://resize",p.WINDOW_MOVED="tauri://move",p.WINDOW_CLOSE_REQUESTED="tauri://close-requested",p.WINDOW_CREATED="tauri://window-created",p.WINDOW_DESTROYED="tauri://destroyed",p.WINDOW_FOCUS="tauri://focus",p.WINDOW_BLUR="tauri://blur",p.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",p.WINDOW_THEME_CHANGED="tauri://theme-changed",p.WINDOW_FILE_DROP="tauri://file-drop",p.WINDOW_FILE_DROP_HOVER="tauri://file-drop-hover",p.WINDOW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled",p.MENU="tauri://menu",p);async function b(e,n){return h(e,null,n)}async function g(e,n){return async function(e,n,i){return h(e,n,(n=>{i(n),d(e,n.id).catch((()=>{}))}))}(e,null,n)}async function E(e,n){return async function(e,n,i){await u("plugin:event|emit",{event:e,windowLabel:n,payload:i})}(e,void 0,n)}async function A(e,n){await window.__TAURI_INVOKE__("plugin:event|unlisten",{event:e,eventId:n})}async function O(e,n,i){return window.__TAURI_INVOKE__("plugin:event|listen",{event:e,windowLabel:n,handler:window.__TAURI__.transformCallback(i)}).then((n=>async()=>A(e,n)))}class T{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class R{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new T(this.width/e,this.height/e)}}class v{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class N{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new v(this.x/e,this.y/e)}}function m(){return window.__TAURI_METADATA__.__windows.map((e=>new V(e.label,{skip:!0})))}e.UserAttentionType=void 0,(y=e.UserAttentionType||(e.UserAttentionType={}))[y.Critical=1]="Critical",y[y.Informational=2]="Informational";const U=["tauri://created","tauri://error"];class f{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)})):O(e,this.label,n)}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve((()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)})):async function(e,n,i){return O(e,n,(n=>{i(n),A(e,n.id).catch((()=>{}))}))}(e,this.label,n)}async emit(e,n){if(U.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,windowLabel:this.label,payload:n});return Promise.resolve()}return async function(e,n,i){await window.__TAURI_INVOKE__("plugin:event|emit",{event:e,windowLabel:n,payload:i})}(e,this.label,n)}_handleTauriEvent(e,n){return!!U.includes(e)&&(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0)}}class W extends f{async scaleFactor(){return window.__TAURI_INVOKE__("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return window.__TAURI_INVOKE__("plugin:window|inner_position",{label:this.label}).then((({x:e,y:n})=>new N(e,n)))}async outerPosition(){return window.__TAURI_INVOKE__("plugin:window|outer_position",{label:this.label}).then((({x:e,y:n})=>new N(e,n)))}async innerSize(){return window.__TAURI_INVOKE__("plugin:window|inner_size",{label:this.label}).then((({width:e,height:n})=>new R(e,n)))}async outerSize(){return window.__TAURI_INVOKE__("plugin:window|outer_size",{label:this.label}).then((({width:e,height:n})=>new R(e,n)))}async isFullscreen(){return window.__TAURI_INVOKE__("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return window.__TAURI_INVOKE__("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return window.__TAURI_INVOKE__("plugin:window|is_maximized",{label:this.label})}async isDecorated(){return window.__TAURI_INVOKE__("plugin:window|is_decorated",{label:this.label})}async isResizable(){return window.__TAURI_INVOKE__("plugin:window|is_resizable",{label:this.label})}async isVisible(){return window.__TAURI_INVOKE__("plugin:window|is_visible",{label:this.label})}async title(){return window.__TAURI_INVOKE__("plugin:window|title",{label:this.label})}async theme(){return window.__TAURI_INVOKE__("plugin:window|theme",{label:this.label})}async center(){return window.__TAURI_INVOKE__("plugin:window|center",{label:this.label})}async requestUserAttention(n){let i=null;return n&&(i=n===e.UserAttentionType.Critical?{type:"Critical"}:{type:"Informational"}),window.__TAURI_INVOKE__("plugin:window|request_user_attention",{label:this.label,value:i})}async setResizable(e){return window.__TAURI_INVOKE__("plugin:window|set_resizable",{label:this.label,value:e})}async setTitle(e){return window.__TAURI_INVOKE__("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return window.__TAURI_INVOKE__("plugin:window|maximize",{label:this.label})}async unmaximize(){return window.__TAURI_INVOKE__("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return window.__TAURI_INVOKE__("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return window.__TAURI_INVOKE__("plugin:window|minimize",{label:this.label})}async unminimize(){return window.__TAURI_INVOKE__("plugin:window|unminimize",{label:this.label})}async show(){return window.__TAURI_INVOKE__("plugin:window|show",{label:this.label})}async hide(){return window.__TAURI_INVOKE__("plugin:window|hide",{label:this.label})}async close(){return window.__TAURI_INVOKE__("plugin:window|close",{label:this.label})}async setDecorations(e){return window.__TAURI_INVOKE__("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return window.__TAURI_INVOKE__("plugin:window|set_shadow",{label:this.label,value:e})}async setAlwaysOnTop(e){return window.__TAURI_INVOKE__("plugin:window|set_always_on_top",{label:this.label,value:e})}async setContentProtected(e){return window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return window.__TAURI_INVOKE__("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return window.__TAURI_INVOKE__("plugin:window|set_focus",{label:this.label})}async setIcon(e){return window.__TAURI_INVOKE__("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return window.__TAURI_INVOKE__("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return window.__TAURI_INVOKE__("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return window.__TAURI_INVOKE__("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return window.__TAURI_INVOKE__("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return window.__TAURI_INVOKE__("plugin:window|start_dragging",{label:this.label})}async onResized(e){return this.listen(I.WINDOW_RESIZED,(n=>{n.payload=C(n.payload),e(n)}))}async onMoved(e){return this.listen(I.WINDOW_MOVED,(n=>{n.payload=P(n.payload),e(n)}))}async onCloseRequested(e){return this.listen(I.WINDOW_CLOSE_REQUESTED,(n=>{const i=new D(n);Promise.resolve(e(i)).then((()=>{if(!i.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const n=await this.listen(I.WINDOW_FOCUS,(n=>{e({...n,payload:!0})})),i=await this.listen(I.WINDOW_BLUR,(n=>{e({...n,payload:!1})}));return()=>{n(),i()}}async onScaleChanged(e){return this.listen(I.WINDOW_SCALE_FACTOR_CHANGED,e)}async onMenuClicked(e){return this.listen(I.MENU,e)}async onFileDropEvent(e){const n=await this.listen(I.WINDOW_FILE_DROP,(n=>{e({...n,payload:{type:"drop",paths:n.payload}})})),i=await this.listen(I.WINDOW_FILE_DROP_HOVER,(n=>{e({...n,payload:{type:"hover",paths:n.payload}})})),t=await this.listen(I.WINDOW_FILE_DROP_CANCELLED,(n=>{e({...n,payload:{type:"cancel"}})}));return()=>{n(),i(),t()}}async onThemeChanged(e){return this.listen(I.WINDOW_THEME_CHANGED,e)}}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}}class V extends W{constructor(e,n={}){super(e),(null==n?void 0:n.skip)||window.__TAURI_INVOKE__("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 m().some((n=>n.label===e))?new V(e,{skip:!0}):null}}function K(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:P(e.position),size:C(e.size)}}function P(e){return new N(e.x,e.y)}function C(e){return new R(e.width,e.height)}return e.appWindow=void 0,"__TAURI_METADATA__"in window?e.appWindow=new V(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn('Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label.\nNote that this is not an issue if running this frontend on a browser instead of a Tauri window.'),e.appWindow=new V("main",{skip:!0})),e.CloseRequestedEvent=D,e.LogicalPosition=v,e.LogicalSize=T,e.PhysicalPosition=N,e.PhysicalSize=R,e.WebviewWindow=V,e.WebviewWindowHandle=f,e.WindowManager=W,e.availableMonitors=async function(){return window.__TAURI_INVOKE__("plugin:window|available_monitors").then((e=>e.map(K)))},e.currentMonitor=async function(){return window.__TAURI_INVOKE__("plugin:window|current_monitor").then(K)},e.getAll=m,e.getCurrent=function(){return new V(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})},e.primaryMonitor=async function(){return window.__TAURI_INVOKE__("plugin:window|primary_monitor").then(K)},e}({});Object.defineProperty(window.__TAURI__,"window",{value:__TAURI_WINDOW__})} +if("__TAURI__"in window){var __TAURI_WINDOW__=function(e){"use strict";var i=Object.defineProperty,n=(e,n)=>{for(var t in n)i(e,t,{get:n[t],enumerable:!0})},t=(e,i,n)=>{if(!i.has(e))throw TypeError("Cannot "+n)},l=(e,i,n)=>(t(e,i,"read from private field"),n?n.call(e):i.get(e)),a=(e,i,n,l)=>(t(e,i,"write to private field"),l?l.call(e,n):i.set(e,n),n);function s(e,i=!1){let n=window.crypto.getRandomValues(new Uint32Array(1))[0],t=`_${n}`;return Object.defineProperty(window,t,{value:n=>(i&&Reflect.deleteProperty(window,t),e?.(n)),writable:!1,configurable:!0}),n}n({},{Channel:()=>o,PluginListener:()=>_,addPluginListener:()=>w,convertFileSrc:()=>c,invoke:()=>u,transformCallback:()=>s});var r,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0,((e,i,n)=>{if(i.has(e))throw TypeError("Cannot add the same private member more than once");i instanceof WeakSet?i.add(e):i.set(e,n)})(this,r,(()=>{})),this.id=s((e=>{l(this,r).call(this,e)}))}set onmessage(e){a(this,r,e)}get onmessage(){return l(this,r)}toJSON(){return`__CHANNEL__:${this.id}`}};r=new WeakMap;var _=class{constructor(e,i,n){this.plugin=e,this.event=i,this.channelId=n}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function w(e,i,n){let t=new o;return t.onmessage=n,u(`plugin:${e}|register_listener`,{event:i,handler:t}).then((()=>new _(e,i,t.id)))}async function u(e,i={}){return new Promise(((n,t)=>{let l=s((e=>{n(e),Reflect.deleteProperty(window,`_${a}`)}),!0),a=s((e=>{t(e),Reflect.deleteProperty(window,`_${l}`)}),!0);window.__TAURI_IPC__({cmd:e,callback:l,error:a,...i})}))}function c(e,i="asset"){let n=encodeURIComponent(e);return navigator.userAgent.includes("Windows")?`https://${i}.localhost/${n}`:`${i}://localhost/${n}`}n({},{TauriEvent:()=>h,emit:()=>b,listen:()=>y,once:()=>I});var d,h=(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))(h||{});async function p(e,i){await u("plugin:event|unlisten",{event:e,eventId:i})}async function y(e,i,n){return u("plugin:event|listen",{event:e,windowLabel:n?.target,handler:s(i)}).then((i=>async()=>p(e,i)))}async function I(e,i,n){return y(e,(n=>{i(n),p(e,n.id).catch((()=>{}))}),n)}async function b(e,i,n){await u("plugin:event|emit",{event:e,windowLabel:n?.target,payload:i})}class g{constructor(e,i){this.type="Logical",this.width=e,this.height=i}}class E{constructor(e,i){this.type="Physical",this.width=e,this.height=i}toLogical(e){return new g(this.width/e,this.height/e)}}class A{constructor(e,i){this.type="Logical",this.x=e,this.y=i}}class O{constructor(e,i){this.type="Physical",this.x=e,this.y=i}toLogical(e){return new A(this.x/e,this.y/e)}}function T(){return window.__TAURI_METADATA__.__windows.map((e=>new U(e.label,{skip:!0})))}e.UserAttentionType=void 0,(d=e.UserAttentionType||(e.UserAttentionType={}))[d.Critical=1]="Critical",d[d.Informational=2]="Informational";const R=["tauri://created","tauri://error"];class N{constructor(e){this.label=e,this.listeners=Object.create(null)}async listen(e,i){return this._handleTauriEvent(e,i)?Promise.resolve((()=>{const n=this.listeners[e];n.splice(n.indexOf(i),1)})):y(e,i,{target:this.label})}async once(e,i){return this._handleTauriEvent(e,i)?Promise.resolve((()=>{const n=this.listeners[e];n.splice(n.indexOf(i),1)})):I(e,i,{target:this.label})}async emit(e,i){if(R.includes(e)){for(const n of this.listeners[e]||[])n({event:e,id:-1,windowLabel:this.label,payload:i});return Promise.resolve()}return b(e,i,{target:this.label})}_handleTauriEvent(e,i){return!!R.includes(e)&&(e in this.listeners?this.listeners[e].push(i):this.listeners[e]=[i],!0)}}class m extends N{async scaleFactor(){return window.__TAURI_INVOKE__("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return window.__TAURI_INVOKE__("plugin:window|inner_position",{label:this.label}).then((({x:e,y:i})=>new O(e,i)))}async outerPosition(){return window.__TAURI_INVOKE__("plugin:window|outer_position",{label:this.label}).then((({x:e,y:i})=>new O(e,i)))}async innerSize(){return window.__TAURI_INVOKE__("plugin:window|inner_size",{label:this.label}).then((({width:e,height:i})=>new E(e,i)))}async outerSize(){return window.__TAURI_INVOKE__("plugin:window|outer_size",{label:this.label}).then((({width:e,height:i})=>new E(e,i)))}async isFullscreen(){return window.__TAURI_INVOKE__("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return window.__TAURI_INVOKE__("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return window.__TAURI_INVOKE__("plugin:window|is_maximized",{label:this.label})}async isDecorated(){return window.__TAURI_INVOKE__("plugin:window|is_decorated",{label:this.label})}async isResizable(){return window.__TAURI_INVOKE__("plugin:window|is_resizable",{label:this.label})}async isVisible(){return window.__TAURI_INVOKE__("plugin:window|is_visible",{label:this.label})}async title(){return window.__TAURI_INVOKE__("plugin:window|title",{label:this.label})}async theme(){return window.__TAURI_INVOKE__("plugin:window|theme",{label:this.label})}async center(){return window.__TAURI_INVOKE__("plugin:window|center",{label:this.label})}async requestUserAttention(i){let n=null;return i&&(n=i===e.UserAttentionType.Critical?{type:"Critical"}:{type:"Informational"}),window.__TAURI_INVOKE__("plugin:window|request_user_attention",{label:this.label,value:n})}async setResizable(e){return window.__TAURI_INVOKE__("plugin:window|set_resizable",{label:this.label,value:e})}async setTitle(e){return window.__TAURI_INVOKE__("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return window.__TAURI_INVOKE__("plugin:window|maximize",{label:this.label})}async unmaximize(){return window.__TAURI_INVOKE__("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return window.__TAURI_INVOKE__("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return window.__TAURI_INVOKE__("plugin:window|minimize",{label:this.label})}async unminimize(){return window.__TAURI_INVOKE__("plugin:window|unminimize",{label:this.label})}async show(){return window.__TAURI_INVOKE__("plugin:window|show",{label:this.label})}async hide(){return window.__TAURI_INVOKE__("plugin:window|hide",{label:this.label})}async close(){return window.__TAURI_INVOKE__("plugin:window|close",{label:this.label})}async setDecorations(e){return window.__TAURI_INVOKE__("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return window.__TAURI_INVOKE__("plugin:window|set_shadow",{label:this.label,value:e})}async setAlwaysOnTop(e){return window.__TAURI_INVOKE__("plugin:window|set_always_on_top",{label:this.label,value:e})}async setContentProtected(e){return window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("plugin:window|set_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setFullscreen(e){return window.__TAURI_INVOKE__("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return window.__TAURI_INVOKE__("plugin:window|set_focus",{label:this.label})}async setIcon(e){return window.__TAURI_INVOKE__("plugin:window|set_icon",{label:this.label,value:"string"==typeof e?e:Array.from(e)})}async setSkipTaskbar(e){return window.__TAURI_INVOKE__("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return window.__TAURI_INVOKE__("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return window.__TAURI_INVOKE__("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return window.__TAURI_INVOKE__("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 window.__TAURI_INVOKE__("plugin:window|set_cursor_position",{label:this.label,value:{type:e.type,data:{x:e.x,y:e.y}}})}async setIgnoreCursorEvents(e){return window.__TAURI_INVOKE__("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return window.__TAURI_INVOKE__("plugin:window|start_dragging",{label:this.label})}async onResized(e){return this.listen(h.WINDOW_RESIZED,(i=>{i.payload=D(i.payload),e(i)}))}async onMoved(e){return this.listen(h.WINDOW_MOVED,(i=>{i.payload=W(i.payload),e(i)}))}async onCloseRequested(e){return this.listen(h.WINDOW_CLOSE_REQUESTED,(i=>{const n=new v(i);Promise.resolve(e(n)).then((()=>{if(!n.isPreventDefault())return this.close()}))}))}async onFocusChanged(e){const i=await this.listen(h.WINDOW_FOCUS,(i=>{e({...i,payload:!0})})),n=await this.listen(h.WINDOW_BLUR,(i=>{e({...i,payload:!1})}));return()=>{i(),n()}}async onScaleChanged(e){return this.listen(h.WINDOW_SCALE_FACTOR_CHANGED,e)}async onMenuClicked(e){return this.listen(h.MENU,e)}async onFileDropEvent(e){const i=await this.listen(h.WINDOW_FILE_DROP,(i=>{e({...i,payload:{type:"drop",paths:i.payload}})})),n=await this.listen(h.WINDOW_FILE_DROP_HOVER,(i=>{e({...i,payload:{type:"hover",paths:i.payload}})})),t=await this.listen(h.WINDOW_FILE_DROP_CANCELLED,(i=>{e({...i,payload:{type:"cancel"}})}));return()=>{i(),n(),t()}}async onThemeChanged(e){return this.listen(h.WINDOW_THEME_CHANGED,e)}}class v{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}}class U extends m{constructor(e,i={}){super(e),(null==i?void 0:i.skip)||window.__TAURI_INVOKE__("plugin:window|create",{options:{...i,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){return T().some((i=>i.label===e))?new U(e,{skip:!0}):null}}function f(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:W(e.position),size:D(e.size)}}function W(e){return new O(e.x,e.y)}function D(e){return new E(e.width,e.height)}return e.appWindow=void 0,"__TAURI_METADATA__"in window?e.appWindow=new U(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0}):(console.warn('Could not find "window.__TAURI_METADATA__". The "appWindow" value will reference the "main" window label.\nNote that this is not an issue if running this frontend on a browser instead of a Tauri window.'),e.appWindow=new U("main",{skip:!0})),e.CloseRequestedEvent=v,e.LogicalPosition=A,e.LogicalSize=g,e.PhysicalPosition=O,e.PhysicalSize=E,e.WebviewWindow=U,e.WebviewWindowHandle=N,e.WindowManager=m,e.availableMonitors=async function(){return window.__TAURI_INVOKE__("plugin:window|available_monitors").then((e=>e.map(f)))},e.currentMonitor=async function(){return window.__TAURI_INVOKE__("plugin:window|current_monitor").then(f)},e.getAll=T,e.getCurrent=function(){return new U(window.__TAURI_METADATA__.__currentWindow.label,{skip:!0})},e.primaryMonitor=async function(){return window.__TAURI_INVOKE__("plugin:window|primary_monitor").then(f)},e}({});Object.defineProperty(window.__TAURI__,"window",{value:__TAURI_WINDOW__})} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 630f512c..4a9e4c4c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1,4 +1,4 @@ -lockfileVersion: '6.1' +lockfileVersion: '6.0' settings: autoInstallPeers: true @@ -34,7 +34,7 @@ importers: version: 8.8.0(eslint@8.39.0) eslint-config-standard-with-typescript: specifier: ^35.0.0 - version: 35.0.0(@typescript-eslint/eslint-plugin@5.58.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.0.0)(eslint-plugin-promise@6.1.1)(eslint@8.38.0)(typescript@5.0.4) + version: 35.0.0(@typescript-eslint/eslint-plugin@5.59.1)(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.0.0)(eslint-plugin-promise@6.1.1)(eslint@8.39.0)(typescript@5.0.4) eslint-plugin-import: specifier: ^2.27.5 version: 2.27.5(@typescript-eslint/parser@5.59.1)(eslint@8.39.0) @@ -60,8 +60,8 @@ importers: examples/api: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 '@tauri-apps/plugin-app': specifier: 2.0.0-alpha.0 version: link:../../plugins/app @@ -115,8 +115,8 @@ importers: specifier: ^1.0.1 version: 1.0.1(svelte@3.55.1)(vite@3.0.9) '@tauri-apps/cli': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.10 + version: 2.0.0-alpha.10 internal-ip: specifier: ^7.0.0 version: 7.0.0 @@ -133,8 +133,8 @@ importers: plugins/app: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -143,8 +143,8 @@ importers: plugins/authenticator: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -153,8 +153,8 @@ importers: plugins/autostart: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -163,8 +163,8 @@ importers: plugins/cli: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.4.1 @@ -173,8 +173,8 @@ importers: plugins/clipboard-manager: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.4.1 @@ -183,8 +183,8 @@ importers: plugins/dialog: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.4.1 @@ -193,8 +193,8 @@ importers: plugins/fs: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.4.1 @@ -203,8 +203,8 @@ importers: plugins/global-shortcut: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.4.1 @@ -213,8 +213,8 @@ importers: plugins/http: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -223,8 +223,8 @@ importers: plugins/log: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -233,8 +233,8 @@ importers: plugins/notification: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.4.1 @@ -243,8 +243,8 @@ importers: plugins/os: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -253,8 +253,8 @@ importers: plugins/positioner: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -263,8 +263,8 @@ importers: plugins/process: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -273,8 +273,8 @@ importers: plugins/shell: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.4.1 @@ -283,14 +283,14 @@ importers: plugins/single-instance/examples/vanilla: devDependencies: '@tauri-apps/cli': - specifier: ^2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.10 + version: 2.0.0-alpha.10 plugins/sql: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -299,8 +299,8 @@ importers: plugins/store: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -309,8 +309,8 @@ importers: plugins/stronghold: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -319,8 +319,8 @@ importers: plugins/updater: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -329,8 +329,8 @@ importers: plugins/upload: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -339,8 +339,8 @@ importers: plugins/websocket: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -359,8 +359,8 @@ importers: specifier: ^1.15.5 version: 1.15.8(svelte@3.58.0)(vite@4.3.3) '@tauri-apps/cli': - specifier: 2.0.0-alpha.9 - version: 2.0.0-alpha.9 + specifier: 2.0.0-alpha.10 + version: 2.0.0-alpha.10 svelte: specifier: ^3.58.0 version: 3.58.0 @@ -380,8 +380,8 @@ importers: plugins/window: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -390,8 +390,8 @@ importers: plugins/window-state: dependencies: '@tauri-apps/api': - specifier: 2.0.0-alpha.4 - version: 2.0.0-alpha.4 + specifier: 2.0.0-alpha.5 + version: 2.0.0-alpha.5 devDependencies: tslib: specifier: ^2.5.0 @@ -1047,13 +1047,13 @@ packages: - supports-color dev: true - /@tauri-apps/api@2.0.0-alpha.4: - resolution: {integrity: sha512-gWe5fFHbwFM+dmdDPtlDvVDVtoMneGRM+S8mECevWhKpXYxId0yxznE56YGAvPSJXC3vgsXw16mOmkTnEVKnaw==} + /@tauri-apps/api@2.0.0-alpha.5: + resolution: {integrity: sha512-OqysC4c819itGxic50RoDMrmd+ofX+MMNkXKeRS0BV2rkKqrnuV17o3TrQXFI1xs/kXRmmPC+3Y42P9Y5uNvRg==} engines: {node: '>= 14.6.0', npm: '>= 6.6.0', yarn: '>= 1.19.1'} dev: false - /@tauri-apps/cli-darwin-arm64@2.0.0-alpha.9: - resolution: {integrity: sha512-h7AQY4MbHyy7CLANfoegJyaypKQ3fYPlBA3mnhtF+zntrMxVTv+HO9sgn98jGnwlOak8y0NPPKJ6gZFu5GYiNg==} + /@tauri-apps/cli-darwin-arm64@2.0.0-alpha.10: + resolution: {integrity: sha512-z6DoKRUm1Yygu2Tpatu7Fej0eZejZQcsDKsHWc3b5yoIsrodxvKbko2SvYczUx4ecXWplJBTIfTZNo6ciIRRmw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] @@ -1061,8 +1061,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-darwin-x64@2.0.0-alpha.9: - resolution: {integrity: sha512-8RtvzZ4/1gZU8SvMaCygtjc9Q0bMnA0NuQKOMrehRfpvvy2gw/q8MMdw3WEawYGQHqEbr6YtNJmaR5wlsVk+IQ==} + /@tauri-apps/cli-darwin-x64@2.0.0-alpha.10: + resolution: {integrity: sha512-xqPUC5uI6zo5+1IXSwZLj1uyRWCeZgQgpyaExGDOYBjcC8HUc2NRdFGsGVtGhFWE+HftppD9p8elJLQM90B02w==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] @@ -1070,8 +1070,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-alpha.9: - resolution: {integrity: sha512-nHAgFEJ2DXXEx96FLPnqZ9vfFGw7Hr2ZaY+xy28llXWljCOguWi8wdHv4OMnq0hbOkegVGplYPc4RSQ5uUia2Q==} + /@tauri-apps/cli-linux-arm-gnueabihf@2.0.0-alpha.10: + resolution: {integrity: sha512-UpjG9qpF/7fkfrBoM6N+Lo08HRAKR9k7LENAFU+zd81JestxOCs0hxuX2/lGkVydtOuSXfVvMn1W5YpGKkgp3A==} engines: {node: '>= 10'} cpu: [arm] os: [linux] @@ -1079,8 +1079,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-gnu@2.0.0-alpha.9: - resolution: {integrity: sha512-ETmUoTp+UgHypPpsq3OYwbcmX8MqjCGIUAzDHoVFpYuj2oqHw0ZaCx2lQPTnqW5G5L9X9VXhMAcRB8OBZG5KFw==} + /@tauri-apps/cli-linux-arm64-gnu@2.0.0-alpha.10: + resolution: {integrity: sha512-Pc8seZINcbHDgOC0ThZ5EPUqOYbL94wEUecKkiaKn7gCl3/ZyIlRte5gizBeLwmnG4fkSLZc0UMvRilu4hGK3g==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1088,8 +1088,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-arm64-musl@2.0.0-alpha.9: - resolution: {integrity: sha512-S55E2u4LsQajoxkpYqd2skPEVG5hp+Mkhhnixfi+87q87n9iIvIqcH+4ejDXAPUrWNMsRKIWVURV2ZzivqK5Kw==} + /@tauri-apps/cli-linux-arm64-musl@2.0.0-alpha.10: + resolution: {integrity: sha512-ZlaBbJq5yXP6VmNOrUGgSDnM1JcDsYf7XfVOm/kLVVrZ3iEzYA18v4SZH2kR18bU7h5+YVCPwwnfD+B8ROGidA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] @@ -1097,8 +1097,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-gnu@2.0.0-alpha.9: - resolution: {integrity: sha512-/0J5sJDu+cSrj67L4Q4FVANe1ffpsz3LZMQRkbWmT2ggd2Mxg8LZBtg7y5ysMfJg8xjKvymi+1mS2yU1B7/k9Q==} + /@tauri-apps/cli-linux-x64-gnu@2.0.0-alpha.10: + resolution: {integrity: sha512-7fo0u56URSFZwJpwPMeNiYypbgYcT8i5KPMe1CQgWW19sJLHBMK1Kd0L8SeAZDlCPpY2coNifAdEm3C7Ca7xMQ==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1106,8 +1106,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-linux-x64-musl@2.0.0-alpha.9: - resolution: {integrity: sha512-zjtf5H3c4amlBjIdDiQ3pmiMV/cmcPxaiH4KgyRD6NZXY9+gDk5dkzj3WAWegiD1ycz3bv5INO/tDxjk5ZSYlw==} + /@tauri-apps/cli-linux-x64-musl@2.0.0-alpha.10: + resolution: {integrity: sha512-9lY7YJmsm7SndlIxKzj/faX/bYX1q0dib88kpxT2xW4qNt9RihTI6PST1PDce5DmEoheLU9Xp9ere8SfoHgE2A==} engines: {node: '>= 10'} cpu: [x64] os: [linux] @@ -1115,8 +1115,17 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-ia32-msvc@2.0.0-alpha.9: - resolution: {integrity: sha512-Hn0xDaEEMeXRzWCtew2MIYDky8hF+BOos0PP4qyCX14LfChpgSIT0aMYC8xbSfj9N9pwznhNBxgOtCADaTPWcg==} + /@tauri-apps/cli-win32-arm64-msvc@2.0.0-alpha.10: + resolution: {integrity: sha512-tJOHIy13vjYRkfw7++aRDQEb5CVzVQKDiJ35Zg4I8YcaPExgj6LKCpDo8N8AD4RXy4SnYKzqYTt8K9xcyIonzA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@tauri-apps/cli-win32-ia32-msvc@2.0.0-alpha.10: + resolution: {integrity: sha512-DN4TlOU8e6cRRVXAnldHhfDDr0ER000fojJ/Vb33fgGvaXury3jBtNyKQuoscvg6T8fLUBc72O6+4tDnXlIBwQ==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] @@ -1124,8 +1133,8 @@ packages: dev: true optional: true - /@tauri-apps/cli-win32-x64-msvc@2.0.0-alpha.9: - resolution: {integrity: sha512-541nR7UoasX/fnEWhC14H4Ppj17Aa1fbCyFb9+zmWjupVkEGf/yQFvdWRHdmCkgOdGuxPahR5hbOPh+jvaklFw==} + /@tauri-apps/cli-win32-x64-msvc@2.0.0-alpha.10: + resolution: {integrity: sha512-H5Y+L7H24n9EVB/Dw5HHGo+wQZHTLVgWrkOwsxqssDhTPiM5CbEuyjEf/B1y8uqp4YoIlw5t7Db+GBg12KejAA==} engines: {node: '>= 10'} cpu: [x64] os: [win32] @@ -1133,20 +1142,21 @@ packages: dev: true optional: true - /@tauri-apps/cli@2.0.0-alpha.9: - resolution: {integrity: sha512-roQNpFC3Ijni/c7TCkCpUg3gWKfxs1ftWSQJyCthqIPRM5J7I2vOfhcUXIZw9glrxDp5npyRW0xYyI7W/424uQ==} + /@tauri-apps/cli@2.0.0-alpha.10: + resolution: {integrity: sha512-8SkTAxg5J06f7BWgJjNt1NEBPRsffmj4X+PckHX3ZguZd8xqpGtACufUg0zVqaFZPmd+9OCvoEJSP5veO4utDQ==} engines: {node: '>= 10'} hasBin: true optionalDependencies: - '@tauri-apps/cli-darwin-arm64': 2.0.0-alpha.9 - '@tauri-apps/cli-darwin-x64': 2.0.0-alpha.9 - '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-alpha.9 - '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-alpha.9 - '@tauri-apps/cli-linux-arm64-musl': 2.0.0-alpha.9 - '@tauri-apps/cli-linux-x64-gnu': 2.0.0-alpha.9 - '@tauri-apps/cli-linux-x64-musl': 2.0.0-alpha.9 - '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-alpha.9 - '@tauri-apps/cli-win32-x64-msvc': 2.0.0-alpha.9 + '@tauri-apps/cli-darwin-arm64': 2.0.0-alpha.10 + '@tauri-apps/cli-darwin-x64': 2.0.0-alpha.10 + '@tauri-apps/cli-linux-arm-gnueabihf': 2.0.0-alpha.10 + '@tauri-apps/cli-linux-arm64-gnu': 2.0.0-alpha.10 + '@tauri-apps/cli-linux-arm64-musl': 2.0.0-alpha.10 + '@tauri-apps/cli-linux-x64-gnu': 2.0.0-alpha.10 + '@tauri-apps/cli-linux-x64-musl': 2.0.0-alpha.10 + '@tauri-apps/cli-win32-arm64-msvc': 2.0.0-alpha.10 + '@tauri-apps/cli-win32-ia32-msvc': 2.0.0-alpha.10 + '@tauri-apps/cli-win32-x64-msvc': 2.0.0-alpha.10 dev: true /@tauri-apps/toml@2.2.4: @@ -2225,7 +2235,7 @@ packages: eslint: 8.39.0 dev: true - /eslint-config-standard-with-typescript@35.0.0(@typescript-eslint/eslint-plugin@5.58.0)(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.0.0)(eslint-plugin-promise@6.1.1)(eslint@8.38.0)(typescript@5.0.4): + /eslint-config-standard-with-typescript@35.0.0(@typescript-eslint/eslint-plugin@5.59.1)(eslint-plugin-import@2.27.5)(eslint-plugin-n@16.0.0)(eslint-plugin-promise@6.1.1)(eslint@8.39.0)(typescript@5.0.4): resolution: {integrity: sha512-Xa7DY9GgduZyp0qmXxBF0/dB+Vm4/DgWu1lGpNLJV2d46aCaUxTKDEnkzjUWX/1O9S0a+Dhnw7A4oI0JpYzwtw==} peerDependencies: '@typescript-eslint/eslint-plugin': ^5.50.0 diff --git a/shared/template/package.json b/shared/template/package.json index e39bca2a..42cd8cf7 100644 --- a/shared/template/package.json +++ b/shared/template/package.json @@ -27,6 +27,6 @@ "tslib": "^2.4.1" }, "dependencies": { - "@tauri-apps/api": "2.0.0-alpha.4" + "@tauri-apps/api": "2.0.0-alpha.5" } -} +} \ No newline at end of file