rebuild dist, fix example

feat/camera
Lucas Nogueira 2 years ago
parent 9263186458
commit 6940f74acd
No known key found for this signature in database
GPG Key ID: 7C32FCA95C8C95D7

@ -18,7 +18,7 @@
import Clipboard from "./views/Clipboard.svelte";
import WebRTC from "./views/WebRTC.svelte";
import Scanner from "./views/Scanner.svelte";
import { Camera } from "./views/Camera.svelte";
import Camera from "./views/Camera.svelte";
import App from "./views/App.svelte";
import { onMount } from "svelte";

@ -10,7 +10,7 @@
label: "Camera",
},
{
value: Source.Photo,
value: Source.Photos,
label: "Photo",
},
{

@ -1,101 +1,6 @@
var f$1 = Object.defineProperty;
var g = (a, b) => {
for (var c in b) f$1(a, c, {
get: b[c],
enumerable: !0
});
};
var e = (a, b, c) => {
if (!b.has(a)) throw TypeError("Cannot " + c)
};
var h$1 = (a, b, c) => (e(a, b, "read from private field"), c ? c.call(a) : b.get(a)),
i$1 = (a, b, c) => {
if (b.has(a)) throw TypeError("Cannot add the same private member more than once");
b instanceof WeakSet ? b.add(a) : b.set(a, c);
},
j = (a, b, c, d) => (e(a, b, "write to private field"), d ? d.call(a, c) : b.set(a, c), c);
var f$1=Object.defineProperty;var g=(a,b)=>{for(var c in b)f$1(a,c,{get:b[c],enumerable:!0});};var e=(a,b,c)=>{if(!b.has(a))throw TypeError("Cannot "+c)};var h$1=(a,b,c)=>(e(a,b,"read from private field"),c?c.call(a):b.get(a)),i$1=(a,b,c)=>{if(b.has(a))throw TypeError("Cannot add the same private member more than once");b instanceof WeakSet?b.add(a):b.set(a,c);},j=(a,b,c,d)=>(e(a,b,"write to private field"),d?d.call(a,c):b.set(a,c),c);
var h = {};
g(h, {
Channel: () => o,
PluginListener: () => a,
addPluginListener: () => m,
convertFileSrc: () => y,
invoke: () => u,
transformCallback: () => s
});
function f() {
return window.crypto.getRandomValues(new Uint32Array(1))[0]
}
function s(n, e = !1) {
let t = f(),
r = `_${t}`;
return Object.defineProperty(window, r, {
value: c => (e && Reflect.deleteProperty(window, r), n ? .(c)),
writable: !1,
configurable: !0
}), t
}
var i, o = class {
constructor() {
this.__TAURI_CHANNEL_MARKER__ = !0;
i$1(this, i, () => {});
this.id = s(e => {
h$1(this, i).call(this, e);
});
}
set onmessage(e) {
j(this, i, e);
}
get onmessage() {
return h$1(this, i)
}
toJSON() {
return `__CHANNEL__:${this.id}`
}
};
i = new WeakMap;
var a = class {
constructor(e, t, r) {
this.plugin = e, this.event = t, this.channelId = r;
}
async unregister() {
return u(`plugin:${this.plugin}|remove_listener`, {
event: this.event,
channelId: this.channelId
})
}
};
async function m(n, e, t) {
let r = new o;
return r.onmessage = t, u(`plugin:${n}|register_listener`, {
event: e,
handler: r
}).then(() => new a(n, e, r.id))
}
async function u(n, e = {}, t) {
return new Promise((r, c) => {
let g = s(d => {
r(d), Reflect.deleteProperty(window, `_${_}`);
}, !0),
_ = s(d => {
c(d), Reflect.deleteProperty(window, `_${g}`);
}, !0);
window.__TAURI_IPC__({
cmd: n,
callback: g,
error: _,
payload: e,
options: t
});
})
}
function y(n, e = "asset") {
return window.__TAURI__.convertFileSrc(n, e)
}
var h={};g(h,{Channel:()=>o,PluginListener:()=>a,addPluginListener:()=>m,convertFileSrc:()=>y,invoke:()=>u,transformCallback:()=>s});function f(){return window.crypto.getRandomValues(new Uint32Array(1))[0]}function s(n,e=!1){let t=f(),r=`_${t}`;return Object.defineProperty(window,r,{value:c=>(e&&Reflect.deleteProperty(window,r),n?.(c)),writable:!1,configurable:!0}),t}var i,o=class{constructor(){this.__TAURI_CHANNEL_MARKER__=!0;i$1(this,i,()=>{});this.id=s(e=>{h$1(this,i).call(this,e);});}set onmessage(e){j(this,i,e);}get onmessage(){return h$1(this,i)}toJSON(){return `__CHANNEL__:${this.id}`}};i=new WeakMap;var a=class{constructor(e,t,r){this.plugin=e,this.event=t,this.channelId=r;}async unregister(){return u(`plugin:${this.plugin}|remove_listener`,{event:this.event,channelId:this.channelId})}};async function m(n,e,t){let r=new o;return r.onmessage=t,u(`plugin:${n}|register_listener`,{event:e,handler:r}).then(()=>new a(n,e,r.id))}async function u(n,e={},t){return new Promise((r,c)=>{let g=s(d=>{r(d),Reflect.deleteProperty(window,`_${_}`);},!0),_=s(d=>{c(d),Reflect.deleteProperty(window,`_${g}`);},!0);window.__TAURI_IPC__({cmd:n,callback:g,error:_,payload:e,options:t});})}function y(n,e="asset"){return window.__TAURI__.convertFileSrc(n,e)}
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
@ -118,15 +23,8 @@ var CameraDirection;
CameraDirection["Front"] = "FRONT";
})(CameraDirection || (CameraDirection = {}));
async function getPhoto(options) {
return await u("plugin:camera|getPhoto", {
...options
});
return await u("plugin:camera|getPhoto", { ...options });
}
export {
CameraDirection,
ResultType,
Source,
getPhoto
};
//# sourceMappingURL=index.min.js.map
export { CameraDirection, ResultType, Source, getPhoto };
//# sourceMappingURL=index.min.js.map

@ -1,6 +1,4 @@
import {
invoke
} from '@tauri-apps/api/tauri';
import { invoke } from '@tauri-apps/api/tauri';
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
// SPDX-License-Identifier: Apache-2.0
@ -23,15 +21,8 @@ var CameraDirection;
CameraDirection["Front"] = "FRONT";
})(CameraDirection || (CameraDirection = {}));
async function getPhoto(options) {
return await invoke("plugin:camera|getPhoto", {
...options
});
return await invoke("plugin:camera|getPhoto", { ...options });
}
export {
CameraDirection,
ResultType,
Source,
getPhoto
};
//# sourceMappingURL=index.mjs.map
export { CameraDirection, ResultType, Source, getPhoto };
//# sourceMappingURL=index.mjs.map

Loading…
Cancel
Save