@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.
@@ -0,0 +1 @@
1
+ export default function MapPinIcon(): import("lit").TemplateResult<1>;
@@ -11,3 +11,4 @@ export { default as ArrowLeftIcon } from "./ArrowLeftIcon";
11
11
  export { default as GlobeIcon } from "./GlobeIcon";
12
12
  export { default as CreditIcon } from "./CreditIcon";
13
13
  export { default as WalletIcon } from "./WalletIcon";
14
+ export { default as MapPinIcon } from "./MapPinIcon";
@@ -11,7 +11,6 @@ export declare class HostBrowser extends LitElement {
11
11
  private defaultApplied;
12
12
  static styles: import("lit").CSSResult[];
13
13
  willUpdate(changedProps: import("lit").PropertyValues): void;
14
- private back;
15
14
  private selectHost;
16
15
  private connectManualUrl;
17
16
  private renderAvatar;
@@ -3,9 +3,10 @@ import type { RemoteHost } from "../../types";
3
3
  export declare class HostDetail extends LitElement {
4
4
  host: RemoteHost;
5
5
  static styles: import("lit").CSSResult[];
6
- private back;
7
6
  private proceedToAuth;
8
7
  private renderAvatar;
8
+ private static OPERATION_RATES;
9
+ private isOperationRate;
9
10
  private rateLabel;
10
11
  private formatPrice;
11
12
  render(): TemplateResult<1>;
@@ -6,8 +6,9 @@ export declare class LocalAuthentication extends LitElement {
6
6
  verificationError: boolean;
7
7
  private requestSent;
8
8
  private securityCode;
9
+ private verifying;
9
10
  static styles: import("lit").CSSResult[];
10
- private back;
11
+ willUpdate(changedProps: import("lit").PropertyValues): void;
11
12
  private requestCapability;
12
13
  private verifyCode;
13
14
  private onInputChange;
@@ -1,21 +1,39 @@
1
1
  import { LitElement } from "lit";
2
- import type { RemoteHost, UserInfo } from "../../types";
2
+ import type { RemoteHost, UserInfo, ComputeLogEntryData } from "../../types";
3
3
  export declare class LoggedInDashboard extends LitElement {
4
4
  connectedHost: RemoteHost | null;
5
5
  userInfo: UserInfo | null;
6
6
  requestingPayment: boolean;
7
7
  paymentError: string | null;
8
+ /** When true (credit-depletion session), the X close button is hidden — the only exits are "Use App" or "Disconnect" */
9
+ forceOpen: boolean;
8
10
  private walletInput;
9
11
  private editingWallet;
10
- private paymentSuccess;
12
+ private walletSaveSuccess;
13
+ private topUpAmount;
14
+ private awaitingApproval;
15
+ private creditsUpdated;
16
+ private activityLogOpen;
17
+ private activityLog;
18
+ private activityLogLoading;
19
+ private previousCredits;
11
20
  static styles: import("lit").CSSResult[];
12
21
  private close;
22
+ private _useApp;
13
23
  private disconnect;
14
24
  private setWalletAddress;
15
25
  private requestTopUp;
26
+ private truncateMiddle;
27
+ private toggleActivityLog;
28
+ private loadActivityLog;
29
+ /** Call this externally to push a realtime log entry */
30
+ pushLogEntry(entry: ComputeLogEntryData): void;
31
+ private formatTimeAgo;
32
+ private formatOperation;
16
33
  private get hasWallet();
17
34
  private get isFreeAccess();
18
35
  private get isDepleted();
36
+ private get topUpDisabled();
19
37
  updated(changed: Map<string, unknown>): void;
20
38
  render(): import("lit").TemplateResult<1>;
21
39
  }
@@ -13,8 +13,10 @@ export declare class RemoteAuthentication extends LitElement {
13
13
  private emailSecurityCode;
14
14
  private confirmPassword;
15
15
  static styles: import("lit").CSSResult[];
16
- private back;
17
16
  private emailLogin;
17
+ disconnectedCallback(): void;
18
+ private clearSensitiveState;
19
+ private tryAgain;
18
20
  private verifyEmailCode;
19
21
  private passwordLogin;
20
22
  private createAccount;
package/dist/core.d.ts CHANGED
@@ -19,6 +19,7 @@ export default class Ad4mConnect extends EventTarget {
19
19
  connectedHost: RemoteHost | null;
20
20
  userInfo: UserInfo | null;
21
21
  hostIndexUrl: string;
22
+ lowCreditThreshold: number;
22
23
  private creditPollInterval;
23
24
  private embeddedResolve?;
24
25
  private embeddedReject?;
@@ -29,12 +30,19 @@ export default class Ad4mConnect extends EventTarget {
29
30
  private withTempClient;
30
31
  checkAuth(): Promise<boolean>;
31
32
  disconnect(): Promise<void>;
33
+ /**
34
+ * Subscribe to real-time credit updates via GraphQL subscription.
35
+ * Falls back to polling if the subscription is not supported by the executor.
36
+ */
37
+ startCreditSubscription(): void;
32
38
  startCreditPolling(): void;
33
39
  stopCreditPolling(): void;
34
40
  requestTopUp(amountHOT: number): Promise<{
35
41
  success: boolean;
36
42
  message: string;
37
43
  }>;
44
+ /** Fetch recent compute log entries. */
45
+ fetchComputeLog(since?: string, limit?: number): Promise<import('./types').ComputeLogEntryData[]>;
38
46
  /** Persist selected host after successful auth */
39
47
  setConnectedHost(host: RemoteHost): void;
40
48
  private initializeEmbeddedMode;