@coasys/ad4m-connect 0.12.1-dev → 0.13.0-test-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/icons/MapPinIcon.d.ts +1 -0
- package/dist/components/icons/index.d.ts +1 -0
- package/dist/components/views/HostBrowser.d.ts +0 -1
- package/dist/components/views/HostDetail.d.ts +2 -1
- package/dist/components/views/LocalAuthentication.d.ts +2 -1
- package/dist/components/views/LoggedInDashboard.d.ts +20 -2
- package/dist/components/views/RemoteAuthentication.d.ts +3 -1
- package/dist/core.d.ts +8 -0
- package/dist/core.js +357 -296
- package/dist/index.js +950 -536
- package/dist/types.d.ts +13 -0
- package/dist/utils.js +1 -1
- package/dist/web.d.ts +4 -0
- package/dist/web.js +922 -508
- package/package.json +2 -2
package/dist/types.d.ts
CHANGED
|
@@ -19,6 +19,9 @@ export type Ad4mConnectOptions = {
|
|
|
19
19
|
userPassword?: string;
|
|
20
20
|
allowedOrigins?: string[];
|
|
21
21
|
hostIndexUrl?: string;
|
|
22
|
+
lowCreditThreshold?: number;
|
|
23
|
+
onCreditsDepleted?: () => void;
|
|
24
|
+
onUseApp?: () => void;
|
|
22
25
|
};
|
|
23
26
|
export type ConfigStates = "port" | "url" | "token";
|
|
24
27
|
export type AuthStates = "authenticated" | "locked" | "unauthenticated";
|
|
@@ -47,3 +50,13 @@ export type UserInfo = {
|
|
|
47
50
|
hotWalletAddress: string | null;
|
|
48
51
|
freeAccess: boolean;
|
|
49
52
|
};
|
|
53
|
+
/** A single compute activity log entry */
|
|
54
|
+
export type ComputeLogEntryData = {
|
|
55
|
+
id: number;
|
|
56
|
+
userEmail: string;
|
|
57
|
+
timestamp: string;
|
|
58
|
+
operation: string;
|
|
59
|
+
summary: string | null;
|
|
60
|
+
cost: number;
|
|
61
|
+
creditsAfter: number;
|
|
62
|
+
};
|
package/dist/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var l=(e,t,o)=>new Promise((c,r)=>{var n=s=>{try{i(o.next(s))}catch(u){r(u)}},p=s=>{try{i(o.throw(s))}catch(u){r(u)}},i=s=>s.done?c(s.value):Promise.resolve(s.value).then(n,p);i((o=o.apply(e,t)).next())});var a="0.
|
|
1
|
+
var l=(e,t,o)=>new Promise((c,r)=>{var n=s=>{try{i(o.next(s))}catch(u){r(u)}},p=s=>{try{i(o.throw(s))}catch(u){r(u)}},i=s=>s.done?c(s.value):Promise.resolve(s.value).then(n,p);i((o=o.apply(e,t)).next())});var a="0.13.0-test-2";function f(){return typeof window!="undefined"&&window.self!==window.top}function d(){try{localStorage.setItem("test",""),localStorage.removeItem("test")}catch(e){return!1}return!0}function w(e,t){d()&&localStorage.setItem(`${a}/${e}`,t)}function k(e){return d()?localStorage.getItem(`${a}/${e}`):null}function y(e){d()&&localStorage.removeItem(`${a}/${e}`)}function v(e,t=1e4){return l(this,null,function*(){return Promise.race([new Promise((o,c)=>{let r;try{r=new WebSocket(e,"graphql-transport-ws"),r.onopen=()=>{r.close(),o(r)},r.onerror=n=>{c(n)},r.onclose=n=>{n.code!==1e3&&c(new Error(`WebSocket closed with code ${n.code}: ${n.reason}`))}}catch(n){r&&r.close(),c(n)}}),new Promise((o,c)=>{setTimeout(()=>{c(new Error("WebSocket connection timed out"))},t)})])})}function x(e){let t=e.trim();if(!t)return"";let o=t.split(/\s+/);return o.length>=2?(o[0][0]+o[1][0]).toUpperCase():t.slice(0,2).toUpperCase()}function S(e){let t=0;for(let o=0;o<e.length;o++)t=e.charCodeAt(o)+((t<<5)-t);return(t%360+360)%360}export{v as connectWebSocket,S as getHue,x as getInitials,k as getLocal,f as isEmbedded,y as removeLocal,w as setLocal};
|
package/dist/web.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare class Ad4mConnectElement extends LitElement {
|
|
|
26
26
|
private lowCredit;
|
|
27
27
|
private requestingPayment;
|
|
28
28
|
private paymentError;
|
|
29
|
+
private openedDueToCreditDepletion;
|
|
29
30
|
connectedCallback(): void;
|
|
30
31
|
private changePort;
|
|
31
32
|
private connectLocalNode;
|
|
@@ -43,6 +44,9 @@ export declare class Ad4mConnectElement extends LitElement {
|
|
|
43
44
|
private passwordLogin;
|
|
44
45
|
private createAccount;
|
|
45
46
|
private disconnect;
|
|
47
|
+
private get backTarget();
|
|
48
|
+
private handleBack;
|
|
49
|
+
private resetRemoteAuthState;
|
|
46
50
|
renderViews(): import("lit").TemplateResult<1>;
|
|
47
51
|
render(): import("lit").TemplateResult<1>;
|
|
48
52
|
}
|