@le-space/ui 0.2.0 → 0.3.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/package.json +3 -3
- package/react/index.d.ts +6 -1
- package/react/index.js +954 -34
- package/shared/index.d.ts +9 -2
- package/shared/index.js +873 -6
- package/svelte/SponsorRelayFab.svelte +65 -16
package/shared/index.d.ts
CHANGED
|
@@ -172,7 +172,7 @@ interface RootfsResolution {
|
|
|
172
172
|
gatewayError?: string | null;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
type DeploymentProgressStage = "idle" | "validating" | "loading-manifest" | "verifying-rootfs" | "loading-pricing" | "loading-balance" | "selecting-crn" | "building-message" | "signing-message" | "broadcasting" | "notifying-crn" | "waiting-for-aleph" | "deployment-confirmed" | "deployment-rejected" | "building-delete-message" | "signing-delete-message" | "broadcasting-delete" | "delete-completed" | "refreshing-instances" | "completed" | "error";
|
|
175
|
+
type DeploymentProgressStage = "idle" | "validating" | "loading-manifest" | "verifying-rootfs" | "loading-pricing" | "loading-balance" | "selecting-crn" | "building-message" | "signing-message" | "broadcasting" | "notifying-crn" | "waiting-for-aleph" | "deployment-confirmed" | "deployment-rejected" | "publishing-bootstrap" | "building-delete-message" | "signing-delete-message" | "broadcasting-delete" | "delete-completed" | "refreshing-instances" | "completed" | "error";
|
|
176
176
|
interface DeploymentProgressEvent {
|
|
177
177
|
stage: DeploymentProgressStage;
|
|
178
178
|
label: string;
|
|
@@ -260,6 +260,7 @@ interface SponsorRelayState {
|
|
|
260
260
|
sshPublicKey: string;
|
|
261
261
|
instanceName: string;
|
|
262
262
|
tierId: string;
|
|
263
|
+
showAdvanced: boolean;
|
|
263
264
|
showInstances: boolean;
|
|
264
265
|
showPasteManifest: boolean;
|
|
265
266
|
busy: {
|
|
@@ -294,6 +295,7 @@ declare const RELAY_PING_IDLE_STATE: RelayPingState;
|
|
|
294
295
|
declare const IDLE_DEPLOYMENT_PROGRESS: DeploymentProgressEvent;
|
|
295
296
|
declare const REFRESH_INTERVAL_MS = 30000;
|
|
296
297
|
declare const RELAY_PING_INTERVAL_MS = 20000;
|
|
298
|
+
declare const MANIFEST_SOURCE_REFRESH_DEBOUNCE_MS = 400;
|
|
297
299
|
declare const INSTANCE_RUNTIME_READY_REFRESH_MS = 30000;
|
|
298
300
|
declare const INSTANCE_RUNTIME_PENDING_REFRESH_MS = 45000;
|
|
299
301
|
declare const INSTANCE_RUNTIME_STALE_REFRESH_MS: number;
|
|
@@ -311,6 +313,7 @@ interface RootfsRequiredPortForward {
|
|
|
311
313
|
declare function shortHash(value: string | null | undefined, head?: number, tail?: number): string;
|
|
312
314
|
declare function formatNumber(value: number | null | undefined, digits?: number): string;
|
|
313
315
|
declare function formatDateTime(value: string | number | null | undefined): string;
|
|
316
|
+
declare function formatTierSpecLabel(vcpus: number | null | undefined, memoryMiB: number | null | undefined, diskMiB: number | null | undefined): string;
|
|
314
317
|
declare function buildSshCommand(hostIpv4: string | null, mappedPorts: CompactInstanceRecord["details"]["mappedPorts"]): string | null;
|
|
315
318
|
declare function joinMappedPorts(mappedPorts: CompactInstanceRecord["details"]["mappedPorts"]): string;
|
|
316
319
|
declare function joinRequiredPortForwards(portForwards: ReadonlyArray<RootfsRequiredPortForward> | null | undefined): string;
|
|
@@ -340,6 +343,7 @@ declare class SponsorRelayController {
|
|
|
340
343
|
private client;
|
|
341
344
|
private refreshTimer;
|
|
342
345
|
private pingTimer;
|
|
346
|
+
private manifestRefreshTimer;
|
|
343
347
|
private stopWalletWatch;
|
|
344
348
|
private props;
|
|
345
349
|
private progressEmitter;
|
|
@@ -356,6 +360,7 @@ declare class SponsorRelayController {
|
|
|
356
360
|
private trace;
|
|
357
361
|
private patch;
|
|
358
362
|
private emitProgress;
|
|
363
|
+
private configureRelayBootstrapRegistration;
|
|
359
364
|
private syncLatestDeploymentProgress;
|
|
360
365
|
private canSkipRuntimeRefresh;
|
|
361
366
|
private noteRuntimeRefreshResult;
|
|
@@ -367,11 +372,13 @@ declare class SponsorRelayController {
|
|
|
367
372
|
toggleOpen(): void;
|
|
368
373
|
setManifestUrl(manifestUrl: string): void;
|
|
369
374
|
setManifestJson(manifestJson: string): void;
|
|
375
|
+
setShowAdvanced(showAdvanced: boolean): void;
|
|
370
376
|
setShowPasteManifest(showPasteManifest: boolean): void;
|
|
371
377
|
setSshPublicKey(sshPublicKey: string): void;
|
|
372
378
|
setInstanceName(instanceName: string): void;
|
|
373
379
|
setTierId(tierId: string): void;
|
|
374
380
|
private recomputePricingSummary;
|
|
381
|
+
private queueManifestRefresh;
|
|
375
382
|
connectWallet(): Promise<void>;
|
|
376
383
|
private refreshWalletDerivedState;
|
|
377
384
|
refresh(): Promise<void>;
|
|
@@ -388,4 +395,4 @@ interface DeploymentProgressEmitter {
|
|
|
388
395
|
}
|
|
389
396
|
declare function createDeploymentProgressEmitter(): DeploymentProgressEmitter;
|
|
390
397
|
|
|
391
|
-
export { type CompactInstanceDetails, type CompactInstanceRecord, DEFAULT_INSTANCE_NAME, DEFAULT_MANIFEST_URL, DEFAULT_TIER_ID, DEPLOYMENT_PENDING_WARNING_MS, type DeploymentProgressEmitter, type EthereumProviderLike, IDLE_DEPLOYMENT_PROGRESS, INSTANCE_RUNTIME_PENDING_REFRESH_MS, INSTANCE_RUNTIME_READY_REFRESH_MS, INSTANCE_RUNTIME_STALE_REFRESH_MS, RECENT_INSTANCE_RUNTIME_GRACE_MS, REFRESH_INTERVAL_MS, RELAY_PING_IDLE_STATE, RELAY_PING_INTERVAL_MS, ROOTFS_MISSING_STATE, type RelayPingState, STALE_INSTANCE_ALLOCATION_COOLDOWN_MS, SponsorRelayController, type SponsorRelayHealthTone, type SponsorRelayPricingSummary, type SponsorRelayProps, type SponsorRelayRootfsHealth, type SponsorRelayState, type SponsorRelaySubscriber, type SponsorRelayWalletState, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, getEthereumProvider, joinMappedPorts, joinRequiredPortForwards, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
|
|
398
|
+
export { type CompactInstanceDetails, type CompactInstanceRecord, DEFAULT_INSTANCE_NAME, DEFAULT_MANIFEST_URL, DEFAULT_TIER_ID, DEPLOYMENT_PENDING_WARNING_MS, type DeploymentProgressEmitter, type EthereumProviderLike, IDLE_DEPLOYMENT_PROGRESS, INSTANCE_RUNTIME_PENDING_REFRESH_MS, INSTANCE_RUNTIME_READY_REFRESH_MS, INSTANCE_RUNTIME_STALE_REFRESH_MS, MANIFEST_SOURCE_REFRESH_DEBOUNCE_MS, RECENT_INSTANCE_RUNTIME_GRACE_MS, REFRESH_INTERVAL_MS, RELAY_PING_IDLE_STATE, RELAY_PING_INTERVAL_MS, ROOTFS_MISSING_STATE, type RelayPingState, STALE_INSTANCE_ALLOCATION_COOLDOWN_MS, SponsorRelayController, type SponsorRelayHealthTone, type SponsorRelayPricingSummary, type SponsorRelayProps, type SponsorRelayRootfsHealth, type SponsorRelayState, type SponsorRelaySubscriber, type SponsorRelayWalletState, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, formatTierSpecLabel, getEthereumProvider, joinMappedPorts, joinRequiredPortForwards, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
|