mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-10 22:38:44 +02:00
beta.1
This commit is contained in:
7 files changed
+5
-42
No files matched your search
Vendored
-1
@@ -1 +0,0 @@
|
||||
*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }@font-face{font-family:Fira Code;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sJV37Nv7g.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Fira Code;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sJVT7Nv7g.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Fira Code;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sJVz7Nv7g.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Fira Code;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sJVP7Nv7g.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Fira Code;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sJV77Nv7g.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Fira Code;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firacode/v22/uU9eCBsR6Z2vfE9aq3bL0fxyUs4tcw4W_D1sJVD7Ng.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Fira Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtgK_7SodY.woff2) format("woff2");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:Fira Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtgIv7SodY.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Fira Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtgKv7SodY.woff2) format("woff2");unicode-range:U+1F00-1FFF}@font-face{font-family:Fira Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtgJf7SodY.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Fira Mono;font-style:normal;font-weight:400;font-display:swap;src:url(https://fonts.gstatic.com/s/firamono/v14/N0bX2SlFPv1weGeLZDtgKP7SodY.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+Line truncated
|
||||
Vendored
-20
@@ -1,20 +0,0 @@
|
||||
var Rn=Object.defineProperty;var Pn=(t,e,n)=>e in t?Rn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Te=(t,e,n)=>(Pn(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const s of l)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const s={};return l.integrity&&(s.integrity=l.integrity),l.referrerPolicy&&(s.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?s.credentials="include":l.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(l){if(l.ep)return;l.ep=!0;const s=n(l);fetch(l.href,s)}})();function x(){}function on(t){return t()}function _t(){return Object.create(null)}function $(t){t.forEach(on)}function rn(t){return typeof t=="function"}function se(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let Be;function On(t,e){return t===e?!0:(Be||(Be=document.createElement("a")),Be.href=e,t===Be.href)}function In(t){return Object.keys(t).length===0}function Un(t,...e){if(t==null){for(const i of e)i(void 0);return x}const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function an(t,e,n){t.$$.on_destroy.push(Un(e,n))}function a(t,e){t.appendChild(e)}function g(t,e,n){t.insertBefore(e,n||null)}function m(t){t.parentNode&&t.parentNode.removeChild(t)}function We(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function d(t){return document.createElement(t)}function Dn(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function Z(t){return document.createTextNode(t)}function y(){return Z(" ")}function Ie(){return Z("")}function M(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function Nn(t){return function(e){return e.preventDefault(),t.call(this,e)}}function c(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function zn(t){return Array.from(t.childNodes)}function he(t,e){e=""+e,t.data!==e&&(t.data=e)}function q(t,e){t.value=e??""}function Ve(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}function et(t,e,n){for(let i=0;i<t.options.length;i+=1){const l=t.options[i];if(l.__value===e){l.selected=!0;return}}(!n||e!==void 0)&&(t.selectedIndex=-1)}function wt(t,e){for(let n=0;n<t.options.length;n+=1){const i=t.options[n];i.selected=~e.indexOf(i.__value)}}function cn(t){const e=t.querySelector(":checked");return e&&e.__value}function Wn(t){return[].map.call(t.querySelectorAll(":checked"),e=>e.__value)}function be(t,e,n){t.classList.toggle(e,!!n)}class jn{constructor(e=!1){Te(this,"is_svg",!1);Te(this,"e");Te(this,"n");Te(this,"t");Te(this,"a");this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=Dn(n.nodeName):this.e=d(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)g(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(m)}}function vt(t,e){return new t(e)}let Ge;function Fe(t){Ge=t}function un(){if(!Ge)throw new Error("Function called outside component initialization");return Ge}function Pe(t){un().$$.on_mount.push(t)}function dn(t){un().$$.on_destroy.push(t)}const Ne=[],Qe=[];let ze=[];const yt=[],fn=Promise.resolve();let dt=!1;function pn(){dt||(dt=!0,fn.then(hn))}function kt(){return pn(),fn}function je(t){ze.push(t)}const rt=new Set;let Ue=0;function hn(){if(Ue!==0)return;const t=Ge;do{try{for(;Ue<Ne.length;){const e=Ne[Ue];Ue++,Fe(e),Hn(e.$$)}}catch(e){throw Ne.length=0,Ue=0,e}for(Fe(null),Ne.length=0,Ue=0;Qe.length;)Qe.pop()();for(let e=0;e<ze.length;e+=1){const n=ze[e];rt.has(n)||(rt.add(n),n())}ze.length=0}while(Ne.length);for(;yt.length;)yt.pop()();dt=!1,rt.clear(),Fe(t)}function Hn(t){if(t.fragment!==null){t.update(),$(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(je)}}function qn(t){const e=[],n=[];ze.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),ze=e}const Ke=new Set;let Oe;function st(){Oe={r:0,c:[],p:Oe}}function ot(){Oe.r||$(Oe.c),Oe=Oe.p}function _e(t,e){t&&t.i&&(Ke.delete(t),t.i(e))}function Le(t,e,n,i){if(t&&t.o){if(Ke.has(t))return;Ke.add(t),Oe.c.push(()=>{Ke.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}function ge(t){return(t==null?void 0:t.length)!==void 0?t:Array.from(t)}function tt(t){t&&t.c()}function Xe(t,e,n){const{fragment:i,after_update:l}=t.$$;i&&i.m(e,n),je(()=>{const s=t.$$.on_mount.map(on).filter(rn);t.$$.on_destroy?t.$$.on_destroy.push(...s):$(s),t.$$.on_mount=[]}),l.forEach(je)}function Ye(t,e){const n=t.$$;n.frLine truncated
|
||||
`)}}async function Xn(t,e){return C("plugin:shell|open",{path:t,with:e})}class Yn{constructor(e,n){this.type="Logical",this.width=e,this.height=n}}class pt{constructor(e,n){this.type="Physical",this.width=e,this.height=n}toLogical(e){return new Yn(this.width/e,this.height/e)}}class Jn{constructor(e,n){this.type="Logical",this.x=e,this.y=n}}class ht{constructor(e,n){this.type="Physical",this.x=e,this.y=n}toLogical(e){return new Jn(this.x/e,this.y/e)}}var Se;(function(t){t.WINDOW_RESIZED="tauri://resize",t.WINDOW_MOVED="tauri://move",t.WINDOW_CLOSE_REQUESTED="tauri://close-requested",t.WINDOW_DESTROYED="tauri://destroyed",t.WINDOW_FOCUS="tauri://focus",t.WINDOW_BLUR="tauri://blur",t.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",t.WINDOW_THEME_CHANGED="tauri://theme-changed",t.WEBVIEW_CREATED="tauri://webview-created",t.WEBVIEW_FILE_DROP="tauri://file-drop",t.WEBVIEW_FILE_DROP_HOVER="tauri://file-drop-hover",t.WEBVIEW_FILE_DROP_CANCELLED="tauri://file-drop-cancelled"})(Se||(Se={}));async function wn(t,e){await C("plugin:event|unlisten",{event:t,eventId:e})}async function vn(t,e,n){const i=typeof(n==null?void 0:n.target)=="string"?{kind:"AnyLabel",label:n.target}:(n==null?void 0:n.target)??{kind:"Any"};return C("plugin:event|listen",{event:t,target:i,handler:gn(e)}).then(l=>async()=>wn(t,l))}async function Zn(t,e,n){return vn(t,i=>{e(i),wn(t,i.id).catch(()=>{})},n)}async function Bn(t,e){await C("plugin:event|emit",{event:t,payload:e})}async function Kn(t,e,n){await C("plugin:event|emit_to",{target:typeof t=="string"?{kind:"AnyLabel",label:t}:t,event:e,payload:n})}var bt;(function(t){t[t.Critical=1]="Critical",t[t.Informational=2]="Informational"})(bt||(bt={}));class $n{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}var Ct;(function(t){t.None="none",t.Normal="normal",t.Indeterminate="indeterminate",t.Paused="paused",t.Error="error"})(Ct||(Ct={}));function mt(){return new yn(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function ct(){return window.__TAURI_INTERNALS__.metadata.windows.map(t=>new yn(t.label,{skip:!0}))}const ut=["tauri://created","tauri://error"];class yn{constructor(e,n={}){var i;this.label=e,this.listeners=Object.create(null),n!=null&&n.skip||C("plugin:window|create",{options:{...n,parent:typeof n.parent=="string"?n.parent:(i=n.parent)==null?void 0:i.label,label:e}}).then(async()=>this.emit("tauri://created")).catch(async l=>this.emit("tauri://error",l))}static getByLabel(e){return ct().find(n=>n.label===e)??null}static getCurrent(){return mt()}static getAll(){return ct()}static async getFocusedWindow(){for(const e of ct())if(await e.isFocused())return e;return null}async listen(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)}):vn(e,n,{target:{kind:"Window",label:this.label}})}async once(e,n){return this._handleTauriEvent(e,n)?Promise.resolve(()=>{const i=this.listeners[e];i.splice(i.indexOf(n),1)}):Zn(e,n,{target:{kind:"Window",label:this.label}})}async emit(e,n){if(ut.includes(e)){for(const i of this.listeners[e]||[])i({event:e,id:-1,payload:n});return Promise.resolve()}return Bn(e,n)}async emitTo(e,n,i){if(ut.includes(n)){for(const l of this.listeners[n]||[])l({event:n,id:-1,payload:i});return Promise.resolve()}return Kn(e,n,i)}_handleTauriEvent(e,n){return ut.includes(e)?(e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n],!0):!1}async scaleFactor(){return C("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return C("plugin:window|inner_position",{label:this.label}).then(({x:e,y:n})=>new ht(e,n))}async outerPosition(){return C("plugin:window|outer_position",{label:this.label}).then(({x:e,y:n})=>new ht(e,n))}async innerSize(){return C("plugin:window|inner_size",{label:this.label}).then(({width:e,height:n})=>new pt(e,n))}async outerSize(){return C("plugin:window|outer_size",{label:this.label}).then(({width:e,height:n})=>new pt(e,n))}async isFullscreen(){return C("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return C("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return C("plugin:window|is_maximized",{label:this.label})}async isFocused(){return C("plugin:window|is_focused",{label:this.label})}async isDecorated(){return C("plugin:window|is_decorated",{label:this.label})}async isResizable(){return C("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return C("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return C("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return C("plugin:window|is_closable",{label:this.label})}async isVisible(){return C("plugin:window|is_visible",{label:this.label})}async title(){return C("plugin:window|title",{label:this.label})}async theme(){return C("plugin:window|theme",{label:this.label})}async center(){return C("plugin:
Line truncated
|
||||
development process. In the future, this app will be used on Tauri's integration
|
||||
tests.`,n=y(),i=d("br"),l=y(),s=d("br"),o=y(),r=d("pre"),u=Z("App name: "),f=d("code"),h=Z(t[2]),w=Z(`
|
||||
App version: `),p=d("code"),b=Z(t[0]),k=Z(`
|
||||
Tauri version: `),_=d("code"),A=Z(t[1]),L=Z(`
|
||||
`),v=y(),E=d("br"),O=y(),U=d("div"),S=d("button"),S.textContent="Close application",j=y(),T=d("button"),T.textContent="Relaunch application",c(S,"class","btn"),c(T,"class","btn"),c(U,"class","flex flex-wrap gap-1 shadow-")},m(R,D){g(R,e,D),g(R,n,D),g(R,i,D),g(R,l,D),g(R,s,D),g(R,o,D),g(R,r,D),a(r,u),a(r,f),a(f,h),a(r,w),a(r,p),a(p,b),a(r,k),a(r,_),a(_,A),a(r,L),g(R,v,D),g(R,E,D),g(R,O,D),g(R,U,D),a(U,S),a(U,j),a(U,T),I||(W=[M(S,"click",t[3]),M(T,"click",t[4])],I=!0)},p(R,[D]){D&4&&he(h,R[2]),D&1&&he(b,R[0]),D&2&&he(A,R[1])},i:x,o:x,d(R){R&&(m(e),m(n),m(i),m(l),m(s),m(o),m(r),m(v),m(E),m(O),m(U)),I=!1,$(W)}}}function ri(t,e,n){let i="1.0.0",l="1.0.0",s="Unknown";ii().then(u=>{n(2,s=u)}),ni().then(u=>{n(0,i=u)}),li().then(u=>{n(1,l=u)});async function o(){await si()}async function r(){await Cn()}return[i,l,s,o,r]}class ai extends de{constructor(e){super(),ue(this,e,ri,oi,se,{})}}async function ci(){return await C("plugin:cli|cli_matches")}function ui(t){let e,n,i,l,s,o,r,u,f,h,w,p,b;return{c(){e=d("p"),e.innerHTML=`This binary can be run from the terminal and takes the following arguments:
|
||||
<code class="code-block flex flex-wrap my-2"><pre> --config <PATH>
|
||||
--theme <light|dark|system>
|
||||
--verbose</pre></code>
|
||||
Additionally, it has a <code>update --background</code> subcommand.`,n=y(),i=d("br"),l=y(),s=d("div"),s.textContent="Note that the arguments are only parsed, not implemented.",o=y(),r=d("br"),u=y(),f=d("br"),h=y(),w=d("button"),w.textContent="Get matches",c(s,"class","note"),c(w,"class","btn"),c(w,"id","cli-matches")},m(k,_){g(k,e,_),g(k,n,_),g(k,i,_),g(k,l,_),g(k,s,_),g(k,o,_),g(k,r,_),g(k,u,_),g(k,f,_),g(k,h,_),g(k,w,_),p||(b=M(w,"click",t[0]),p=!0)},p:x,i:x,o:x,d(k){k&&(m(e),m(n),m(i),m(l),m(s),m(o),m(r),m(u),m(f),m(h),m(w)),p=!1,b()}}}function di(t,e,n){let{onMessage:i}=e;function l(){ci().then(i).catch(i)}return t.$$set=s=>{"onMessage"in s&&n(1,i=s.onMessage)},[l,i]}class fi extends de{constructor(e){super(),ue(this,e,di,ui,se,{onMessage:1})}}function pi(t){let e,n,i,l,s,o,r,u;return{c(){e=d("div"),n=d("button"),n.textContent="Call Log API",i=y(),l=d("button"),l.textContent="Call Request (async) API",s=y(),o=d("button"),o.textContent="Send event to Rust",c(n,"class","btn"),c(n,"id","log"),c(l,"class","btn"),c(l,"id","request"),c(o,"class","btn"),c(o,"id","event")},m(f,h){g(f,e,h),a(e,n),a(e,i),a(e,l),a(e,s),a(e,o),r||(u=[M(n,"click",t[0]),M(l,"click",t[1]),M(o,"click",t[2])],r=!0)},p:x,i:x,o:x,d(f){f&&m(e),r=!1,$(u)}}}function hi(t,e,n){const i=mt();let{onMessage:l}=e,s;Pe(async()=>{s=await i.listen("rust-event",l)}),dn(()=>{s&&s()});function o(){C("log_operation",{event:"tauri-click",payload:"this payload is optional because we used Option in Rust"})}function r(){C("perform_request",{endpoint:"dummy endpoint arg",body:{id:5,name:"test"}}).then(l).catch(l)}function u(){i.emit("js-event","this is the payload string")}return t.$$set=f=>{"onMessage"in f&&n(3,l=f.onMessage)},[o,r,u,l]}class bi extends de{constructor(e){super(),ue(this,e,hi,pi,se,{onMessage:3})}}async function mi(t={}){return typeof t=="object"&&Object.freeze(t),C("plugin:dialog|open",{options:t})}async function gi(t={}){return typeof t=="object"&&Object.freeze(t),C("plugin:dialog|save",{options:t})}async function _i(t,e){var i,l;const n=typeof e=="string"?{title:e}:e;return C("plugin:dialog|message",{message:t.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type_:n==null?void 0:n.type,okButtonLabel:(l=n==null?void 0:n.okLabel)==null?void 0:l.toString()})}async function wi(t,e){var i,l,s;const n=typeof e=="string"?{title:e}:e;return C("plugin:dialog|ask",{message:t.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type_:n==null?void 0:n.type,okButtonLabel:((l=n==null?void 0:n.okLabel)==null?void 0:l.toString())??"Yes",cancelButtonLabel:((s=n==null?void 0:n.cancelLabel)==null?void 0:s.toString())??"No"})}async function St(t,e){var i,l,s;const n=typeof e=="string"?{title:e}:e;return C("plugin:dialog|confirm",{message:t.toString(),title:(i=n==null?void 0:n.title)==null?void 0:i.toString(),type_:n==null?void 0:n.type,okButtonLabel:((l=n==null?void 0:n.okLabel)==null?void 0:l.toString())??"Ok",cancelButtonLabel:((s=n==null?void 0:n.cancelLabel)==null?void 0:s.toString())??"Cancel"})}var it;(function(t){t[t.Audio=1]="Audio",t[t.Cache=2]="Cache",t[t.Config=3]="Config",t[t.Data=4]="Data",t[t.LocalData=5]="LocalData",t[t.Document=6]="Document",t[t.Download=7]="Download",t[t.Picture=8]="Picture",t[t.Public=9]="Public",t[t.Video=10]="Video",t[t.Resource=11]="Resource",t[t.Temp=12]="Temp",t[t.AppConfig=13]="AppConfig",t[t.AppData=14]="AppData",t[t.AppLocalData=15]="AppLocalData",t[t.AppCache=16]="AppCache",t[t.AppLog=17]="AppLog",t[t.Desktop=18]="Desktop",t[t.Executable=19]="Executable",t[t.Font=20]="Font",t[t.Home=21]="Home",t[t.Runtime=22]="Runtime",t[t.Template=23]="Template"})(it||(it={}));var Et;(function(t){t[t.Start=0]="Start",t[t.Current=1]="Current",t[t.End=2]="End"})(Et||(Et={}));function Ln(t){return{isFile:t.isFile,isDirectory:t.isDirectory,isSymlink:t.isSymlink,size:t.size,mtime:t.mtime!=null?new Date(t.mtime):null,atime:t.atime!=null?new Date(t.atime):null,birthtime:t.birthtime!=null?new Date(t.birthtime):null,readonly:t.readonly,fileAttributes:t.fileAttributes,dev:t.dev,ino:t.ino,mode:t.mode,nlink:t.nlink,uid:t.uid,gid:t.gid,rdev:t.rdev,blksize:t.blksize,blocks:t.blocks}}class vi extends _n{constructor(e){super(e)}async read(e){if(e.byteLength===0)return 0;const[n,i]=await C("plugin:fs|read",{rid:this.rid,len:e.byteLength});return e.set(n),i===0?null:i}async seek(e,n){return C("plugin:fs|seek",{rid:this.rid,offset:e,whence:n})}async stat(){const e=await C("plugin:fs|fstat",{rid:this.rid});return Ln(e)}async truncate(e){return C("plugin:fs|ftruncate",{rid:this.rid,len:e})}async write(e){return C("plugin:fs|write",{rid:this.rid,data:Array.from(e)})}}async function yi(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");const n=await C("plugin:fs|open",{path:t instanceof URL?t.toString():t,options:e});return new vi(n)}async function ki(t,e){if(t instanceof URL&&t.protocol!=="file:")throw new TypeError("Must be a file URL.");return C("plugin:fs|mkdir",{path:t iLine truncated
|
||||
`),l=d("input"),s=y(),o=d("div"),r=Z(`Encoding:
|
||||
`),u=d("input"),f=y(),h=d("div"),w=Z(`Working directory:
|
||||
`),p=d("input"),b=y(),k=d("div"),_=Z(`Arguments:
|
||||
`),A=d("input"),L=y(),v=d("div"),E=d("button"),E.textContent="Run",O=y(),U=d("button"),U.textContent="Kill",S=y(),I&&I.c(),c(l,"class","grow input"),c(n,"class","flex items-center gap-1"),c(u,"class","grow input"),c(o,"class","flex items-center gap-1"),c(p,"class","grow input"),c(p,"placeholder","Working directory"),c(h,"class","flex items-center gap-1"),c(A,"class","grow input"),c(A,"placeholder","Environment variables"),c(k,"class","flex items-center gap-1"),c(E,"class","btn"),c(U,"class","btn"),c(v,"class","flex children:grow gap-1"),c(e,"class","flex flex-col childre:grow gap-1")},m(W,R){g(W,e,R),a(e,n),a(n,i),a(n,l),q(l,t[0]),a(e,s),a(e,o),a(o,r),a(o,u),q(u,t[3]),a(e,f),a(e,h),a(h,w),a(h,p),q(p,t[1]),a(e,b),a(e,k),a(k,_),a(k,A),q(A,t[2]),a(e,L),a(e,v),a(v,E),a(v,O),a(v,U),a(e,S),I&&I.m(e,null),j||(T=[M(l,"input",t[10]),M(u,"input",t[11]),M(p,"input",t[12]),M(A,"input",t[13]),M(E,"click",t[6]),M(U,"click",t[7])],j=!0)},p(W,[R]){R&1&&l.value!==W[0]&&q(l,W[0]),R&8&&u.value!==W[3]&&q(u,W[3]),R&2&&p.value!==W[1]&&q(p,W[1]),R&4&&A.value!==W[2]&&q(A,W[2]),W[5]?I?I.p(W,R):(I=xt(W),I.c(),I.m(e,null)):I&&(I.d(1),I=null)},i:x,o:x,d(W){W&&m(e),I&&I.d(),j=!1,$(T)}}}function ll(t,e,n){const i=navigator.userAgent.includes("Windows");let l=i?"cmd":"sh",s=i?["/C"]:["-c"],{onMessage:o}=e,r='echo "hello world"',u=null,f="SOMETHING=value ANOTHER=2",h="",w="",p;function b(){return f.split(" ").reduce((S,j)=>{let[T,I]=j.split("=");return{...S,[T]:I}},{})}function k(){n(5,p=null);const S=nt.create(l,[...s,r],{cwd:u||null,env:b(),encoding:h||void 0});S.on("close",j=>{o(`command finished with code ${j.code} and signal ${j.signal}`),n(5,p=null)}),S.on("error",j=>o(`command error: "${j}"`)),S.stdout.on("data",j=>o(`command stdout: "${j}"`)),S.stderr.on("data",j=>o(`command stderr: "${j}"`)),S.spawn().then(j=>{n(5,p=j)}).catch(o)}function _(){p.kill().then(()=>o("killed child process")).catch(o)}function A(){p.write(w).catch(o)}function L(){r=this.value,n(0,r)}function v(){h=this.value,n(3,h)}function E(){u=this.value,n(1,u)}function O(){f=this.value,n(2,f)}function U(){w=this.value,n(4,w)}return t.$$set=S=>{"onMessage"in S&&n(9,o=S.onMessage)},[r,u,f,h,w,p,k,_,A,o,L,v,E,O,U]}class sl extends de{constructor(e){super(),ue(this,e,ll,il,se,{onMessage:9})}}class ol extends _n{constructor(e){super(e.rid),this.available=e.available,this.currentVersion=e.currentVersion,this.version=e.version,this.date=e.date,this.body=e.body}async downloadAndInstall(e){const n=new Ze;return e&&(n.onmessage=e),C("plugin:updater|download_and_install",{onEvent:n,rid:this.rid})}}async function rl(t){return t!=null&&t.headers&&(t.headers=Array.from(new Headers(t.headers).entries())),C("plugin:updater|check",{...t}).then(e=>e.available?new ol(e):null)}function al(t){let e,n,i,l,s,o;return{c(){e=d("div"),n=d("span"),i=Z(t[3]),l=Z("%"),s=y(),o=d("div"),c(n,"class","svelte-1xfvu87"),c(o,"class","progress-bar svelte-1xfvu87"),Ve(o,"width",t[3]+"%"),c(e,"class","progress svelte-1xfvu87")},m(r,u){g(r,e,u),a(e,n),a(n,i),a(n,l),a(e,s),a(e,o)},p(r,u){u&8&&he(i,r[3]),u&8&&Ve(o,"width",r[3]+"%")},d(r){r&&m(e)}}}function cl(t){let e,n,i;return{c(){e=d("button"),e.textContent="Install update",c(e,"class","btn")},m(l,s){g(l,e,s),n||(i=M(e,"click",t[5]),n=!0)},p:x,d(l){l&&m(e),n=!1,i()}}}function ul(t){let e,n,i;return{c(){e=d("button"),e.textContent="Check update",c(e,"class","btn")},m(l,s){g(l,e,s),n||(i=M(e,"click",t[4]),n=!0)},p:x,d(l){l&&m(e),n=!1,i()}}}function dl(t){let e;function n(s,o){return!s[0]&&!s[2]?ul:!s[1]&&s[2]?cl:al}let i=n(t),l=i(t);return{c(){e=d("div"),l.c(),c(e,"class","flex children:grow children:h10")},m(s,o){g(s,e,o),l.m(e,null)},p(s,[o]){i===(i=n(s))&&l?l.p(s,o):(l.d(1),l=i(s),l&&(l.c(),l.m(e,null)))},i:x,o:x,d(s){s&&m(e),l.d()}}}function fl(t,e,n){let i,{onMessage:l}=e,s,o,r,u=0,f=0;async function h(){n(0,s=!0);try{const p=await rl();l(`Should update: ${p.response.available}`),l(p.response),n(2,r=p)}catch(p){l(p)}finally{n(0,s=!1)}}async function w(){n(1,o=!0),n(8,f=0);try{await r.downloadAndInstall(p=>{switch(p.event){case"Started":n(7,u=p.data.contentLength);break;case"Progress":n(8,f+=p.data.chunkLength);break;case"Finished":break}}),l("Installation complete, restarting..."),await new Promise(p=>setTimeout(p,2e3)),await Cn()}catch(p){console.error(p),l(p)}finally{n(1,o=!1)}}return t.$$set=p=>{"onMessage"in p&&n(6,l=p.onMessage)},t.$$.update=()=>{t.$$.dirty&384&&n(3,i=u?Math.round(f/u*100):0)},[s,o,r,i,h,w,l,u,f]}class pl extends de{constructor(e){super(),ue(this,e,fl,dl,se,{onMessage:6})}}async function hl(t,e){return C("plugin:clipboard-manager|write",{data:{plainText:{label:e==null?void 0:e.label,text:t}}})}async function bl(){return(await C("plugin:clipboard-manager|read")).plainText.text}function ml(t){let e,n,i,l,s,o,r,u;return{c(){e=d("div"),n=d("input"),i=y(),l=d("button"),l.textContent="Write",s=y(),o=d("button"),o.textContent="Read",c(n,"class","grow input"),c(n,"placeholder","Text to write to the clipboard"),c(l,"class","btn"),c(
Line truncated
|
||||
`),n=d("div"),c(n,"class","i-ph-moon")},m(i,l){g(i,e,l),g(i,n,l)},d(i){i&&(m(e),m(n))}}}function Zl(t){let e,n;return{c(){e=Z(`Switch to Light mode
|
||||
`),n=d("div"),c(n,"class","i-ph-sun")},m(i,l){g(i,e,l),g(i,n,l)},d(i){i&&(m(e),m(n))}}}function Bl(t){let e,n,i,l,s,o,r;function u(){return t[22](t[38])}return{c(){e=d("a"),n=d("div"),i=y(),l=d("p"),l.textContent=`${t[38].label}`,c(n,"class",t[38].icon+" mr-2"),c(e,"href","##"),c(e,"class",s="nv "+(t[1]===t[38]?"nv_selected":""))},m(f,h){g(f,e,h),a(e,n),a(e,i),a(e,l),o||(r=M(e,"click",u),o=!0)},p(f,h){t=f,h[0]&2&&s!==(s="nv "+(t[1]===t[38]?"nv_selected":""))&&c(e,"class",s)},d(f){f&&m(e),o=!1,r()}}}function tn(t){let e,n=t[38]&&Bl(t);return{c(){n&&n.c(),e=Ie()},m(i,l){n&&n.m(i,l),g(i,e,l)},p(i,l){i[38]&&n.p(i,l)},d(i){i&&m(e),n&&n.d(i)}}}function nn(t){let e,n=t[35].html+"",i;return{c(){e=new jn(!1),i=Ie(),e.a=i},m(l,s){e.m(n,l,s),g(l,i,s)},p(l,s){s[0]&128&&n!==(n=l[35].html+"")&&e.p(n)},d(l){l&&(m(i),e.d())}}}function Kl(t){let e,n,i,l,s,o,r,u,f,h,w,p,b,k,_,A,L,v,E,O,U,S,j,T,I,W,R=t[1].label+"",D,Y,G,P,z,oe,ee,re,B,te,F,K,H,Q,fe,me,Ae,He,ae=t[6]&&$t(t);function Ee(N,J){return N[0]?Yl:Xl}let ve=Ee(t),we=ve(t),ne=!t[6]&&en(t),ye=ge(t[9]),ie=[];for(let N=0;N<ye.length;N+=1)ie[N]=tn(Kt(t,ye,N));var ke=t[1].component;function Me(N,J){return{props:{onMessage:N[16],insecureRenderHtml:N[17]}}}ke&&(z=vt(ke,Me(t)));let Ce=ge(t[7]),le=[];for(let N=0;N<Ce.length;N+=1)le[N]=nn(Bt(t,Ce,N));return{c(){ae&&ae.c(),e=y(),n=d("div"),we.c(),i=y(),l=d("div"),s=d("aside"),o=d("img"),u=y(),ne&&ne.c(),f=y(),h=d("a"),h.innerHTML=`Documentation
|
||||
<span class="i-codicon-link-external"></span>`,w=y(),p=d("a"),p.innerHTML=`GitHub
|
||||
<span class="i-codicon-link-external"></span>`,b=y(),k=d("a"),k.innerHTML=`Source
|
||||
<span class="i-codicon-link-external"></span>`,_=y(),A=d("br"),L=y(),v=d("div"),E=y(),O=d("br"),U=y(),S=d("div");for(let N=0;N<ie.length;N+=1)ie[N].c();j=y(),T=d("main"),I=d("div"),W=d("h1"),D=Z(R),Y=y(),G=d("div"),P=d("div"),z&&tt(z.$$.fragment),oe=y(),ee=d("div"),re=d("div"),B=y(),te=d("div"),F=d("p"),F.textContent="Console",K=y(),H=d("div"),H.innerHTML='<div class="i-codicon-clear-all"></div>',Q=y(),fe=d("div");for(let N=0;N<le.length;N+=1)le[N].c();c(n,"id","sidebarToggle"),c(n,"class","z-2000 sidebar-toggle display-none lt-sm:flex justify-center absolute items-center w-8 h-8 rd-8 bg-accent dark:bg-darkAccent active:bg-accentDark dark:active:bg-darkAccentDark"),c(o,"class","self-center p-7 cursor-pointer"),On(o.src,r="tauri_logo.png")||c(o,"src",r),c(o,"alt","Tauri logo"),c(h,"class","nv justify-between h-8"),c(h,"target","_blank"),c(h,"href","https://tauri.app/v1/guides/"),c(p,"class","nv justify-between h-8"),c(p,"target","_blank"),c(p,"href","https://github.com/tauri-apps/tauri"),c(k,"class","nv justify-between h-8"),c(k,"target","_blank"),c(k,"href","https://github.com/tauri-apps/tauri/tree/dev/examples/api"),c(v,"class","bg-white/5 h-2px"),c(S,"class","flex flex-col overflow-y-auto children-h-10 children-flex-none gap-1"),c(s,"id","sidebar"),c(s,"class","lt-sm:h-screen lt-sm:shadow-lg lt-sm:shadow lt-sm:transition-transform lt-sm:absolute lt-sm:z-1999 bg-darkPrimaryLighter transition-colors-250 overflow-hidden grid select-none px-2"),c(P,"class","mr-2"),c(G,"class","overflow-y-auto"),c(I,"class","px-5 overflow-hidden grid grid-rows-[auto_1fr]"),c(re,"class","bg-black/20 h-2px cursor-ns-resize"),c(F,"class","font-semibold"),c(H,"class","cursor-pointer h-85% rd-1 p-1 flex justify-center items-center hover:bg-hoverOverlay dark:hover:bg-darkHoverOverlay active:bg-hoverOverlay/25 dark:active:bg-darkHoverOverlay/25 "),c(te,"class","flex justify-between items-center px-2"),c(fe,"class","px-2 overflow-y-auto all:font-mono code-block all:text-xs select-text mr-2"),c(ee,"id","console"),c(ee,"class","select-none h-15rem grid grid-rows-[2px_2rem_1fr] gap-1 overflow-hidden"),c(T,"class","flex-1 bg-primary dark:bg-darkPrimary transition-transform transition-colors-250 grid grid-rows-[2fr_auto]"),be(T,"transparent",t[8]),c(l,"class","flex h-screen w-screen overflow-hidden children-pt8 children-pb-2 text-primaryText dark:text-darkPrimaryText")},m(N,J){ae&&ae.m(N,J),g(N,e,J),g(N,n,J),we.m(n,null),g(N,i,J),g(N,l,J),a(l,s),a(s,o),a(s,u),ne&&ne.m(s,null),a(s,f),a(s,h),a(s,w),a(s,p),a(s,b),a(s,k),a(s,_),a(s,A),a(s,L),a(s,v),a(s,E),a(s,O),a(s,U),a(s,S);for(let V=0;V<ie.length;V+=1)ie[V]&&ie[V].m(S,null);a(l,j),a(l,T),a(T,I),a(I,W),a(W,D),a(I,Y),a(I,G),a(G,P),z&&Xe(z,P,null),a(T,oe),a(T,ee),a(ee,re),a(ee,B),a(ee,te),a(te,F),a(te,K),a(te,H),a(ee,Q),a(ee,fe);for(let V=0;V<le.length;V+=1)le[V]&&le[V].m(fe,null);t[23](fe),t[24](ee),me=!0,Ae||(He=[M(o,"click",t[21]),M(re,"mousedown",t[19]),M(H,"click",t[18])],Ae=!0)},p(N,J){if(N[6]?ae?ae.p(N,J):(ae=$t(N),ae.c(),ae.m(e.parentNode,e)):ae&&(ae.d(1),ae=null),ve!==(ve=Ee(N))&&(we.d(1),we=ve(N),we&&(we.c(),we.m(n,null))),N[6]?ne&&(ne.d(1),ne=null):ne?ne.p(N,J):(ne=en(N),ne.c(),ne.m(s,f)),J[0]&1539){ye=ge(N[9]);let V;for(V=0;V<ye.length;V+=1){const X=Kt(N,ye,V);ie[V]?ie[V].p(X,J):(ie[V]=tn(X),ie[V].c(),ie[V].m(S,null))}for(;V<ie.length;V+=1)ie[V].d(1);ie.length=ye.length}if((!me||J[0]&2)&&R!==(R=N[1].label+"")&&he(D,R),J[0]&2&&ke!==(ke=N[1].component)){if(z){st();const V=z;Le(V.$$.fragment,1,0,()=>{Ye(V,1)}),ot()}ke?(z=vt(ke,Me(N)),tt(z.$$.fragment),_e(z.$$.fragment,1),Xe(z,P,null)):z=null}if(J[0]&128){Ce=ge(N[7]);let V;for(V=0;V<Ce.length;V+=1){const X=Bt(N,Ce,V);le[V]?le[V].p(X,J):(le[V]=nn(X),le[V].c(),le[V].m(fe,null))}for(;V<le.length;V+=1)le[V].d(1);le.length=Ce.length}},i(N){me||(z&&_e(z.$$.fragment,N),me=!0)},o(N){z&&Le(z.$$.fragment,N),me=!1},d(N){N&&(m(e),m(n),m(i),m(l)),ae&&ae.d(N),we.d(),ne&&ne.d(),We(ie,N),z&&Ye(z),We(le,N),t[23](null),t[24](null),Ae=!1,$(He)}}}let ln=50;function sn(t){const e=document.querySelector("html");t?e.classList.add("dark"):e.classList.remove("dark"),localStorage&&localStorage.setItem("theme",t?"dark":"")}function $l(t,e){t.style.setProperty("--translate-x",`${e?"0":"-18.75"}rem`)}function es(t,e,n){let i;const l=mt();l.label!=="main"&&l.onCloseRequested(async F=>{await confirm("Are you sure?")||F.preventDefault()}),l.onFileDropEvent(F=>{E(`File drop: ${JSON.stringify(F.payload)}`)});const s=navigator.userAgent.toLowerCase(),o=s.includes("android")||s.includes("iphone"),r=[{label:"Welcome",component:ai,icon:"i-ph-hand-waving"},{label:"Communication",component:bi,icon:"i-codicon-radio-tower"},!o&&{label:"CLI",component:fi,icon:"i-codicon-terminal"},{label:"Dialog",component:Ii,icon:"i-codicon-multiple-windows"},{label:"File system",component:zi,icon:"i-codicon-files"},{label:"HTTP",component:Xi,icon:"i-ph-globe-hemisphere-west"},{label:"Notifications",component:Zi,icon:"i-codicon-bell-dot"},!o&&{label:"Shortcuts",component:nl,icon:"i-codiLine truncated
|
||||
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en" theme="dark">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, viewport-fit=cover"
|
||||
/>
|
||||
<title>Svelte + Vite App</title>
|
||||
<script type="module" crossorigin src="/assets/index.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
Vendored
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB |
Reference in new issue
Block a user