@le-space/ui 0.6.1 → 0.6.3
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 +14 -0
- package/react/index.js +745 -59
- package/shared/index.d.ts +22 -2
- package/shared/index.js +561 -44
- package/svelte/SponsorRelayFab.svelte +83 -12
package/shared/index.d.ts
CHANGED
|
@@ -186,12 +186,24 @@ interface DeploymentProgressEvent {
|
|
|
186
186
|
type DeploymentProgressListener = (event: DeploymentProgressEvent) => void;
|
|
187
187
|
|
|
188
188
|
type SponsorRelayHealthTone = 'ok' | 'caution' | 'error' | 'idle';
|
|
189
|
+
interface SponsorRelayUcanStoreBootstrapInput {
|
|
190
|
+
adminDid: string;
|
|
191
|
+
serviceDid: string;
|
|
192
|
+
spaceDid: string;
|
|
193
|
+
rootDelegationProof: string;
|
|
194
|
+
allowedCapabilities: string;
|
|
195
|
+
defaultUserDelegationExpiration: string;
|
|
196
|
+
maxUserDelegationExpiration: string;
|
|
197
|
+
pwaOrigin: string;
|
|
198
|
+
serviceOrigin: string;
|
|
199
|
+
}
|
|
189
200
|
interface SponsorRelayProps {
|
|
190
201
|
debug?: boolean;
|
|
191
202
|
manifestUrl?: string;
|
|
192
203
|
manifestJson?: string;
|
|
193
204
|
sshPublicKey?: string;
|
|
194
205
|
instanceName?: string;
|
|
206
|
+
ucanStoreBootstrap?: Partial<SponsorRelayUcanStoreBootstrapInput>;
|
|
195
207
|
showInstances?: boolean;
|
|
196
208
|
openByDefault?: boolean;
|
|
197
209
|
launcherMode?: 'floating' | 'inline';
|
|
@@ -267,6 +279,7 @@ interface SponsorRelayState {
|
|
|
267
279
|
manifestJson: string;
|
|
268
280
|
sshPublicKey: string;
|
|
269
281
|
instanceName: string;
|
|
282
|
+
ucanStoreBootstrap: SponsorRelayUcanStoreBootstrapInput;
|
|
270
283
|
tierId: string;
|
|
271
284
|
showAdvanced: boolean;
|
|
272
285
|
showInstances: boolean;
|
|
@@ -300,6 +313,12 @@ type SponsorRelaySubscriber = (state: SponsorRelayState) => void;
|
|
|
300
313
|
declare const DEFAULT_INSTANCE_NAME = "sponsor-relay";
|
|
301
314
|
declare const DEFAULT_MANIFEST_URL = "./rootfs-manifest.json";
|
|
302
315
|
declare const DEFAULT_TIER_ID = "tier-1";
|
|
316
|
+
declare const DEFAULT_UCAN_STORE_PWA_ORIGIN = "https://ucan.nicokrause.com";
|
|
317
|
+
declare const DEFAULT_UCAN_STORE_SERVICE_ORIGIN = "https://ucan-api.nicokrause.com";
|
|
318
|
+
declare const DEFAULT_UCAN_STORE_SERVICE_DID = "did:web:ucan-api.nicokrause.com";
|
|
319
|
+
declare const DEFAULT_UCAN_STORE_ALLOWED_CAPABILITIES: string[];
|
|
320
|
+
declare const DEFAULT_UCAN_STORE_USER_DELEGATION_EXPIRATION_SECONDS = "31536000";
|
|
321
|
+
declare const DEFAULT_UCAN_STORE_MAX_DELEGATION_EXPIRATION_SECONDS = "315360000";
|
|
303
322
|
declare const ROOTFS_MISSING_STATE: SponsorRelayRootfsHealth;
|
|
304
323
|
declare const IDLE_DEPLOYMENT_PROGRESS: DeploymentProgressEvent;
|
|
305
324
|
declare const REFRESH_INTERVAL_MS = 30000;
|
|
@@ -311,7 +330,7 @@ declare const STALE_INSTANCE_ALLOCATION_COOLDOWN_MS: number;
|
|
|
311
330
|
declare const RECENT_INSTANCE_RUNTIME_GRACE_MS: number;
|
|
312
331
|
declare const DEPLOYMENT_PENDING_WARNING_MS: number;
|
|
313
332
|
|
|
314
|
-
declare const UI_PACKAGE_VERSION = "0.6.
|
|
333
|
+
declare const UI_PACKAGE_VERSION = "0.6.3";
|
|
315
334
|
|
|
316
335
|
interface RootfsRequiredPortForward {
|
|
317
336
|
port: number;
|
|
@@ -386,6 +405,7 @@ declare class SponsorRelayController {
|
|
|
386
405
|
setShowPasteManifest(showPasteManifest: boolean): void;
|
|
387
406
|
setSshPublicKey(sshPublicKey: string): void;
|
|
388
407
|
setInstanceName(instanceName: string): void;
|
|
408
|
+
setUcanStoreBootstrapField(field: keyof SponsorRelayUcanStoreBootstrapInput, value: string): void;
|
|
389
409
|
setTierId(tierId: string): void;
|
|
390
410
|
private recomputePricingSummary;
|
|
391
411
|
private queueManifestRefresh;
|
|
@@ -405,4 +425,4 @@ interface DeploymentProgressEmitter {
|
|
|
405
425
|
}
|
|
406
426
|
declare function createDeploymentProgressEmitter(): DeploymentProgressEmitter;
|
|
407
427
|
|
|
408
|
-
export { type CompactBootstrapRegistrationRecord, 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, ROOTFS_MISSING_STATE, STALE_INSTANCE_ALLOCATION_COOLDOWN_MS, SponsorRelayController, type SponsorRelayHealthTone, type SponsorRelayPricingSummary, type SponsorRelayProps, type SponsorRelayRootfsHealth, type SponsorRelayState, type SponsorRelaySubscriber, type SponsorRelayWalletState, UI_PACKAGE_VERSION, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, formatTierSpecLabel, getEthereumProvider, joinMappedPorts, joinRequiredPortForwards, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
|
|
428
|
+
export { type CompactBootstrapRegistrationRecord, type CompactInstanceDetails, type CompactInstanceRecord, DEFAULT_INSTANCE_NAME, DEFAULT_MANIFEST_URL, DEFAULT_TIER_ID, DEFAULT_UCAN_STORE_ALLOWED_CAPABILITIES, DEFAULT_UCAN_STORE_MAX_DELEGATION_EXPIRATION_SECONDS, DEFAULT_UCAN_STORE_PWA_ORIGIN, DEFAULT_UCAN_STORE_SERVICE_DID, DEFAULT_UCAN_STORE_SERVICE_ORIGIN, DEFAULT_UCAN_STORE_USER_DELEGATION_EXPIRATION_SECONDS, 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, ROOTFS_MISSING_STATE, STALE_INSTANCE_ALLOCATION_COOLDOWN_MS, SponsorRelayController, type SponsorRelayHealthTone, type SponsorRelayPricingSummary, type SponsorRelayProps, type SponsorRelayRootfsHealth, type SponsorRelayState, type SponsorRelaySubscriber, type SponsorRelayUcanStoreBootstrapInput, type SponsorRelayWalletState, UI_PACKAGE_VERSION, buildSshCommand, connectWallet, createDeploymentProgressEmitter, createSponsorRelayController, formatDateTime, formatNumber, formatTierSpecLabel, getEthereumProvider, joinMappedPorts, joinRequiredPortForwards, personalSign, resolveManifestSource, shortHash, toChecksumAddress, watchWallet };
|