diff --git a/.changes/fix-dialog-default-path.md b/.changes/fix-dialog-default-path.md new file mode 100644 index 00000000000..1aefe3f2c32 --- /dev/null +++ b/.changes/fix-dialog-default-path.md @@ -0,0 +1,6 @@ +--- +"tauri": patch +"api": patch +--- + +Fixes the dialog `defaultPath` usage on Linux. diff --git a/core/tauri/Cargo.toml b/core/tauri/Cargo.toml index d52b14790b1..281e01d7364 100644 --- a/core/tauri/Cargo.toml +++ b/core/tauri/Cargo.toml @@ -67,7 +67,7 @@ attohttpc = { version = "0.18", features = [ "json", "form" ] } open = { version = "2.0", optional = true } shared_child = { version = "1.0", optional = true } os_pipe = { version = "1.0", optional = true } -rfd = { version = "0.6.2", features = [ "parent" ] } +rfd = { version = "0.6.3", features = [ "parent" ] } raw-window-handle = "0.4.2" minisign-verify = { version = "0.2", optional = true } os_info = { version = "3.0.9", optional = true } diff --git a/core/tauri/src/endpoints/dialog.rs b/core/tauri/src/endpoints/dialog.rs index e412cbbbb22..5264cbaafb5 100644 --- a/core/tauri/src/endpoints/dialog.rs +++ b/core/tauri/src/endpoints/dialog.rs @@ -150,9 +150,6 @@ pub fn open( dialog_builder = dialog_builder.set_parent(window); } if let Some(default_path) = options.default_path { - if !default_path.exists() { - return Err(crate::Error::DialogDefaultPathNotExists(default_path)); - } dialog_builder = set_default_path(dialog_builder, default_path); } for filter in options.filters { diff --git a/examples/api/dist/assets/index.f1ec7caa.js b/examples/api/dist/assets/index.d86155cb.js similarity index 51% rename from examples/api/dist/assets/index.f1ec7caa.js rename to examples/api/dist/assets/index.d86155cb.js index 917859e87c6..e5e545c5663 100644 --- a/examples/api/dist/assets/index.f1ec7caa.js +++ b/examples/api/dist/assets/index.d86155cb.js @@ -1,4 +1,4 @@ -var Fo=Object.defineProperty,Ro=Object.defineProperties;var Uo=Object.getOwnPropertyDescriptors;var Ui=Object.getOwnPropertySymbols;var Io=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable;var Ii=(e,t,n)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ni=(e,t)=>{for(var n in t||(t={}))Io.call(t,n)&&Ii(e,n,t[n]);if(Ui)for(var n of Ui(t))No.call(t,n)&&Ii(e,n,t[n]);return e},qi=(e,t)=>Ro(e,Uo(t));import{S as J,i as K,s as Y,e as s,a as g,t as z,b as a,c as O,d as r,l as T,f as H,n as U,g as W,r as Z,o as he,h as Wn,j as A,p as Ke,k as Ye,m as qo,q as Hi,u as ct,v as Xe,w as Bi,x as V,y as Ho,z as Gi,A as $i,B as Vi,C as Ji,D as Bo,E as Ki,F as Yi,H as Go,G as $o,I as Vo}from"./vendor.a59520a9.js";const Jo=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerpolicy&&(l.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?l.credentials="include":o.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}};Jo();/*! ***************************************************************************** +var Fo=Object.defineProperty,Ro=Object.defineProperties;var Uo=Object.getOwnPropertyDescriptors;var Ui=Object.getOwnPropertySymbols;var Io=Object.prototype.hasOwnProperty,No=Object.prototype.propertyIsEnumerable;var Ii=(e,t,n)=>t in e?Fo(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ni=(e,t)=>{for(var n in t||(t={}))Io.call(t,n)&&Ii(e,n,t[n]);if(Ui)for(var n of Ui(t))No.call(t,n)&&Ii(e,n,t[n]);return e},qi=(e,t)=>Ro(e,Uo(t));import{S as J,i as K,s as Y,e as u,a as g,t as z,b as a,c as O,d as r,l as T,f as H,n as U,g as W,r as Z,o as he,h as Wn,j as A,p as Ke,k as Ye,m as qo,q as Hi,u as ct,v as Xe,w as Bi,x as V,y as Ho,z as Gi,A as $i,B as Vi,C as Ji,D as Bo,E as Ki,F as Yi,H as Go,G as $o,I as Vo}from"./vendor.a59520a9.js";const Jo=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))i(o);new MutationObserver(o=>{for(const l of o)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function n(o){const l={};return o.integrity&&(l.integrity=o.integrity),o.referrerpolicy&&(l.referrerPolicy=o.referrerpolicy),o.crossorigin==="use-credentials"?l.credentials="include":o.crossorigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function i(o){if(o.ep)return;o.ep=!0;const l=n(o);fetch(o.href,l)}};Jo();/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any @@ -11,30 +11,30 @@ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** */var Xi=function(e,t){return(Xi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])})(e,t)};function Ln(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Xi(e,t),e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var dt=function(){return(dt=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&o[o.length-1])||d[0]!==6&&d[0]!==2)){u=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]0&&o[o.length-1])||d[0]!==6&&d[0]!==2)){s=0;continue}if(d[0]===3&&(!o||d[1]>o[0]&&d[1]{n(2,l=p)}),to().then(p=>{n(0,i=p)}),no().then(p=>{n(1,o=p)});async function u(){await io()}async function c(){await Dn()}return[i,o,l,u,c]}class Qo extends J{constructor(t){super();K(this,t,Xo,Yo,Y,{})}}function oo(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:oo});function Zo(e){let t,n,i,o,l,u,c,p,f,d,_;return{c(){t=s("div"),n=z(`This binary can be run on the terminal and takes the following arguments: - `),i=s("ul"),i.innerHTML=`
  • --config PATH
  • +`)})}),n.spawn().catch(l)})]})})},t}(En);function An(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Shell",message:{cmd:"open",path:e,with:t}})]})})}Object.freeze({__proto__:null,Command:xi,Child:Zi,open:An});function to(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"App",message:{cmd:"getAppVersion"}})]})})}function eo(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"App",message:{cmd:"getAppName"}})]})})}function no(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"App",message:{cmd:"getTauriVersion"}})]})})}Object.freeze({__proto__:null,getName:eo,getVersion:to,getTauriVersion:no});function io(e){return e===void 0&&(e=0),b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Process",message:{cmd:"exit",exitCode:e}})]})})}function Dn(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Process",message:{cmd:"relaunch"}})]})})}Object.freeze({__proto__:null,exit:io,relaunch:Dn});function Yo(e){let t,n,i,o,l,s,c,p,f,d,_,m,h,v,C,w,P,S,D,R,j;return{c(){t=u("h1"),t.textContent="Welcome",n=g(),i=u("p"),i.textContent="Tauri's API capabilities using the ` @tauri-apps/api ` package. It's used as\n the main validation app, serving as the testbed of our development process. In\n the future, this app will be used on Tauri's integration tests.",o=g(),l=u("p"),s=z("Current App version: "),c=z(e[0]),p=g(),f=u("p"),d=z("Current Tauri version: "),_=z(e[1]),m=g(),h=u("p"),v=z("Current App name: "),C=z(e[2]),w=g(),P=u("button"),P.textContent="Close application",S=g(),D=u("button"),D.textContent="Relaunch application",a(P,"class","button"),a(D,"class","button")},m(L,I){O(L,t,I),O(L,n,I),O(L,i,I),O(L,o,I),O(L,l,I),r(l,s),r(l,c),O(L,p,I),O(L,f,I),r(f,d),r(f,_),O(L,m,I),O(L,h,I),r(h,v),r(h,C),O(L,w,I),O(L,P,I),O(L,S,I),O(L,D,I),R||(j=[T(P,"click",e[3]),T(D,"click",e[4])],R=!0)},p(L,[I]){I&1&&H(c,L[0]),I&2&&H(_,L[1]),I&4&&H(C,L[2])},i:U,o:U,d(L){L&&W(t),L&&W(n),L&&W(i),L&&W(o),L&&W(l),L&&W(p),L&&W(f),L&&W(m),L&&W(h),L&&W(w),L&&W(P),L&&W(S),L&&W(D),R=!1,Z(j)}}}function Xo(e,t,n){let i=0,o=0,l="Unknown";eo().then(p=>{n(2,l=p)}),to().then(p=>{n(0,i=p)}),no().then(p=>{n(1,o=p)});async function s(){await io()}async function c(){await Dn()}return[i,o,l,s,c]}class Qo extends J{constructor(t){super();K(this,t,Xo,Yo,Y,{})}}function oo(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Cli",message:{cmd:"cliMatches"}})]})})}Object.freeze({__proto__:null,getMatches:oo});function Zo(e){let t,n,i,o,l,s,c,p,f,d,_;return{c(){t=u("div"),n=z(`This binary can be run on the terminal and takes the following arguments: + `),i=u("ul"),i.innerHTML=`
  • --config PATH
  • --theme light|dark|system
  • --verbose
  • `,o=z(` - Additionally, it has a `),l=s("i"),l.textContent="update --background",u=z(` subcommand. + Additionally, it has a `),l=u("i"),l.textContent="update --background",s=z(` subcommand. Note that the arguments are only parsed, not implemented. - `),c=s("br"),p=g(),f=s("button"),f.textContent="Get matches",a(f,"class","button"),a(f,"id","cli-matches")},m(m,h){O(m,t,h),r(t,n),r(t,i),r(t,o),r(t,l),r(t,u),r(t,c),r(t,p),r(t,f),d||(_=T(f,"click",e[0]),d=!0)},p:U,i:U,o:U,d(m){m&&W(t),d=!1,_()}}}function xo(e,t,n){let{onMessage:i}=t;function o(){oo().then(i).catch(i)}return e.$$set=l=>{"onMessage"in l&&n(1,i=l.onMessage)},[o,i]}class tr extends J{constructor(t){super();K(this,t,xo,Zo,Y,{onMessage:1})}}function ro(e,t,n){return b(this,void 0,void 0,function(){return y(this,function(i){switch(i.label){case 0:return[4,k({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})];case 1:return i.sent(),[2]}})})}function lo(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Event",message:{cmd:"unlisten",eventId:e}})]})})}function Et(e,t){return b(this,void 0,void 0,function(){var n=this;return y(this,function(i){return[2,k({__tauriModule:"Event",message:{cmd:"listen",event:e,handler:Lt(t)}}).then(function(o){return function(){return b(n,void 0,void 0,function(){return y(this,function(l){return[2,lo(o)]})})}})]})})}function jn(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,Et(e,function(i){t(i),lo(i.id).catch(function(){})})]})})}function Qe(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,ro(e,void 0,t)]})})}Object.freeze({__proto__:null,listen:Et,once:jn,emit:Qe});function er(e){let t,n,i,o,l,u,c,p;return{c(){t=s("div"),n=s("button"),n.textContent="Call Log API",i=g(),o=s("button"),o.textContent="Call Request (async) API",l=g(),u=s("button"),u.textContent="Send event to Rust",a(n,"class","button"),a(n,"id","log"),a(o,"class","button"),a(o,"id","request"),a(u,"class","button"),a(u,"id","event")},m(f,d){O(f,t,d),r(t,n),r(t,i),r(t,o),r(t,l),r(t,u),c||(p=[T(n,"click",e[0]),T(o,"click",e[1]),T(u,"click",e[2])],c=!0)},p:U,i:U,o:U,d(f){f&&W(t),c=!1,Z(p)}}}function nr(e,t,n){let{onMessage:i}=t,o;he(async()=>{o=await Et("rust-event",i)}),Wn(()=>{o&&o()});function l(){me("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function u(){me("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function c(){Qe("js-event","this is the payload string")}return e.$$set=p=>{"onMessage"in p&&n(3,i=p.onMessage)},[l,u,c,i]}class ir extends J{constructor(t){super();K(this,t,nr,er,Y,{onMessage:3})}}function Fn(e){return e===void 0&&(e={}),b(this,void 0,void 0,function(){return y(this,function(t){return typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})]})})}function so(e){return e===void 0&&(e={}),b(this,void 0,void 0,function(){return y(this,function(t){return typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})]})})}function or(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e}})]})})}function rr(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Dialog",message:{cmd:"askDialog",title:t,message:e}})]})})}function lr(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Dialog",message:{cmd:"confirmDialog",title:t,message:e}})]})})}Object.freeze({__proto__:null,open:Fn,save:so,message:or,ask:rr,confirm:lr});var $t;function sr(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})]})})}function Rn(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:e,options:t}})]})})}function ur(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return typeof t=="object"&&Object.freeze(t),typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Fs",message:{cmd:"writeFile",path:e.path,contents:e.contents,options:t}})]})})}(function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Desktop=6]="Desktop",e[e.Document=7]="Document",e[e.Download=8]="Download",e[e.Executable=9]="Executable",e[e.Font=10]="Font",e[e.Home=11]="Home",e[e.Picture=12]="Picture",e[e.Public=13]="Public",e[e.Runtime=14]="Runtime",e[e.Template=15]="Template",e[e.Video=16]="Video",e[e.Resource=17]="Resource",e[e.App=18]="App",e[e.Current=19]="Current",e[e.Log=20]="Log"})($t||($t={}));function ar(e){var t=function(n){if(n.length<65536)return String.fromCharCode.apply(null,Array.from(n));for(var i="",o=n.length,l=0;lv.trim())}]:[],multiple:u,directory:c}).then(function(v){if(Array.isArray(v))i(v);else{var C=v,w=C.match(/\S+\.\S+$/g);Rn(C).then(function(P){w&&(C.includes(".png")||C.includes(".jpg"))?gr(new Uint8Array(P),function(S){var D="data:image/png;base64,"+S;i('')}):i(v)}).catch(i(v))}}).catch(i)}function f(){so({defaultPath:o,filters:l?[{name:"Tauri Example",extensions:l.split(",").map(v=>v.trim())}]:[]}).then(i).catch(i)}function d(){o=this.value,n(0,o)}function _(){l=this.value,n(1,l)}function m(){u=this.checked,n(2,u)}function h(){c=this.checked,n(3,c)}return e.$$set=v=>{"onMessage"in v&&n(6,i=v.onMessage)},[o,l,u,c,p,f,i,d,_,m,h]}class br extends J{constructor(t){super();K(this,t,_r,vr,Y,{onMessage:6})}}function ao(e,t,n){const i=e.slice();return i[8]=t[n],i}function co(e){let t,n=e[8][0]+"",i,o;return{c(){t=s("option"),i=z(n),t.__value=o=e[8][1],t.value=t.__value},m(l,u){O(l,t,u),r(t,i)},p:U,d(l){l&&W(t)}}}function yr(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v=e[2],C=[];for(let w=0;wisNaN(parseInt(_))).map(_=>[_,$t[_]]);function c(){const _=o.match(/\S+\.\S+$/g),m={dir:fo()};(_?Rn(o,m):uo(o,m)).then(function(v){if(_)if(o.includes(".png")||o.includes(".jpg"))wr(new Uint8Array(v),function(C){const w="data:image/png;base64,"+C;i('')});else{const C=String.fromCharCode.apply(null,v);i(''),setTimeout(()=>{const w=document.getElementById("file-response");w.value=C,document.getElementById("file-save").addEventListener("click",function(){writeFile({file:o,contents:w.value},{dir:fo()}).catch(i)})})}else i(v)}).catch(i)}function p(){n(1,l.src=Qi(o),l)}function f(){o=this.value,n(0,o)}function d(_){qo[_?"unshift":"push"](()=>{l=_,n(1,l)})}return e.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage)},[o,l,u,c,p,i,f,d]}class kr extends J{constructor(t){super();K(this,t,Mr,yr,Y,{onMessage:5})}}var ve;(function(e){e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary"})(ve||(ve={}));var Un=function(){function e(t,n){this.type=t,this.payload=n}return e.form=function(t){return new e("Form",t)},e.json=function(t){return new e("Json",t)},e.text=function(t){return new e("Text",t)},e.bytes=function(t){return new e("Bytes",t)},e}(),po=function(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.data=e.data},ho=function(){function e(t){this.id=t}return e.prototype.drop=function(){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]})})},e.prototype.request=function(t){return b(this,void 0,void 0,function(){var n;return y(this,function(i){return(n=!t.responseType||t.responseType===ve.JSON)&&(t.responseType=ve.Text),[2,k({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:t}}).then(function(o){var l=new po(o);if(n){try{l.data=JSON.parse(l.data)}catch(u){if(l.ok&&l.data==="")l.data={};else if(respone.ok)throw Error("Failed to parse response `".concat(l.data,"` as JSON: ").concat(u,";\n try setting the `responseType` option to `ResponseType.Text` or `ResponseType.Binary` if the API does not return a JSON response."))}return l}return l})]})})},e.prototype.get=function(t,n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,this.request(dt({method:"GET",url:t},n))]})})},e.prototype.post=function(t,n,i){return b(this,void 0,void 0,function(){return y(this,function(o){return[2,this.request(dt({method:"POST",url:t,body:n},i))]})})},e.prototype.put=function(t,n,i){return b(this,void 0,void 0,function(){return y(this,function(o){return[2,this.request(dt({method:"PUT",url:t,body:n},i))]})})},e.prototype.patch=function(t,n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,this.request(dt({method:"PATCH",url:t},n))]})})},e.prototype.delete=function(t,n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,this.request(dt({method:"DELETE",url:t},n))]})})},e}();function In(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(function(n){return new ho(n)})]})})}var Nn=null;function Cr(e,t){var n;return b(this,void 0,void 0,function(){return y(this,function(i){switch(i.label){case 0:return Nn!==null?[3,2]:[4,In()];case 1:Nn=i.sent(),i.label=2;case 2:return[2,Nn.request(dt({url:e,method:(n=t==null?void 0:t.method)!==null&&n!==void 0?n:"GET"},t))]}})})}Object.freeze({__proto__:null,getClient:In,fetch:Cr,Body:Un,Client:ho,Response:po,get ResponseType(){return ve}});function Tr(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v,C,w,P;return{c(){t=s("form"),n=s("select"),i=s("option"),i.textContent="GET",o=s("option"),o.textContent="POST",l=s("option"),l.textContent="PUT",u=s("option"),u.textContent="PATCH",c=s("option"),c.textContent="DELETE",p=g(),f=s("input"),d=g(),_=s("br"),m=g(),h=s("textarea"),v=g(),C=s("button"),C.textContent="Make request",i.__value="GET",i.value=i.__value,o.__value="POST",o.value=o.__value,l.__value="PUT",l.value=l.__value,u.__value="PATCH",u.value=u.__value,c.__value="DELETE",c.value=c.__value,a(n,"class","button"),a(n,"id","request-method"),e[0]===void 0&&Hi(()=>e[5].call(n)),a(f,"id","request-url"),a(f,"placeholder","Type the request URL..."),a(h,"id","request-body"),a(h,"placeholder","Request body"),a(h,"rows","5"),ct(h,"width","100%"),ct(h,"margin-right","10px"),ct(h,"font-size","12px"),a(C,"class","button"),a(C,"id","make-request")},m(S,D){O(S,t,D),r(t,n),r(n,i),r(n,o),r(n,l),r(n,u),r(n,c),Xe(n,e[0]),r(t,p),r(t,f),A(f,e[1]),r(t,d),r(t,_),r(t,m),r(t,h),A(h,e[2]),r(t,v),r(t,C),w||(P=[T(n,"change",e[5]),T(f,"input",e[6]),T(h,"input",e[7]),T(t,"submit",Ke(e[3]))],w=!0)},p(S,[D]){D&1&&Xe(n,S[0]),D&2&&f.value!==S[1]&&A(f,S[1]),D&4&&A(h,S[2])},i:U,o:U,d(S){S&&W(t),w=!1,Z(P)}}}function Sr(e,t,n){let i="GET",o="https://jsonplaceholder.typicode.com/todos/1",l="",{onMessage:u}=t;async function c(){const _=await In(),v={url:o||""||"",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?v.body=Un.json(JSON.parse(l)):l!==""&&(v.body=Un.text(l)),_.request(v).then(u).catch(u)}function p(){i=Bi(this),n(0,i)}function f(){o=this.value,n(1,o)}function d(){l=this.value,n(2,l)}return e.$$set=_=>{"onMessage"in _&&n(4,u=_.onMessage)},[i,o,l,c,u,p,f,d]}class zr extends J{constructor(t){super();K(this,t,Sr,Tr,Y,{onMessage:4})}}function Pr(e){let t,n,i;return{c(){t=s("button"),t.textContent="Send test notification",a(t,"class","button"),a(t,"id","notification")},m(o,l){O(o,t,l),n||(i=T(t,"click",e[0]),n=!0)},p:U,i:U,o:U,d(o){o&&W(t),n=!1,i()}}}function mo(){new Notification("Notification title",{body:"This is the notification body"})}function Or(e,t,n){let{onMessage:i}=t;function o(){Notification.permission==="default"?Notification.requestPermission().then(function(l){l==="granted"?mo():i("Permission is "+l)}).catch(i):Notification.permission==="granted"?mo():i("Permission is denied")}return e.$$set=l=>{"onMessage"in l&&n(1,i=l.onMessage)},[o,i]}class Wr extends J{constructor(t){super();K(this,t,Or,Pr,Y,{onMessage:1})}}var Vt,Ze=function(e,t){this.type="Logical",this.width=e,this.height=t},Jt=function(){function e(t,n){this.type="Physical",this.width=t,this.height=n}return e.prototype.toLogical=function(t){return new Ze(this.width/t,this.height/t)},e}(),vo=function(e,t){this.type="Logical",this.x=e,this.y=t},Kt=function(){function e(t,n){this.type="Physical",this.x=t,this.y=n}return e.prototype.toLogical=function(t){return new vo(this.x/t,this.y/t)},e}();function Lr(){return new ge(window.__TAURI__.__currentWindow.label,{skip:!0})}function go(){return window.__TAURI__.__windows.map(function(e){return new ge(e.label,{skip:!0})})}(function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"})(Vt||(Vt={}));var _o=["tauri://created","tauri://error"],bo=function(){function e(t){try{this.label=t!=null?t:window.__TAURI__.__currentWindow.label}catch{this.label=""}this.listeners=Object.create(null)}return e.prototype.listen=function(t,n){return b(this,void 0,void 0,function(){var i=this;return y(this,function(o){return this._handleTauriEvent(t,n)?[2,Promise.resolve(function(){var l=i.listeners[t];l.splice(l.indexOf(n),1)})]:[2,Et(t,n)]})})},e.prototype.once=function(t,n){return b(this,void 0,void 0,function(){var i=this;return y(this,function(o){return this._handleTauriEvent(t,n)?[2,Promise.resolve(function(){var l=i.listeners[t];l.splice(l.indexOf(n),1)})]:[2,jn(t,n)]})})},e.prototype.emit=function(t,n){return b(this,void 0,void 0,function(){var i,o;return y(this,function(l){if(_o.includes(t)){for(i=0,o=this.listeners[t]||[];ie[31].call(n)),a(u,"type","checkbox"),a(d,"type","checkbox"),a(h,"title","Unminimizes after 2 seconds"),a(C,"title","Unminimizes after 2 seconds"),a(P,"title","Visible again after 2 seconds"),a(R,"type","checkbox"),a(G,"type","checkbox"),a(F,"type","checkbox"),a(ft,"type","checkbox"),a(et,"type","number"),a(et,"min","0"),a(et,"class","svelte-12ggtr4"),a(nt,"type","number"),a(nt,"min","0"),a(nt,"class","svelte-12ggtr4"),a(pt,"class","flex col grow svelte-12ggtr4"),a(it,"type","number"),a(it,"min","400"),a(it,"class","svelte-12ggtr4"),a(ot,"type","number"),a(ot,"min","400"),a(ot,"class","svelte-12ggtr4"),a(ht,"class","flex col grow svelte-12ggtr4"),a(mt,"type","number"),a(mt,"class","svelte-12ggtr4"),a(vt,"type","number"),a(vt,"class","svelte-12ggtr4"),a(N,"class","flex col grow svelte-12ggtr4"),a(ut,"type","number"),a(ut,"min","400"),a(ut,"class","svelte-12ggtr4"),a(at,"type","number"),a(at,"min","400"),a(at,"class","svelte-12ggtr4"),a(Ut,"class","flex col grow svelte-12ggtr4"),a(x,"class","window-controls flex flex-row svelte-12ggtr4"),a(t,"class","flex col"),a(Xt,"class","svelte-12ggtr4"),a(Qt,"class","svelte-12ggtr4"),a(gt,"class","grow window-property svelte-12ggtr4"),a(Zt,"class","svelte-12ggtr4"),a(xt,"class","svelte-12ggtr4"),a(_t,"class","grow window-property svelte-12ggtr4"),a(It,"class","flex"),a(te,"class","svelte-12ggtr4"),a(ee,"class","svelte-12ggtr4"),a(bt,"class","grow window-property svelte-12ggtr4"),a(ne,"class","svelte-12ggtr4"),a(ie,"class","svelte-12ggtr4"),a(yt,"class","grow window-property svelte-12ggtr4"),a(Nt,"class","flex"),a(oe,"class","svelte-12ggtr4"),a(re,"class","svelte-12ggtr4"),a(wt,"class","grow window-property svelte-12ggtr4"),a(le,"class","svelte-12ggtr4"),a(se,"class","svelte-12ggtr4"),a(Mt,"class","grow window-property svelte-12ggtr4"),a(qt,"class","flex"),a(ue,"class","svelte-12ggtr4"),a(ae,"class","svelte-12ggtr4"),a(kt,"class","grow window-property svelte-12ggtr4"),a(ce,"class","svelte-12ggtr4"),a(de,"class","svelte-12ggtr4"),a(Ct,"class","grow window-property svelte-12ggtr4"),a(Ht,"class","flex"),a(Pt,"id","title"),a(fe,"class","button"),a(fe,"type","submit"),ct(Tt,"margin-top","24px"),a(Ot,"id","url"),a(pe,"class","button"),a(pe,"id","open-url"),ct(St,"margin-top","24px"),a(Wt,"class","button"),a(Wt,"title","Minimizes the window, requests attention for 3s and then resets it"),a(Bt,"class","button")},m(M,E){O(M,t,E),r(t,n);for(let $=0;${n(20,G=N),n(7,h=G.width),n(8,v=G.height)}),o[i].outerSize().then(N=>{n(21,B=N)})}function ye(){o[i].innerPosition().then(N=>{n(18,L=N)}),o[i].outerPosition().then(N=>{n(19,I=N),n(13,D=I.x),n(14,R=I.y)})}async function Yt(N){Q&&Q(),tt&&tt(),tt=await N.listen("tauri://move",ye),Q=await N.listen("tauri://resize",At)}async function x(){await o[i].minimize(),await o[i].requestUserAttention(Vt.Critical),await new Promise(N=>setTimeout(N,3e3)),await o[i].requestUserAttention(null)}function pt(){i=Bi(this),n(0,i),n(1,o)}function Dt(){c=this.checked,n(2,c)}function we(){p=this.checked,n(3,p)}const et=()=>o[i].center();function Me(){f=this.checked,n(16,f)}function jt(){d=this.checked,n(4,d)}function ke(){_=this.checked,n(5,_)}function nt(){m=this.checked,n(6,m)}function Ce(){D=V(this.value),n(13,D)}function ht(){R=V(this.value),n(14,R)}function Ft(){h=V(this.value),n(7,h)}function Te(){v=V(this.value),n(8,v)}function it(){C=V(this.value),n(9,C)}function Se(){w=V(this.value),n(10,w)}function Rt(){P=V(this.value),n(11,P)}function ze(){S=V(this.value),n(12,S)}function ot(){F=this.value,n(22,F)}function Pe(){u=this.value,n(15,u)}return e.$$set=N=>{"onMessage"in N&&n(30,l=N.onMessage)},e.$$.update=()=>{e.$$.dirty[0]&7&&o[i].setResizable(c),e.$$.dirty[0]&11&&(p?o[i].maximize():o[i].unmaximize()),e.$$.dirty[0]&19&&o[i].setDecorations(d),e.$$.dirty[0]&35&&o[i].setAlwaysOnTop(_),e.$$.dirty[0]&67&&o[i].setFullscreen(m),e.$$.dirty[0]&387&&o[i].setSize(new Jt(h,v)),e.$$.dirty[0]&1539&&(C&&w?o[i].setMinSize(new Ze(C,w)):o[i].setMinSize(null)),e.$$.dirty[0]&6147&&(P&&S?o[i].setMaxSize(new Ze(P,S)):o[i].setMaxSize(null)),e.$$.dirty[0]&24579&&o[i].setPosition(new Kt(D,R)),e.$$.dirty[0]&3&&o[i].scaleFactor().then(N=>n(17,j=N)),e.$$.dirty[0]&3&&Yt(o[i])},[i,o,c,p,d,_,m,h,v,C,w,P,S,D,R,u,f,j,L,I,G,B,F,rt,q,st,ft,_e,be,x,l,pt,Dt,we,et,Me,jt,ke,nt,Ce,ht,Ft,Te,it,Se,Rt,ze,ot,Pe]}class Rr extends J{constructor(t){super();K(this,t,Fr,jr,Y,{onMessage:30},[-1,-1])}}function ko(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:Lt(t)}})]})})}function Ur(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:Lt(t)}})]})})}function Ir(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})]})})}function Co(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})]})})}function To(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]})})}Object.freeze({__proto__:null,register:ko,registerAll:Ur,isRegistered:Ir,unregister:Co,unregisterAll:To});function So(e,t,n){const i=e.slice();return i[9]=t[n],i}function zo(e){let t,n=e[9]+"",i,o,l,u,c;function p(){return e[8](e[9])}return{c(){t=s("div"),i=z(n),o=g(),l=s("button"),l.textContent="Unregister",a(l,"type","button")},m(f,d){O(f,t,d),r(t,i),r(t,o),r(t,l),u||(c=T(l,"click",p),u=!0)},p(f,d){e=f,d&2&&n!==(n=e[9]+"")&&H(i,n)},d(f){f&&W(t),u=!1,c()}}}function Po(e){let t,n,i;return{c(){t=s("button"),t.textContent="Unregister all",a(t,"type","button")},m(o,l){O(o,t,l),n||(i=T(t,"click",e[5]),n=!0)},p:U,d(o){o&&W(t),n=!1,i()}}}function Nr(e){let t,n,i,o,l,u,c,p,f,d,_=e[1],m=[];for(let v=0;v<_.length;v+=1)m[v]=zo(So(e,_,v));let h=e[1].length&&Po(e);return{c(){t=s("div"),n=s("div"),i=s("input"),o=g(),l=s("button"),l.textContent="Register",u=g(),c=s("div");for(let v=0;vn(1,i=m));let u="CmdOrControl+X";function c(){const m=u;ko(m,()=>{o(`Shortcut ${m} triggered`)}).then(()=>{l.update(h=>[...h,m]),o(`Shortcut ${m} registered successfully`)}).catch(o)}function p(m){const h=m;Co(h).then(()=>{l.update(v=>v.filter(C=>C!==h)),o(`Shortcut ${h} unregistered`)}).catch(o)}function f(){To().then(()=>{l.update(()=>[]),o("Unregistered all shortcuts")}).catch(o)}function d(){u=this.value,n(0,u)}const _=m=>p(m);return e.$$set=m=>{"onMessage"in m&&n(6,o=m.onMessage)},[u,i,l,c,p,f,o,d,_]}class Hr extends J{constructor(t){super();K(this,t,qr,Nr,Y,{onMessage:6})}}function Oo(e){let t,n,i,o,l;return{c(){t=s("input"),n=g(),i=s("button"),i.textContent="Write",a(t,"placeholder","write to stdin"),a(i,"class","button")},m(u,c){O(u,t,c),A(t,e[3]),O(u,n,c),O(u,i,c),o||(l=[T(t,"input",e[10]),T(i,"click",e[7])],o=!0)},p(u,c){c&8&&t.value!==u[3]&&A(t,u[3])},d(u){u&&W(t),u&&W(n),u&&W(i),o=!1,Z(l)}}}function Br(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v,C,w=e[4]&&Oo(e);return{c(){t=s("div"),n=s("div"),i=s("input"),o=g(),l=s("button"),l.textContent="Run",u=g(),c=s("button"),c.textContent="Kill",p=g(),w&&w.c(),f=g(),d=s("div"),_=s("input"),m=g(),h=s("input"),a(l,"class","button"),a(c,"class","button"),a(_,"placeholder","Working directory"),a(h,"placeholder","Environment variables"),ct(h,"width","300px")},m(P,S){O(P,t,S),r(t,n),r(n,i),A(i,e[0]),r(n,o),r(n,l),r(n,u),r(n,c),r(n,p),w&&w.m(n,null),r(t,f),r(t,d),r(d,_),A(_,e[1]),r(d,m),r(d,h),A(h,e[2]),v||(C=[T(i,"input",e[9]),T(l,"click",e[5]),T(c,"click",e[6]),T(_,"input",e[11]),T(h,"input",e[12])],v=!0)},p(P,[S]){S&1&&i.value!==P[0]&&A(i,P[0]),P[4]?w?w.p(P,S):(w=Oo(P),w.c(),w.m(n,null)):w&&(w.d(1),w=null),S&2&&_.value!==P[1]&&A(_,P[1]),S&4&&h.value!==P[2]&&A(h,P[2])},i:U,o:U,d(P){P&&W(t),w&&w.d(),v=!1,Z(C)}}}function Gr(e,t,n){const i=navigator.userAgent.includes("Windows");let o=i?"cmd":"sh",l=i?["/C"]:["-c"],{onMessage:u}=t,c='echo "hello world"',p=null,f="SOMETHING=value ANOTHER=2",d="",_;function m(){return f.split(" ").reduce((R,j)=>{let[L,I]=j.split("=");return qi(Ni({},R),{[L]:I})},{})}function h(){n(4,_=null);const R=new xi(o,[...l,c],{cwd:p||null,env:m()});R.on("close",j=>{u(`command finished with code ${j.code} and signal ${j.signal}`),n(4,_=null)}),R.on("error",j=>u(`command error: "${j}"`)),R.stdout.on("data",j=>u(`command stdout: "${j}"`)),R.stderr.on("data",j=>u(`command stderr: "${j}"`)),R.spawn().then(j=>{n(4,_=j)}).catch(u)}function v(){_.kill().then(()=>u("killed child process")).catch(u)}function C(){_.write(d).catch(u)}function w(){c=this.value,n(0,c)}function P(){d=this.value,n(3,d)}function S(){p=this.value,n(1,p)}function D(){f=this.value,n(2,f)}return e.$$set=R=>{"onMessage"in R&&n(8,u=R.onMessage)},[c,p,f,d,_,h,v,C,u,w,P,S,D]}class $r extends J{constructor(t){super();K(this,t,Gr,Br,Y,{onMessage:8})}}function Wo(){return b(this,void 0,void 0,function(){function e(){t&&t(),t=void 0}var t;return y(this,function(n){return[2,new Promise(function(i,o){Et("tauri://update-status",function(l){var u;(u=l==null?void 0:l.payload).error?(e(),o(u.error)):u.status==="DONE"&&(e(),i())}).then(function(l){t=l}).catch(function(l){throw e(),l}),Qe("tauri://update-install").catch(function(l){throw e(),l})})]})})}function Lo(){return b(this,void 0,void 0,function(){function e(){t&&t(),t=void 0}var t;return y(this,function(n){return[2,new Promise(function(i,o){jn("tauri://update-available",function(l){var u;u=l==null?void 0:l.payload,e(),i({manifest:u,shouldUpdate:!0})}).catch(function(l){throw e(),l}),Et("tauri://update-status",function(l){var u;(u=l==null?void 0:l.payload).error?(e(),o(u.error)):u.status==="UPTODATE"&&(e(),i({shouldUpdate:!1}))}).then(function(l){t=l}).catch(function(l){throw e(),l}),Qe("tauri://update").catch(function(l){throw e(),l})})]})})}Object.freeze({__proto__:null,installUpdate:Wo,checkUpdate:Lo});function Vr(e){let t,n,i,o,l,u;return{c(){t=s("div"),n=s("button"),n.textContent="Check update",i=g(),o=s("button"),o.textContent="Install update",a(n,"class","button"),a(n,"id","check_update"),a(o,"class","button hidden"),a(o,"id","start_update")},m(c,p){O(c,t,p),r(t,n),r(t,i),r(t,o),l||(u=[T(n,"click",e[0]),T(o,"click",e[1])],l=!0)},p:U,i:U,o:U,d(c){c&&W(t),l=!1,Z(u)}}}function Jr(e,t,n){let{onMessage:i}=t,o;he(async()=>{o=await Et("tauri://update-status",i)}),Wn(()=>{o&&o()});async function l(){try{document.getElementById("check_update").classList.add("hidden");const{shouldUpdate:c,manifest:p}=await Lo();i(`Should update: ${c}`),i(p),c&&document.getElementById("start_update").classList.remove("hidden")}catch(c){i(c)}}async function u(){try{document.getElementById("start_update").classList.add("hidden"),await Wo(),i("Installation complete, restart required."),await Dn()}catch(c){i(c)}}return e.$$set=c=>{"onMessage"in c&&n(2,i=c.onMessage)},[l,u,i]}class Kr extends J{constructor(t){super();K(this,t,Jr,Vr,Y,{onMessage:2})}}function Eo(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})]})})}function Ao(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Clipboard",message:{cmd:"readText"}})]})})}Object.freeze({__proto__:null,writeText:Eo,readText:Ao});function Yr(e){let t,n,i,o,l,u,c,p,f;return{c(){t=s("div"),n=s("div"),i=s("input"),o=g(),l=s("button"),l.textContent="Write",u=g(),c=s("button"),c.textContent="Read",a(i,"placeholder","Text to write to the clipboard"),a(l,"type","button"),a(c,"type","button")},m(d,_){O(d,t,_),r(t,n),r(n,i),A(i,e[0]),r(n,o),r(n,l),r(t,u),r(t,c),p||(f=[T(i,"input",e[4]),T(l,"click",e[1]),T(c,"click",e[2])],p=!0)},p(d,[_]){_&1&&i.value!==d[0]&&A(i,d[0])},i:U,o:U,d(d){d&&W(t),p=!1,Z(f)}}}function Xr(e,t,n){let{onMessage:i}=t,o="clipboard message";function l(){Eo(o).then(()=>{i("Wrote to the clipboard")}).catch(i)}function u(){Ao().then(p=>{i(`Clipboard contents: ${p}`)}).catch(i)}function c(){o=this.value,n(0,o)}return e.$$set=p=>{"onMessage"in p&&n(3,i=p.onMessage)},[o,l,u,i,c]}class Qr extends J{constructor(t){super();K(this,t,Xr,Yr,Y,{onMessage:3})}}function Zr(e){let t;return{c(){t=s("div"),t.innerHTML=`

    Not available for Linux

    - `},m(n,i){O(n,t,i)},p:U,i:U,o:U,d(n){n&&W(t)}}}function xr(e,t,n){let{onMessage:i}=t;const o=window.constraints={audio:!0,video:!0};function l(c){const p=document.querySelector("video"),f=c.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${f[0].label}`),window.stream=c,p.srcObject=c}function u(c){if(c.name==="ConstraintNotSatisfiedError"){const p=o.video;i(`The resolution ${p.width.exact}x${p.height.exact} px is not supported by your device.`)}else c.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${c.name}`,c)}return he(async()=>{try{const c=await navigator.mediaDevices.getUserMedia(o);l(c)}catch(c){u(c)}}),Wn(()=>{window.stream.getTracks().forEach(function(c){c.stop()})}),e.$$set=c=>{"onMessage"in c&&n(0,i=c.onMessage)},[i]}class tl extends J{constructor(t){super();K(this,t,xr,Zr,Y,{onMessage:0})}}function el(e){let t,n,i,o,l,u,c,p,f,d,_,m;return{c(){t=s("input"),n=g(),i=s("input"),o=g(),l=s("button"),l.textContent="Post it.",u=g(),c=s("p"),c.textContent="Result:",p=g(),f=s("pre"),d=z(e[2]),a(l,"type","button")},m(h,v){O(h,t,v),A(t,e[0]),O(h,n,v),O(h,i,v),A(i,e[1]),O(h,o,v),O(h,l,v),O(h,u,v),O(h,c,v),O(h,p,v),O(h,f,v),r(f,d),_||(m=[T(t,"input",e[4]),T(i,"input",e[5]),T(l,"click",e[3])],_=!0)},p(h,[v]){v&1&&t.value!==h[0]&&A(t,h[0]),v&2&&i.value!==h[1]&&A(i,h[1]),v&4&&H(d,h[2])},i:U,o:U,d(h){h&&W(t),h&&W(n),h&&W(i),h&&W(o),h&&W(l),h&&W(u),h&&W(c),h&&W(p),h&&W(f),_=!1,Z(m)}}}function nl(e,t,n){let i="baz",o="qux",l=null;async function u(){let f=navigator.userAgent.includes("Windows")?"https://customprotocol.test/example.html":"customprotocol://test/example.html";const _=await(await fetch(f,{method:"POST",body:JSON.stringify({foo:i,bar:o})})).json();n(2,l=JSON.stringify(_))}function c(){i=this.value,n(0,i)}function p(){o=this.value,n(1,o)}return[i,o,l,u,c,p]}class il extends J{constructor(t){super();K(this,t,nl,el,Y,{})}}function Do(e,t,n){const i=e.slice();return i[9]=t[n],i}function jo(e){let t,n=e[9].label+"",i,o,l,u,c;function p(){return e[7](e[9])}return{c(){t=s("p"),i=z(n),o=g(),a(t,"class",l="nv noselect "+(e[0]===e[9]?"nv_selected":""))},m(f,d){O(f,t,d),r(t,i),r(t,o),u||(c=T(t,"click",p),u=!0)},p(f,d){e=f,d&1&&l!==(l="nv noselect "+(e[0]===e[9]?"nv_selected":""))&&a(t,"class",l)},d(f){f&&W(t),u=!1,c()}}}function ol(e){let t,n,i,o,l,u,c,p,f,d,_,m,h,v,C,w,P,S,D,R,j,L,I,G=e[2],B=[];for(let F=0;FDocumentation + `),c=u("br"),p=g(),f=u("button"),f.textContent="Get matches",a(f,"class","button"),a(f,"id","cli-matches")},m(m,h){O(m,t,h),r(t,n),r(t,i),r(t,o),r(t,l),r(t,s),r(t,c),r(t,p),r(t,f),d||(_=T(f,"click",e[0]),d=!0)},p:U,i:U,o:U,d(m){m&&W(t),d=!1,_()}}}function xo(e,t,n){let{onMessage:i}=t;function o(){oo().then(i).catch(i)}return e.$$set=l=>{"onMessage"in l&&n(1,i=l.onMessage)},[o,i]}class tr extends J{constructor(t){super();K(this,t,xo,Zo,Y,{onMessage:1})}}function ro(e,t,n){return b(this,void 0,void 0,function(){return y(this,function(i){switch(i.label){case 0:return[4,k({__tauriModule:"Event",message:{cmd:"emit",event:e,windowLabel:t,payload:n}})];case 1:return i.sent(),[2]}})})}function lo(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Event",message:{cmd:"unlisten",eventId:e}})]})})}function Et(e,t){return b(this,void 0,void 0,function(){var n=this;return y(this,function(i){return[2,k({__tauriModule:"Event",message:{cmd:"listen",event:e,handler:Lt(t)}}).then(function(o){return function(){return b(n,void 0,void 0,function(){return y(this,function(l){return[2,lo(o)]})})}})]})})}function jn(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,Et(e,function(i){t(i),lo(i.id).catch(function(){})})]})})}function Qe(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,ro(e,void 0,t)]})})}Object.freeze({__proto__:null,listen:Et,once:jn,emit:Qe});function er(e){let t,n,i,o,l,s,c,p;return{c(){t=u("div"),n=u("button"),n.textContent="Call Log API",i=g(),o=u("button"),o.textContent="Call Request (async) API",l=g(),s=u("button"),s.textContent="Send event to Rust",a(n,"class","button"),a(n,"id","log"),a(o,"class","button"),a(o,"id","request"),a(s,"class","button"),a(s,"id","event")},m(f,d){O(f,t,d),r(t,n),r(t,i),r(t,o),r(t,l),r(t,s),c||(p=[T(n,"click",e[0]),T(o,"click",e[1]),T(s,"click",e[2])],c=!0)},p:U,i:U,o:U,d(f){f&&W(t),c=!1,Z(p)}}}function nr(e,t,n){let{onMessage:i}=t,o;he(async()=>{o=await Et("rust-event",i)}),Wn(()=>{o&&o()});function l(){me("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function s(){me("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(i).catch(i)}function c(){Qe("js-event","this is the payload string")}return e.$$set=p=>{"onMessage"in p&&n(3,i=p.onMessage)},[l,s,c,i]}class ir extends J{constructor(t){super();K(this,t,nr,er,Y,{onMessage:3})}}function Fn(e){return e===void 0&&(e={}),b(this,void 0,void 0,function(){return y(this,function(t){return typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Dialog",message:{cmd:"openDialog",options:e}})]})})}function uo(e){return e===void 0&&(e={}),b(this,void 0,void 0,function(){return y(this,function(t){return typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Dialog",message:{cmd:"saveDialog",options:e}})]})})}function or(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Dialog",message:{cmd:"messageDialog",message:e}})]})})}function rr(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Dialog",message:{cmd:"askDialog",title:t,message:e}})]})})}function lr(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Dialog",message:{cmd:"confirmDialog",title:t,message:e}})]})})}Object.freeze({__proto__:null,open:Fn,save:uo,message:or,ask:rr,confirm:lr});var $t;function ur(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"readTextFile",path:e,options:t}})]})})}function Rn(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"Fs",message:{cmd:"readBinaryFile",path:e,options:t}})]})})}function sr(e,t){return t===void 0&&(t={}),b(this,void 0,void 0,function(){return y(this,function(n){return typeof t=="object"&&Object.freeze(t),typeof e=="object"&&Object.freeze(e),[2,k({__tauriModule:"Fs",message:{cmd:"writeFile",path:e.path,contents:e.contents,options:t}})]})})}(function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Desktop=6]="Desktop",e[e.Document=7]="Document",e[e.Download=8]="Download",e[e.Executable=9]="Executable",e[e.Font=10]="Font",e[e.Home=11]="Home",e[e.Picture=12]="Picture",e[e.Public=13]="Public",e[e.Runtime=14]="Runtime",e[e.Template=15]="Template",e[e.Video=16]="Video",e[e.Resource=17]="Resource",e[e.App=18]="App",e[e.Current=19]="Current",e[e.Log=20]="Log"})($t||($t={}));function ar(e){var t=function(n){if(n.length<65536)return String.fromCharCode.apply(null,Array.from(n));for(var i="",o=n.length,l=0;lv.trim())}]:[],multiple:s,directory:c}).then(function(v){if(Array.isArray(v))i(v);else{var C=v,w=C.match(/\S+\.\S+$/g);Rn(C).then(function(P){w&&(C.includes(".png")||C.includes(".jpg"))?gr(new Uint8Array(P),function(S){var D="data:image/png;base64,"+S;i('')}):i(v)}).catch(i(v))}}).catch(i)}function f(){uo({defaultPath:o,filters:l?[{name:"Tauri Example",extensions:l.split(",").map(v=>v.trim())}]:[]}).then(i).catch(i)}function d(){o=this.value,n(0,o)}function _(){l=this.value,n(1,l)}function m(){s=this.checked,n(2,s)}function h(){c=this.checked,n(3,c)}return e.$$set=v=>{"onMessage"in v&&n(6,i=v.onMessage)},[o,l,s,c,p,f,i,d,_,m,h]}class br extends J{constructor(t){super();K(this,t,_r,vr,Y,{onMessage:6})}}function ao(e,t,n){const i=e.slice();return i[8]=t[n],i}function co(e){let t,n=e[8][0]+"",i,o;return{c(){t=u("option"),i=z(n),t.__value=o=e[8][1],t.value=t.__value},m(l,s){O(l,t,s),r(t,i)},p:U,d(l){l&&W(t)}}}function yr(e){let t,n,i,o,l,s,c,p,f,d,_,m,h,v=e[2],C=[];for(let w=0;wisNaN(parseInt(_))).map(_=>[_,$t[_]]);function c(){const _=o.match(/\S+\.\S+$/g),m={dir:fo()};(_?Rn(o,m):so(o,m)).then(function(v){if(_)if(o.includes(".png")||o.includes(".jpg"))wr(new Uint8Array(v),function(C){const w="data:image/png;base64,"+C;i('')});else{const C=String.fromCharCode.apply(null,v);i(''),setTimeout(()=>{const w=document.getElementById("file-response");w.value=C,document.getElementById("file-save").addEventListener("click",function(){writeFile({file:o,contents:w.value},{dir:fo()}).catch(i)})})}else i(v)}).catch(i)}function p(){n(1,l.src=Qi(o),l)}function f(){o=this.value,n(0,o)}function d(_){qo[_?"unshift":"push"](()=>{l=_,n(1,l)})}return e.$$set=_=>{"onMessage"in _&&n(5,i=_.onMessage)},[o,l,s,c,p,i,f,d]}class kr extends J{constructor(t){super();K(this,t,Mr,yr,Y,{onMessage:5})}}var ve;(function(e){e[e.JSON=1]="JSON",e[e.Text=2]="Text",e[e.Binary=3]="Binary"})(ve||(ve={}));var Un=function(){function e(t,n){this.type=t,this.payload=n}return e.form=function(t){return new e("Form",t)},e.json=function(t){return new e("Json",t)},e.text=function(t){return new e("Text",t)},e.bytes=function(t){return new e("Bytes",t)},e}(),po=function(e){this.url=e.url,this.status=e.status,this.ok=this.status>=200&&this.status<300,this.headers=e.headers,this.data=e.data},ho=function(){function e(t){this.id=t}return e.prototype.drop=function(){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Http",message:{cmd:"dropClient",client:this.id}})]})})},e.prototype.request=function(t){return b(this,void 0,void 0,function(){var n;return y(this,function(i){return(n=!t.responseType||t.responseType===ve.JSON)&&(t.responseType=ve.Text),[2,k({__tauriModule:"Http",message:{cmd:"httpRequest",client:this.id,options:t}}).then(function(o){var l=new po(o);if(n){try{l.data=JSON.parse(l.data)}catch(s){if(l.ok&&l.data==="")l.data={};else if(l.ok)throw Error("Failed to parse response `"+l.data+"` as JSON: "+s+";\n try setting the `responseType` option to `ResponseType.Text` or `ResponseType.Binary` if the API does not return a JSON response.")}return l}return l})]})})},e.prototype.get=function(t,n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,this.request(dt({method:"GET",url:t},n))]})})},e.prototype.post=function(t,n,i){return b(this,void 0,void 0,function(){return y(this,function(o){return[2,this.request(dt({method:"POST",url:t,body:n},i))]})})},e.prototype.put=function(t,n,i){return b(this,void 0,void 0,function(){return y(this,function(o){return[2,this.request(dt({method:"PUT",url:t,body:n},i))]})})},e.prototype.patch=function(t,n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,this.request(dt({method:"PATCH",url:t},n))]})})},e.prototype.delete=function(t,n){return b(this,void 0,void 0,function(){return y(this,function(i){return[2,this.request(dt({method:"DELETE",url:t},n))]})})},e}();function In(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Http",message:{cmd:"createClient",options:e}}).then(function(n){return new ho(n)})]})})}var Nn=null;function Cr(e,t){var n;return b(this,void 0,void 0,function(){return y(this,function(i){switch(i.label){case 0:return Nn!==null?[3,2]:[4,In()];case 1:Nn=i.sent(),i.label=2;case 2:return[2,Nn.request(dt({url:e,method:(n=t==null?void 0:t.method)!==null&&n!==void 0?n:"GET"},t))]}})})}Object.freeze({__proto__:null,getClient:In,fetch:Cr,Body:Un,Client:ho,Response:po,get ResponseType(){return ve}});function Tr(e){let t,n,i,o,l,s,c,p,f,d,_,m,h,v,C,w,P;return{c(){t=u("form"),n=u("select"),i=u("option"),i.textContent="GET",o=u("option"),o.textContent="POST",l=u("option"),l.textContent="PUT",s=u("option"),s.textContent="PATCH",c=u("option"),c.textContent="DELETE",p=g(),f=u("input"),d=g(),_=u("br"),m=g(),h=u("textarea"),v=g(),C=u("button"),C.textContent="Make request",i.__value="GET",i.value=i.__value,o.__value="POST",o.value=o.__value,l.__value="PUT",l.value=l.__value,s.__value="PATCH",s.value=s.__value,c.__value="DELETE",c.value=c.__value,a(n,"class","button"),a(n,"id","request-method"),e[0]===void 0&&Hi(()=>e[5].call(n)),a(f,"id","request-url"),a(f,"placeholder","Type the request URL..."),a(h,"id","request-body"),a(h,"placeholder","Request body"),a(h,"rows","5"),ct(h,"width","100%"),ct(h,"margin-right","10px"),ct(h,"font-size","12px"),a(C,"class","button"),a(C,"id","make-request")},m(S,D){O(S,t,D),r(t,n),r(n,i),r(n,o),r(n,l),r(n,s),r(n,c),Xe(n,e[0]),r(t,p),r(t,f),A(f,e[1]),r(t,d),r(t,_),r(t,m),r(t,h),A(h,e[2]),r(t,v),r(t,C),w||(P=[T(n,"change",e[5]),T(f,"input",e[6]),T(h,"input",e[7]),T(t,"submit",Ke(e[3]))],w=!0)},p(S,[D]){D&1&&Xe(n,S[0]),D&2&&f.value!==S[1]&&A(f,S[1]),D&4&&A(h,S[2])},i:U,o:U,d(S){S&&W(t),w=!1,Z(P)}}}function Sr(e,t,n){let i="GET",o="https://jsonplaceholder.typicode.com/todos/1",l="",{onMessage:s}=t;async function c(){const _=await In(),v={url:o||""||"",method:i||"GET"||"GET"};l.startsWith("{")&&l.endsWith("}")||l.startsWith("[")&&l.endsWith("]")?v.body=Un.json(JSON.parse(l)):l!==""&&(v.body=Un.text(l)),_.request(v).then(s).catch(s)}function p(){i=Bi(this),n(0,i)}function f(){o=this.value,n(1,o)}function d(){l=this.value,n(2,l)}return e.$$set=_=>{"onMessage"in _&&n(4,s=_.onMessage)},[i,o,l,c,s,p,f,d]}class zr extends J{constructor(t){super();K(this,t,Sr,Tr,Y,{onMessage:4})}}function Pr(e){let t,n,i;return{c(){t=u("button"),t.textContent="Send test notification",a(t,"class","button"),a(t,"id","notification")},m(o,l){O(o,t,l),n||(i=T(t,"click",e[0]),n=!0)},p:U,i:U,o:U,d(o){o&&W(t),n=!1,i()}}}function mo(){new Notification("Notification title",{body:"This is the notification body"})}function Or(e,t,n){let{onMessage:i}=t;function o(){Notification.permission==="default"?Notification.requestPermission().then(function(l){l==="granted"?mo():i("Permission is "+l)}).catch(i):Notification.permission==="granted"?mo():i("Permission is denied")}return e.$$set=l=>{"onMessage"in l&&n(1,i=l.onMessage)},[o,i]}class Wr extends J{constructor(t){super();K(this,t,Or,Pr,Y,{onMessage:1})}}var Vt,Ze=function(e,t){this.type="Logical",this.width=e,this.height=t},Jt=function(){function e(t,n){this.type="Physical",this.width=t,this.height=n}return e.prototype.toLogical=function(t){return new Ze(this.width/t,this.height/t)},e}(),vo=function(e,t){this.type="Logical",this.x=e,this.y=t},Kt=function(){function e(t,n){this.type="Physical",this.x=t,this.y=n}return e.prototype.toLogical=function(t){return new vo(this.x/t,this.y/t)},e}();function Lr(){return new ge(window.__TAURI__.__currentWindow.label,{skip:!0})}function go(){return window.__TAURI__.__windows.map(function(e){return new ge(e.label,{skip:!0})})}(function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"})(Vt||(Vt={}));var _o=["tauri://created","tauri://error"],bo=function(){function e(t){try{this.label=t!=null?t:window.__TAURI__.__currentWindow.label}catch{this.label=""}this.listeners=Object.create(null)}return e.prototype.listen=function(t,n){return b(this,void 0,void 0,function(){var i=this;return y(this,function(o){return this._handleTauriEvent(t,n)?[2,Promise.resolve(function(){var l=i.listeners[t];l.splice(l.indexOf(n),1)})]:[2,Et(t,n)]})})},e.prototype.once=function(t,n){return b(this,void 0,void 0,function(){var i=this;return y(this,function(o){return this._handleTauriEvent(t,n)?[2,Promise.resolve(function(){var l=i.listeners[t];l.splice(l.indexOf(n),1)})]:[2,jn(t,n)]})})},e.prototype.emit=function(t,n){return b(this,void 0,void 0,function(){var i,o;return y(this,function(l){if(_o.includes(t)){for(i=0,o=this.listeners[t]||[];ie[31].call(n)),a(s,"type","checkbox"),a(d,"type","checkbox"),a(h,"title","Unminimizes after 2 seconds"),a(C,"title","Unminimizes after 2 seconds"),a(P,"title","Visible again after 2 seconds"),a(R,"type","checkbox"),a(G,"type","checkbox"),a(F,"type","checkbox"),a(ft,"type","checkbox"),a(et,"type","number"),a(et,"min","0"),a(et,"class","svelte-12ggtr4"),a(nt,"type","number"),a(nt,"min","0"),a(nt,"class","svelte-12ggtr4"),a(pt,"class","flex col grow svelte-12ggtr4"),a(it,"type","number"),a(it,"min","400"),a(it,"class","svelte-12ggtr4"),a(ot,"type","number"),a(ot,"min","400"),a(ot,"class","svelte-12ggtr4"),a(ht,"class","flex col grow svelte-12ggtr4"),a(mt,"type","number"),a(mt,"class","svelte-12ggtr4"),a(vt,"type","number"),a(vt,"class","svelte-12ggtr4"),a(N,"class","flex col grow svelte-12ggtr4"),a(st,"type","number"),a(st,"min","400"),a(st,"class","svelte-12ggtr4"),a(at,"type","number"),a(at,"min","400"),a(at,"class","svelte-12ggtr4"),a(Ut,"class","flex col grow svelte-12ggtr4"),a(x,"class","window-controls flex flex-row svelte-12ggtr4"),a(t,"class","flex col"),a(Xt,"class","svelte-12ggtr4"),a(Qt,"class","svelte-12ggtr4"),a(gt,"class","grow window-property svelte-12ggtr4"),a(Zt,"class","svelte-12ggtr4"),a(xt,"class","svelte-12ggtr4"),a(_t,"class","grow window-property svelte-12ggtr4"),a(It,"class","flex"),a(te,"class","svelte-12ggtr4"),a(ee,"class","svelte-12ggtr4"),a(bt,"class","grow window-property svelte-12ggtr4"),a(ne,"class","svelte-12ggtr4"),a(ie,"class","svelte-12ggtr4"),a(yt,"class","grow window-property svelte-12ggtr4"),a(Nt,"class","flex"),a(oe,"class","svelte-12ggtr4"),a(re,"class","svelte-12ggtr4"),a(wt,"class","grow window-property svelte-12ggtr4"),a(le,"class","svelte-12ggtr4"),a(ue,"class","svelte-12ggtr4"),a(Mt,"class","grow window-property svelte-12ggtr4"),a(qt,"class","flex"),a(se,"class","svelte-12ggtr4"),a(ae,"class","svelte-12ggtr4"),a(kt,"class","grow window-property svelte-12ggtr4"),a(ce,"class","svelte-12ggtr4"),a(de,"class","svelte-12ggtr4"),a(Ct,"class","grow window-property svelte-12ggtr4"),a(Ht,"class","flex"),a(Pt,"id","title"),a(fe,"class","button"),a(fe,"type","submit"),ct(Tt,"margin-top","24px"),a(Ot,"id","url"),a(pe,"class","button"),a(pe,"id","open-url"),ct(St,"margin-top","24px"),a(Wt,"class","button"),a(Wt,"title","Minimizes the window, requests attention for 3s and then resets it"),a(Bt,"class","button")},m(M,E){O(M,t,E),r(t,n);for(let $=0;${n(20,G=N),n(7,h=G.width),n(8,v=G.height)}),o[i].outerSize().then(N=>{n(21,B=N)})}function ye(){o[i].innerPosition().then(N=>{n(18,L=N)}),o[i].outerPosition().then(N=>{n(19,I=N),n(13,D=I.x),n(14,R=I.y)})}async function Yt(N){Q&&Q(),tt&&tt(),tt=await N.listen("tauri://move",ye),Q=await N.listen("tauri://resize",At)}async function x(){await o[i].minimize(),await o[i].requestUserAttention(Vt.Critical),await new Promise(N=>setTimeout(N,3e3)),await o[i].requestUserAttention(null)}function pt(){i=Bi(this),n(0,i),n(1,o)}function Dt(){c=this.checked,n(2,c)}function we(){p=this.checked,n(3,p)}const et=()=>o[i].center();function Me(){f=this.checked,n(16,f)}function jt(){d=this.checked,n(4,d)}function ke(){_=this.checked,n(5,_)}function nt(){m=this.checked,n(6,m)}function Ce(){D=V(this.value),n(13,D)}function ht(){R=V(this.value),n(14,R)}function Ft(){h=V(this.value),n(7,h)}function Te(){v=V(this.value),n(8,v)}function it(){C=V(this.value),n(9,C)}function Se(){w=V(this.value),n(10,w)}function Rt(){P=V(this.value),n(11,P)}function ze(){S=V(this.value),n(12,S)}function ot(){F=this.value,n(22,F)}function Pe(){s=this.value,n(15,s)}return e.$$set=N=>{"onMessage"in N&&n(30,l=N.onMessage)},e.$$.update=()=>{e.$$.dirty[0]&7&&o[i].setResizable(c),e.$$.dirty[0]&11&&(p?o[i].maximize():o[i].unmaximize()),e.$$.dirty[0]&19&&o[i].setDecorations(d),e.$$.dirty[0]&35&&o[i].setAlwaysOnTop(_),e.$$.dirty[0]&67&&o[i].setFullscreen(m),e.$$.dirty[0]&387&&o[i].setSize(new Jt(h,v)),e.$$.dirty[0]&1539&&(C&&w?o[i].setMinSize(new Ze(C,w)):o[i].setMinSize(null)),e.$$.dirty[0]&6147&&(P&&S?o[i].setMaxSize(new Ze(P,S)):o[i].setMaxSize(null)),e.$$.dirty[0]&24579&&o[i].setPosition(new Kt(D,R)),e.$$.dirty[0]&3&&o[i].scaleFactor().then(N=>n(17,j=N)),e.$$.dirty[0]&3&&Yt(o[i])},[i,o,c,p,d,_,m,h,v,C,w,P,S,D,R,s,f,j,L,I,G,B,F,rt,q,ut,ft,_e,be,x,l,pt,Dt,we,et,Me,jt,ke,nt,Ce,ht,Ft,Te,it,Se,Rt,ze,ot,Pe]}class Rr extends J{constructor(t){super();K(this,t,Fr,jr,Y,{onMessage:30},[-1,-1])}}function ko(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"register",shortcut:e,handler:Lt(t)}})]})})}function Ur(e,t){return b(this,void 0,void 0,function(){return y(this,function(n){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"registerAll",shortcuts:e,handler:Lt(t)}})]})})}function Ir(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"isRegistered",shortcut:e}})]})})}function Co(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"unregister",shortcut:e}})]})})}function To(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"GlobalShortcut",message:{cmd:"unregisterAll"}})]})})}Object.freeze({__proto__:null,register:ko,registerAll:Ur,isRegistered:Ir,unregister:Co,unregisterAll:To});function So(e,t,n){const i=e.slice();return i[9]=t[n],i}function zo(e){let t,n=e[9]+"",i,o,l,s,c;function p(){return e[8](e[9])}return{c(){t=u("div"),i=z(n),o=g(),l=u("button"),l.textContent="Unregister",a(l,"type","button")},m(f,d){O(f,t,d),r(t,i),r(t,o),r(t,l),s||(c=T(l,"click",p),s=!0)},p(f,d){e=f,d&2&&n!==(n=e[9]+"")&&H(i,n)},d(f){f&&W(t),s=!1,c()}}}function Po(e){let t,n,i;return{c(){t=u("button"),t.textContent="Unregister all",a(t,"type","button")},m(o,l){O(o,t,l),n||(i=T(t,"click",e[5]),n=!0)},p:U,d(o){o&&W(t),n=!1,i()}}}function Nr(e){let t,n,i,o,l,s,c,p,f,d,_=e[1],m=[];for(let v=0;v<_.length;v+=1)m[v]=zo(So(e,_,v));let h=e[1].length&&Po(e);return{c(){t=u("div"),n=u("div"),i=u("input"),o=g(),l=u("button"),l.textContent="Register",s=g(),c=u("div");for(let v=0;vn(1,i=m));let s="CmdOrControl+X";function c(){const m=s;ko(m,()=>{o(`Shortcut ${m} triggered`)}).then(()=>{l.update(h=>[...h,m]),o(`Shortcut ${m} registered successfully`)}).catch(o)}function p(m){const h=m;Co(h).then(()=>{l.update(v=>v.filter(C=>C!==h)),o(`Shortcut ${h} unregistered`)}).catch(o)}function f(){To().then(()=>{l.update(()=>[]),o("Unregistered all shortcuts")}).catch(o)}function d(){s=this.value,n(0,s)}const _=m=>p(m);return e.$$set=m=>{"onMessage"in m&&n(6,o=m.onMessage)},[s,i,l,c,p,f,o,d,_]}class Hr extends J{constructor(t){super();K(this,t,qr,Nr,Y,{onMessage:6})}}function Oo(e){let t,n,i,o,l;return{c(){t=u("input"),n=g(),i=u("button"),i.textContent="Write",a(t,"placeholder","write to stdin"),a(i,"class","button")},m(s,c){O(s,t,c),A(t,e[3]),O(s,n,c),O(s,i,c),o||(l=[T(t,"input",e[10]),T(i,"click",e[7])],o=!0)},p(s,c){c&8&&t.value!==s[3]&&A(t,s[3])},d(s){s&&W(t),s&&W(n),s&&W(i),o=!1,Z(l)}}}function Br(e){let t,n,i,o,l,s,c,p,f,d,_,m,h,v,C,w=e[4]&&Oo(e);return{c(){t=u("div"),n=u("div"),i=u("input"),o=g(),l=u("button"),l.textContent="Run",s=g(),c=u("button"),c.textContent="Kill",p=g(),w&&w.c(),f=g(),d=u("div"),_=u("input"),m=g(),h=u("input"),a(l,"class","button"),a(c,"class","button"),a(_,"placeholder","Working directory"),a(h,"placeholder","Environment variables"),ct(h,"width","300px")},m(P,S){O(P,t,S),r(t,n),r(n,i),A(i,e[0]),r(n,o),r(n,l),r(n,s),r(n,c),r(n,p),w&&w.m(n,null),r(t,f),r(t,d),r(d,_),A(_,e[1]),r(d,m),r(d,h),A(h,e[2]),v||(C=[T(i,"input",e[9]),T(l,"click",e[5]),T(c,"click",e[6]),T(_,"input",e[11]),T(h,"input",e[12])],v=!0)},p(P,[S]){S&1&&i.value!==P[0]&&A(i,P[0]),P[4]?w?w.p(P,S):(w=Oo(P),w.c(),w.m(n,null)):w&&(w.d(1),w=null),S&2&&_.value!==P[1]&&A(_,P[1]),S&4&&h.value!==P[2]&&A(h,P[2])},i:U,o:U,d(P){P&&W(t),w&&w.d(),v=!1,Z(C)}}}function Gr(e,t,n){const i=navigator.userAgent.includes("Windows");let o=i?"cmd":"sh",l=i?["/C"]:["-c"],{onMessage:s}=t,c='echo "hello world"',p=null,f="SOMETHING=value ANOTHER=2",d="",_;function m(){return f.split(" ").reduce((R,j)=>{let[L,I]=j.split("=");return qi(Ni({},R),{[L]:I})},{})}function h(){n(4,_=null);const R=new xi(o,[...l,c],{cwd:p||null,env:m()});R.on("close",j=>{s(`command finished with code ${j.code} and signal ${j.signal}`),n(4,_=null)}),R.on("error",j=>s(`command error: "${j}"`)),R.stdout.on("data",j=>s(`command stdout: "${j}"`)),R.stderr.on("data",j=>s(`command stderr: "${j}"`)),R.spawn().then(j=>{n(4,_=j)}).catch(s)}function v(){_.kill().then(()=>s("killed child process")).catch(s)}function C(){_.write(d).catch(s)}function w(){c=this.value,n(0,c)}function P(){d=this.value,n(3,d)}function S(){p=this.value,n(1,p)}function D(){f=this.value,n(2,f)}return e.$$set=R=>{"onMessage"in R&&n(8,s=R.onMessage)},[c,p,f,d,_,h,v,C,s,w,P,S,D]}class $r extends J{constructor(t){super();K(this,t,Gr,Br,Y,{onMessage:8})}}function Wo(){return b(this,void 0,void 0,function(){function e(){t&&t(),t=void 0}var t;return y(this,function(n){return[2,new Promise(function(i,o){Et("tauri://update-status",function(l){var s;(s=l==null?void 0:l.payload).error?(e(),o(s.error)):s.status==="DONE"&&(e(),i())}).then(function(l){t=l}).catch(function(l){throw e(),l}),Qe("tauri://update-install").catch(function(l){throw e(),l})})]})})}function Lo(){return b(this,void 0,void 0,function(){function e(){t&&t(),t=void 0}var t;return y(this,function(n){return[2,new Promise(function(i,o){jn("tauri://update-available",function(l){var s;s=l==null?void 0:l.payload,e(),i({manifest:s,shouldUpdate:!0})}).catch(function(l){throw e(),l}),Et("tauri://update-status",function(l){var s;(s=l==null?void 0:l.payload).error?(e(),o(s.error)):s.status==="UPTODATE"&&(e(),i({shouldUpdate:!1}))}).then(function(l){t=l}).catch(function(l){throw e(),l}),Qe("tauri://update").catch(function(l){throw e(),l})})]})})}Object.freeze({__proto__:null,installUpdate:Wo,checkUpdate:Lo});function Vr(e){let t,n,i,o,l,s;return{c(){t=u("div"),n=u("button"),n.textContent="Check update",i=g(),o=u("button"),o.textContent="Install update",a(n,"class","button"),a(n,"id","check_update"),a(o,"class","button hidden"),a(o,"id","start_update")},m(c,p){O(c,t,p),r(t,n),r(t,i),r(t,o),l||(s=[T(n,"click",e[0]),T(o,"click",e[1])],l=!0)},p:U,i:U,o:U,d(c){c&&W(t),l=!1,Z(s)}}}function Jr(e,t,n){let{onMessage:i}=t,o;he(async()=>{o=await Et("tauri://update-status",i)}),Wn(()=>{o&&o()});async function l(){try{document.getElementById("check_update").classList.add("hidden");const{shouldUpdate:c,manifest:p}=await Lo();i(`Should update: ${c}`),i(p),c&&document.getElementById("start_update").classList.remove("hidden")}catch(c){i(c)}}async function s(){try{document.getElementById("start_update").classList.add("hidden"),await Wo(),i("Installation complete, restart required."),await Dn()}catch(c){i(c)}}return e.$$set=c=>{"onMessage"in c&&n(2,i=c.onMessage)},[l,s,i]}class Kr extends J{constructor(t){super();K(this,t,Jr,Vr,Y,{onMessage:2})}}function Eo(e){return b(this,void 0,void 0,function(){return y(this,function(t){return[2,k({__tauriModule:"Clipboard",message:{cmd:"writeText",data:e}})]})})}function Ao(){return b(this,void 0,void 0,function(){return y(this,function(e){return[2,k({__tauriModule:"Clipboard",message:{cmd:"readText"}})]})})}Object.freeze({__proto__:null,writeText:Eo,readText:Ao});function Yr(e){let t,n,i,o,l,s,c,p,f;return{c(){t=u("div"),n=u("div"),i=u("input"),o=g(),l=u("button"),l.textContent="Write",s=g(),c=u("button"),c.textContent="Read",a(i,"placeholder","Text to write to the clipboard"),a(l,"type","button"),a(c,"type","button")},m(d,_){O(d,t,_),r(t,n),r(n,i),A(i,e[0]),r(n,o),r(n,l),r(t,s),r(t,c),p||(f=[T(i,"input",e[4]),T(l,"click",e[1]),T(c,"click",e[2])],p=!0)},p(d,[_]){_&1&&i.value!==d[0]&&A(i,d[0])},i:U,o:U,d(d){d&&W(t),p=!1,Z(f)}}}function Xr(e,t,n){let{onMessage:i}=t,o="clipboard message";function l(){Eo(o).then(()=>{i("Wrote to the clipboard")}).catch(i)}function s(){Ao().then(p=>{i(`Clipboard contents: ${p}`)}).catch(i)}function c(){o=this.value,n(0,o)}return e.$$set=p=>{"onMessage"in p&&n(3,i=p.onMessage)},[o,l,s,i,c]}class Qr extends J{constructor(t){super();K(this,t,Xr,Yr,Y,{onMessage:3})}}function Zr(e){let t;return{c(){t=u("div"),t.innerHTML=`

    Not available for Linux

    + `},m(n,i){O(n,t,i)},p:U,i:U,o:U,d(n){n&&W(t)}}}function xr(e,t,n){let{onMessage:i}=t;const o=window.constraints={audio:!0,video:!0};function l(c){const p=document.querySelector("video"),f=c.getVideoTracks();i("Got stream with constraints:",o),i(`Using video device: ${f[0].label}`),window.stream=c,p.srcObject=c}function s(c){if(c.name==="ConstraintNotSatisfiedError"){const p=o.video;i(`The resolution ${p.width.exact}x${p.height.exact} px is not supported by your device.`)}else c.name==="PermissionDeniedError"&&i("Permissions have not been granted to use your camera and microphone, you need to allow the page access to your devices in order for the demo to work.");i(`getUserMedia error: ${c.name}`,c)}return he(async()=>{try{const c=await navigator.mediaDevices.getUserMedia(o);l(c)}catch(c){s(c)}}),Wn(()=>{window.stream.getTracks().forEach(function(c){c.stop()})}),e.$$set=c=>{"onMessage"in c&&n(0,i=c.onMessage)},[i]}class tl extends J{constructor(t){super();K(this,t,xr,Zr,Y,{onMessage:0})}}function el(e){let t,n,i,o,l,s,c,p,f,d,_,m;return{c(){t=u("input"),n=g(),i=u("input"),o=g(),l=u("button"),l.textContent="Post it.",s=g(),c=u("p"),c.textContent="Result:",p=g(),f=u("pre"),d=z(e[2]),a(l,"type","button")},m(h,v){O(h,t,v),A(t,e[0]),O(h,n,v),O(h,i,v),A(i,e[1]),O(h,o,v),O(h,l,v),O(h,s,v),O(h,c,v),O(h,p,v),O(h,f,v),r(f,d),_||(m=[T(t,"input",e[4]),T(i,"input",e[5]),T(l,"click",e[3])],_=!0)},p(h,[v]){v&1&&t.value!==h[0]&&A(t,h[0]),v&2&&i.value!==h[1]&&A(i,h[1]),v&4&&H(d,h[2])},i:U,o:U,d(h){h&&W(t),h&&W(n),h&&W(i),h&&W(o),h&&W(l),h&&W(s),h&&W(c),h&&W(p),h&&W(f),_=!1,Z(m)}}}function nl(e,t,n){let i="baz",o="qux",l=null;async function s(){let f=navigator.userAgent.includes("Windows")?"https://customprotocol.test/example.html":"customprotocol://test/example.html";const _=await(await fetch(f,{method:"POST",body:JSON.stringify({foo:i,bar:o})})).json();n(2,l=JSON.stringify(_))}function c(){i=this.value,n(0,i)}function p(){o=this.value,n(1,o)}return[i,o,l,s,c,p]}class il extends J{constructor(t){super();K(this,t,nl,el,Y,{})}}function Do(e,t,n){const i=e.slice();return i[9]=t[n],i}function jo(e){let t,n=e[9].label+"",i,o,l,s,c;function p(){return e[7](e[9])}return{c(){t=u("p"),i=z(n),o=g(),a(t,"class",l="nv noselect "+(e[0]===e[9]?"nv_selected":""))},m(f,d){O(f,t,d),r(t,i),r(t,o),s||(c=T(t,"click",p),s=!0)},p(f,d){e=f,d&1&&l!==(l="nv noselect "+(e[0]===e[9]?"nv_selected":""))&&a(t,"class",l)},d(f){f&&W(t),s=!1,c()}}}function ol(e){let t,n,i,o,l,s,c,p,f,d,_,m,h,v,C,w,P,S,D,R,j,L,I,G=e[2],B=[];for(let F=0;FDocumentation Github - Source`,c=g(),p=s("div"),f=s("div");for(let F=0;F{Yi(q,1)}),Bo()}Q?(m=new Q(tt(F)),$i(m.$$.fragment),Ki(m.$$.fragment,1),Vi(m,_,null)):m=null}(!j||rt&2)&&R.p(F[1])},i(F){j||(m&&Ki(m.$$.fragment,F),j=!0)},o(F){m&&Ji(m.$$.fragment,F),j=!1},d(F){F&&W(t),Ye(B,F),m&&Yi(m),L=!1,Z(I)}}}const rl="ctrl+b";function ll(e,t,n){he(()=>{Vo(rl,()=>{me("menu_toggle")})});const i=[{label:"Welcome",component:Qo},{label:"Messages",component:ir},{label:"CLI",component:tr},{label:"Dialog",component:br},{label:"File system",component:kr},{label:"HTTP",component:zr},{label:"HTTP Form",component:il},{label:"Notifications",component:Wr},{label:"Window",component:Rr},{label:"Shortcuts",component:Hr},{label:"Shell",component:$r},{label:"Updater",component:Kr},{label:"Clipboard",component:Qr},{label:"WebRTC",component:tl}];let o=i[0],l=Gi([]),u="";function c(m){n(0,o=m)}function p(m){l.update(h=>[`[${new Date().toLocaleTimeString()}]: `+(typeof m=="string"?m:JSON.stringify(m)),...h])}function f(){An("https://tauri.studio/")}return he(()=>{l.subscribe(m=>{n(1,u=m.join(` -`))})}),[o,u,i,l,c,p,f,m=>c(m),()=>{l.update(()=>[])}]}class sl extends J{constructor(t){super();K(this,t,ll,ol,Y,{})}}new sl({target:document.body}); + Source`,c=g(),p=u("div"),f=u("div");for(let F=0;F{Yi(q,1)}),Bo()}Q?(m=new Q(tt(F)),$i(m.$$.fragment),Ki(m.$$.fragment,1),Vi(m,_,null)):m=null}(!j||rt&2)&&R.p(F[1])},i(F){j||(m&&Ki(m.$$.fragment,F),j=!0)},o(F){m&&Ji(m.$$.fragment,F),j=!1},d(F){F&&W(t),Ye(B,F),m&&Yi(m),L=!1,Z(I)}}}const rl="ctrl+b";function ll(e,t,n){he(()=>{Vo(rl,()=>{me("menu_toggle")})});const i=[{label:"Welcome",component:Qo},{label:"Messages",component:ir},{label:"CLI",component:tr},{label:"Dialog",component:br},{label:"File system",component:kr},{label:"HTTP",component:zr},{label:"HTTP Form",component:il},{label:"Notifications",component:Wr},{label:"Window",component:Rr},{label:"Shortcuts",component:Hr},{label:"Shell",component:$r},{label:"Updater",component:Kr},{label:"Clipboard",component:Qr},{label:"WebRTC",component:tl}];let o=i[0],l=Gi([]),s="";function c(m){n(0,o=m)}function p(m){l.update(h=>[`[${new Date().toLocaleTimeString()}]: `+(typeof m=="string"?m:JSON.stringify(m)),...h])}function f(){An("https://tauri.studio/")}return he(()=>{l.subscribe(m=>{n(1,s=m.join(` +`))})}),[o,s,i,l,c,p,f,m=>c(m),()=>{l.update(()=>[])}]}class ul extends J{constructor(t){super();K(this,t,ll,ol,Y,{})}}new ul({target:document.body}); diff --git a/examples/api/dist/index.html b/examples/api/dist/index.html index 1037ea7c3fc..dfd6f42e777 100644 --- a/examples/api/dist/index.html +++ b/examples/api/dist/index.html @@ -6,7 +6,7 @@ Svelte + Vite App - + diff --git a/examples/api/src-tauri/Cargo.lock b/examples/api/src-tauri/Cargo.lock index 11d1a0076da..1f1e2a3d368 100644 --- a/examples/api/src-tauri/Cargo.lock +++ b/examples/api/src-tauri/Cargo.lock @@ -103,8 +103,8 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "badcf670157c84bb8b1cf6b5f70b650fed78da2033c9eed84c4e49b11cbe83ea" dependencies = [ - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "glib-sys", + "gobject-sys", "libc", "system-deps 3.2.0", ] @@ -270,7 +270,7 @@ version = "0.14.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b448b876970834fda82ba3aeaccadbd760206b75388fc5c1b02f1e343b697570" dependencies = [ - "glib-sys 0.14.0", + "glib-sys", "libc", "system-deps 3.2.0", ] @@ -345,9 +345,9 @@ dependencies = [ [[package]] name = "clap" -version = "3.0.0-rc.4" +version = "3.0.0-rc.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "967965e82fc46fee1a88147a7a977a66d615ed5f83eb95b18577b342c08f90ff" +checksum = "9468f8012246b0836c6fd11725102b0844254985f2462b6c637d50040ef49df0" dependencies = [ "atty", "bitflags", @@ -983,9 +983,9 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f097c0704201fbc8f69c1762dc58c6947c8bb188b8ed0bc7e65259f1894fe590" dependencies = [ - "gio-sys 0.14.0", - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", "system-deps 3.2.0", ] @@ -998,9 +998,9 @@ checksum = "0e091b3d3d6696949ac3b3fb3c62090e5bfd7bd6850bef5c3c5ea701de1b1f1e" dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", - "gio-sys 0.14.0", - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", "pango-sys", "pkg-config", @@ -1062,34 +1062,21 @@ dependencies = [ "futures-channel", "futures-core", "futures-io", - "gio-sys 0.14.0", + "gio-sys", "glib", "libc", "once_cell", "thiserror", ] -[[package]] -name = "gio-sys" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e24fb752f8f5d2cf6bbc2c606fd2bc989c81c5e2fe321ab974d54f8b6344eac" -dependencies = [ - "glib-sys 0.10.1", - "gobject-sys 0.10.0", - "libc", - "system-deps 1.3.2", - "winapi", -] - [[package]] name = "gio-sys" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0a41df66e57fcc287c4bcf74fc26b884f31901ea9792ec75607289b456f48fa" dependencies = [ - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "glib-sys", + "gobject-sys", "libc", "system-deps 3.2.0", "winapi", @@ -1107,8 +1094,8 @@ dependencies = [ "futures-executor", "futures-task", "glib-macros", - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "glib-sys", + "gobject-sys", "libc", "once_cell", "smallvec", @@ -1121,7 +1108,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2aad66361f66796bfc73f530c51ef123970eb895ffba991a234fcf7bea89e518" dependencies = [ "anyhow", - "heck", + "heck 0.3.3", "proc-macro-crate 1.1.0", "proc-macro-error", "proc-macro2", @@ -1129,16 +1116,6 @@ dependencies = [ "syn", ] -[[package]] -name = "glib-sys" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7e9b997a66e9a23d073f2b1abb4dbfc3925e0b8952f67efd8d9b6e168e4cdc1" -dependencies = [ - "libc", - "system-deps 1.3.2", -] - [[package]] name = "glib-sys" version = "0.14.0" @@ -1162,24 +1139,13 @@ dependencies = [ "regex", ] -[[package]] -name = "gobject-sys" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "952133b60c318a62bf82ee75b93acc7e84028a093e06b9e27981c2b6fe68218c" -dependencies = [ - "glib-sys 0.10.1", - "libc", - "system-deps 1.3.2", -] - [[package]] name = "gobject-sys" version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa92cae29759dae34ab5921d73fff5ad54b3d794ab842c117e36cafc7994c3f5" dependencies = [ - "glib-sys 0.14.0", + "glib-sys", "libc", "system-deps 3.2.0", ] @@ -1217,9 +1183,9 @@ dependencies = [ "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", - "gio-sys 0.14.0", - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", "pango-sys", "system-deps 3.2.0", @@ -1232,7 +1198,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21de1da96dc117443fb03c2e270b2d34b7de98d0a79a19bbb689476173745b79" dependencies = [ "anyhow", - "heck", + "heck 0.3.3", "proc-macro-crate 1.1.0", "proc-macro-error", "proc-macro2", @@ -1255,6 +1221,12 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "heck" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" + [[package]] name = "hermit-abi" version = "0.1.19" @@ -1409,8 +1381,8 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2adf2de824b178d76c6017da59f4e7e95de49a766b584c59d47821a6c3dce9e2" dependencies = [ - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "glib-sys", + "gobject-sys", "libc", "system-deps 5.0.0", ] @@ -1870,9 +1842,9 @@ dependencies = [ [[package]] name = "os_info" -version = "3.0.8" +version = "3.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5501659840950e918d046ad97ebe9702cbb4ec0097e47dbd27abf7692223181" +checksum = "b89dd55b8d8d97dabd0d1adc625d188378fcf87632825bfe9c956acc9a11a72a" dependencies = [ "log", "serde", @@ -1917,8 +1889,8 @@ version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2367099ca5e761546ba1d501955079f097caa186bb53ce0f718dca99ac1942fe" dependencies = [ - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "glib-sys", + "gobject-sys", "libc", "system-deps 3.2.0", ] @@ -2414,14 +2386,14 @@ dependencies = [ [[package]] name = "rfd" -version = "0.6.1" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df102be679ae47c269a6393851bc2cff8760173e7e67a2f1e8110d6578b7c555" +checksum = "6b0c25b610bf37d9874ff224ab2791ff2272bedeb5638a2dca8b18e1270ed69b" dependencies = [ "block", "dispatch", - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "glib-sys", + "gobject-sys", "gtk-sys", "js-sys", "lazy_static", @@ -2432,7 +2404,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows 0.28.0", + "windows 0.29.0", ] [[package]] @@ -2678,18 +2650,17 @@ dependencies = [ ] [[package]] -name = "soup-sys" -version = "0.10.0" +name = "soup2-sys" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7adf08565630bbb71f955f11f8a68464817ded2703a3549747c235b58a13e" +checksum = "9f056675eda9a7417163e5f742bb119e8e1d385edd2ada8f7031a7230a3ec10a" dependencies = [ "bitflags", - "gio-sys 0.10.1", - "glib-sys 0.10.1", - "gobject-sys 0.10.0", + "gio-sys", + "glib-sys", + "gobject-sys", "libc", - "pkg-config", - "system-deps 1.3.2", + "system-deps 5.0.0", ] [[package]] @@ -2751,12 +2722,6 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" -[[package]] -name = "strum" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" - [[package]] name = "strum" version = "0.21.0" @@ -2772,25 +2737,13 @@ dependencies = [ "strum_macros 0.22.0", ] -[[package]] -name = "strum_macros" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "strum_macros" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2", "quote", "syn", @@ -2802,7 +2755,7 @@ version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "339f799d8b549e3744c7ac7feb216383e4005d94bdb22561b3ab8f3b808ae9fb" dependencies = [ - "heck", + "heck 0.3.3", "proc-macro2", "quote", "syn", @@ -2819,21 +2772,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "system-deps" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3ecc17269a19353b3558b313bba738b25d82993e30d62a18406a24aba4649b" -dependencies = [ - "heck", - "pkg-config", - "strum 0.18.0", - "strum_macros 0.18.0", - "thiserror", - "toml", - "version-compare 0.0.10", -] - [[package]] name = "system-deps" version = "3.2.0" @@ -2842,14 +2780,14 @@ checksum = "480c269f870722b3b08d2f13053ce0c2ab722839f472863c3e2d61ff3a1c2fa6" dependencies = [ "anyhow", "cfg-expr 0.8.1", - "heck", + "heck 0.3.3", "itertools", "pkg-config", "strum 0.21.0", "strum_macros 0.21.1", "thiserror", "toml", - "version-compare 0.0.11", + "version-compare", ] [[package]] @@ -2859,10 +2797,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18db855554db7bd0e73e06cf7ba3df39f97812cb11d3f75e71c39bf45171797e" dependencies = [ "cfg-expr 0.9.0", - "heck", + "heck 0.3.3", "pkg-config", "toml", - "version-compare 0.0.11", + "version-compare", ] [[package]] @@ -2884,7 +2822,7 @@ dependencies = [ "gdk-sys", "gio", "glib", - "glib-sys 0.14.0", + "glib-sys", "gtk", "instant", "lazy_static", @@ -3037,7 +2975,7 @@ dependencies = [ name = "tauri-utils" version = "1.0.0-beta.3" dependencies = [ - "heck", + "heck 0.4.0", "html5ever", "kuchiki", "phf 0.10.0", @@ -3152,11 +3090,10 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144" +checksum = "fbbf1c778ec206785635ce8ad57fe52b3009ae9e0c9f574a728f3049d3e55838" dependencies = [ - "autocfg", "bytes", "memchr", "num_cpus", @@ -3306,12 +3243,6 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" -[[package]] -name = "version-compare" -version = "0.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d63556a25bae6ea31b52e640d7c41d1ab27faba4ccb600013837a3d0b3994ca1" - [[package]] name = "version-compare" version = "0.0.11" @@ -3437,19 +3368,19 @@ dependencies = [ [[package]] name = "webkit2gtk" -version = "0.15.3" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5725e8ede878b7c00419066868085b83fb7d01eea904c1a0bd0159ad3ce0ba3" +checksum = "07654baccd8874fc7c99cc33c27052fb02804276102dff0f78f981669316e0e9" dependencies = [ "bitflags", "cairo-rs", "gdk", "gdk-sys", "gio", - "gio-sys 0.14.0", + "gio-sys", "glib", - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "glib-sys", + "gobject-sys", "gtk", "gtk-sys", "javascriptcore-rs", @@ -3460,24 +3391,24 @@ dependencies = [ [[package]] name = "webkit2gtk-sys" -version = "0.15.2" +version = "0.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b34314407e381b88a72610d0f4eeff1552cbf8ee5420dbe84749fa26aa11b4e3" +checksum = "854a0cbf3570541bf13df70aac23826da7cd88f27a722b7b2043f32637373113" dependencies = [ "atk-sys", "bitflags", "cairo-sys-rs", "gdk-pixbuf-sys", "gdk-sys", - "gio-sys 0.14.0", - "glib-sys 0.14.0", - "gobject-sys 0.14.0", + "gio-sys", + "glib-sys", + "gobject-sys", "gtk-sys", "javascriptcore-rs-sys", "libc", "pango-sys", "pkg-config", - "soup-sys", + "soup2-sys", "system-deps 5.0.0", ] @@ -3592,24 +3523,15 @@ dependencies = [ [[package]] name = "windows" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054d31561409bbf7e1ee4a4f0a1233ac2bb79cfadf2a398438a04d8dda69225f" -dependencies = [ - "windows-sys", -] - -[[package]] -name = "windows-sys" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82ca39602d5cbfa692c4b67e3bcbb2751477355141c1ed434c94da4186836ff6" +checksum = "aac7fef12f4b59cd0a29339406cc9203ab44e440ddff6b3f5a41455349fa9cf3" dependencies = [ - "windows_aarch64_msvc 0.28.0", - "windows_i686_gnu 0.28.0", - "windows_i686_msvc 0.28.0", - "windows_x86_64_gnu 0.28.0", - "windows_x86_64_msvc 0.28.0", + "windows_aarch64_msvc 0.29.0", + "windows_i686_gnu 0.29.0", + "windows_i686_msvc 0.29.0", + "windows_x86_64_gnu 0.29.0", + "windows_x86_64_msvc 0.29.0", ] [[package]] @@ -3620,9 +3542,9 @@ checksum = "3022d174000fcaeb6f95933fb04171ea0e21b9289ac57fe4400bfa148e41df79" [[package]] name = "windows_aarch64_msvc" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52695a41e536859d5308cc613b4a022261a274390b25bd29dfff4bf08505f3c2" +checksum = "c3d027175d00b01e0cbeb97d6ab6ebe03b12330a35786cbaca5252b1c4bf5d9b" [[package]] name = "windows_gen" @@ -3648,9 +3570,9 @@ checksum = "03b1584eebf06654708eab4301152032c13c1e47f4a754ffc93c733f10993e85" [[package]] name = "windows_i686_gnu" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f54725ac23affef038fecb177de6c9bf065787c2f432f79e3c373da92f3e1d8a" +checksum = "8793f59f7b8e8b01eda1a652b2697d87b93097198ae85f823b969ca5b89bba58" [[package]] name = "windows_i686_msvc" @@ -3666,9 +3588,9 @@ checksum = "f49df16591e9ad429997ec57d462b0cc45168f639d03489e8c2e933ea9c389d7" [[package]] name = "windows_i686_msvc" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d5158a43cc43623c0729d1ad6647e62fa384a3d135fd15108d37c683461f64" +checksum = "8602f6c418b67024be2996c512f5f995de3ba417f4c75af68401ab8756796ae4" [[package]] name = "windows_macros" @@ -3708,9 +3630,9 @@ checksum = "2cb06177184100374f97d5e7261ee0b6adefa8ee32e38f87518ca22b519bb80e" [[package]] name = "windows_x86_64_gnu" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc31f409f565611535130cfe7ee8e6655d3fa99c1c61013981e491921b5ce954" +checksum = "f3d615f419543e0bd7d2b3323af0d86ff19cbc4f816e6453f36a2c2ce889c354" [[package]] name = "windows_x86_64_msvc" @@ -3726,9 +3648,9 @@ checksum = "c3c27bcbb33ddbed3569e36c14775c99f72b97c72ce49f81d128637fb48a061f" [[package]] name = "windows_x86_64_msvc" -version = "0.28.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2b8c7cbd3bfdddd9ab98769f9746a7fad1bca236554cd032b78d768bc0e89f" +checksum = "11d95421d9ed3672c280884da53201a5c46b7b2765ca6faf34b0d71cf34a3561" [[package]] name = "winres" @@ -3753,7 +3675,7 @@ dependencies = [ [[package]] name = "wry" version = "0.12.2" -source = "git+https://github.com/tauri-apps/wry?rev=11557f15cf759fcf3008598b684c009f03a8c645#11557f15cf759fcf3008598b684c009f03a8c645" +source = "git+https://github.com/tauri-apps/wry?rev=81e92bd2539a27cd2aa169adc6a52f4f78e00292#81e92bd2539a27cd2aa169adc6a52f4f78e00292" dependencies = [ "cocoa", "core-graphics 0.22.3", diff --git a/examples/api/yarn.lock b/examples/api/yarn.lock index 8dec12114e4..ebb5808c2a5 100644 --- a/examples/api/yarn.lock +++ b/examples/api/yarn.lock @@ -25,7 +25,7 @@ "@tauri-apps/api@../../tooling/api/dist": version "1.0.0-beta.8" dependencies: - type-fest "2.6.0" + type-fest "2.8.0" debug@^4.3.2: version "4.3.3" @@ -262,10 +262,10 @@ svelte@3.35.0: resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.35.0.tgz#e0d0ba60c4852181c2b4fd851194be6fda493e65" integrity sha512-gknlZkR2sXheu/X+B7dDImwANVvK1R0QGQLd8CNIfxxGPeXBmePnxfzb6fWwTQRsYQG7lYkZXvpXJvxvpsoB7g== -type-fest@2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.6.0.tgz#e9f1e78c5f746ca97ccbb873c59aa16c3bf6b123" - integrity sha512-XN1FDGGtaSDA6CFsCW5iolTQqFsnJ+ZF6JqSz0SqXoh4F8GY0xqUv5RYnTilpmL+sOH8OH4FX8tf9YyAPM2LDA== +type-fest@2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.8.0.tgz#39d7c9f9c508df8d6ce1cf5a966b0e6568dcc50d" + integrity sha512-O+V9pAshf9C6loGaH0idwsmugI2LxVNR7DtS40gVo2EXZVYFgz9OuNtOhgHLdHdapOEWNdvz9Ob/eeuaWwwlxA== vite@^2.6.4: version "2.6.14" diff --git a/tooling/api/src/dialog.ts b/tooling/api/src/dialog.ts index 3d3e76063ef..6b4a3e9185c 100644 --- a/tooling/api/src/dialog.ts +++ b/tooling/api/src/dialog.ts @@ -45,7 +45,7 @@ interface DialogFilter { interface OpenDialogOptions { /** The filters of the dialog. */ filters?: DialogFilter[] - /** Initial directory or file path. It must exist. */ + /** Initial directory or file path. */ defaultPath?: string /** Whether the dialog allows multiple selection or not. */ multiple?: boolean