@le-space/ui 0.1.61 → 0.2.0
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 +8 -0
- package/react/index.js +974 -28
- package/shared/index.d.ts +21 -5
- package/shared/index.js +960 -26
- package/svelte/SponsorRelayFab.svelte +6 -1
package/shared/index.d.ts
CHANGED
|
@@ -134,7 +134,7 @@ interface InstanceExecution {
|
|
|
134
134
|
networking: InstanceExecutionNetworking;
|
|
135
135
|
status?: InstanceExecutionStatus | null;
|
|
136
136
|
}
|
|
137
|
-
interface RootfsRequiredPortForward {
|
|
137
|
+
interface RootfsRequiredPortForward$1 {
|
|
138
138
|
port: number;
|
|
139
139
|
tcp?: boolean;
|
|
140
140
|
udp?: boolean;
|
|
@@ -146,7 +146,7 @@ interface RootfsManifest {
|
|
|
146
146
|
rootfsInstallStrategy?: 'thin' | 'prebaked' | string;
|
|
147
147
|
requiresBootstrapNetwork?: boolean;
|
|
148
148
|
bootstrapSummary?: string;
|
|
149
|
-
requiredPortForwards?: RootfsRequiredPortForward[];
|
|
149
|
+
requiredPortForwards?: RootfsRequiredPortForward$1[];
|
|
150
150
|
rootfsItemHash: string;
|
|
151
151
|
rootfsSizeMiB: number;
|
|
152
152
|
rootfsSourceSizeBytes?: number;
|
|
@@ -188,6 +188,7 @@ type DeploymentProgressListener = (event: DeploymentProgressEvent) => void;
|
|
|
188
188
|
type SponsorRelayHealthTone = 'ok' | 'caution' | 'error' | 'idle';
|
|
189
189
|
interface SponsorRelayProps {
|
|
190
190
|
libp2p?: unknown;
|
|
191
|
+
debug?: boolean;
|
|
191
192
|
manifestUrl?: string;
|
|
192
193
|
manifestJson?: string;
|
|
193
194
|
sshPublicKey?: string;
|
|
@@ -300,11 +301,19 @@ declare const STALE_INSTANCE_ALLOCATION_COOLDOWN_MS: number;
|
|
|
300
301
|
declare const RECENT_INSTANCE_RUNTIME_GRACE_MS: number;
|
|
301
302
|
declare const DEPLOYMENT_PENDING_WARNING_MS: number;
|
|
302
303
|
|
|
304
|
+
interface RootfsRequiredPortForward {
|
|
305
|
+
port: number;
|
|
306
|
+
tcp?: boolean;
|
|
307
|
+
udp?: boolean;
|
|
308
|
+
purpose?: string;
|
|
309
|
+
}
|
|
310
|
+
|
|
303
311
|
declare function shortHash(value: string | null | undefined, head?: number, tail?: number): string;
|
|
304
312
|
declare function formatNumber(value: number | null | undefined, digits?: number): string;
|
|
305
313
|
declare function formatDateTime(value: string | number | null | undefined): string;
|
|
306
|
-
declare function buildSshCommand(hostIpv4: string | null, mappedPorts: CompactInstanceRecord[
|
|
307
|
-
declare function joinMappedPorts(mappedPorts: CompactInstanceRecord[
|
|
314
|
+
declare function buildSshCommand(hostIpv4: string | null, mappedPorts: CompactInstanceRecord["details"]["mappedPorts"]): string | null;
|
|
315
|
+
declare function joinMappedPorts(mappedPorts: CompactInstanceRecord["details"]["mappedPorts"]): string;
|
|
316
|
+
declare function joinRequiredPortForwards(portForwards: ReadonlyArray<RootfsRequiredPortForward> | null | undefined): string;
|
|
308
317
|
|
|
309
318
|
declare function resolveManifestSource(args: {
|
|
310
319
|
manifestJson: string;
|
|
@@ -335,16 +344,23 @@ declare class SponsorRelayController {
|
|
|
335
344
|
private props;
|
|
336
345
|
private progressEmitter;
|
|
337
346
|
private runtimeCooldownByHash;
|
|
347
|
+
private runtimeDetailsByHash;
|
|
348
|
+
private debugEnabled;
|
|
349
|
+
private lastRuntimeReadyHash;
|
|
338
350
|
constructor(props?: SponsorRelayProps);
|
|
339
351
|
subscribeToDeploymentProgress(listener: DeploymentProgressListener): () => void;
|
|
340
352
|
subscribe(subscriber: SponsorRelaySubscriber): () => void;
|
|
341
353
|
getState(): SponsorRelayState;
|
|
354
|
+
updateProps(props: Partial<SponsorRelayProps>): void;
|
|
342
355
|
private emit;
|
|
356
|
+
private trace;
|
|
343
357
|
private patch;
|
|
344
358
|
private emitProgress;
|
|
345
359
|
private syncLatestDeploymentProgress;
|
|
346
360
|
private canSkipRuntimeRefresh;
|
|
347
361
|
private noteRuntimeRefreshResult;
|
|
362
|
+
private rememberRuntimeDetails;
|
|
363
|
+
private mergeRememberedRuntimeDetails;
|
|
348
364
|
init(): Promise<void>;
|
|
349
365
|
destroy(): void;
|
|
350
366
|
setOpen(open: boolean): void;
|
|
@@ -372,4 +388,4 @@ interface DeploymentProgressEmitter {
|
|
|
372
388
|
}
|
|
373
389
|
declare function createDeploymentProgressEmitter(): DeploymentProgressEmitter;
|
|
374
390
|
|
|
375
|
-
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, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
|
|
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 };
|