@le-space/ui 0.3.31 → 0.4.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 +34 -0
- package/react/index.js +451 -492
- package/shared/index.d.ts +38 -2
- package/shared/index.js +269 -443
- package/svelte/SponsorRelayFab.svelte +96 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@le-space/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Floating Aleph sponsor relay UI components for Svelte and React.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@le-space/browser": "0.
|
|
40
|
-
"@le-space/core": "0.
|
|
39
|
+
"@le-space/browser": "0.4.0",
|
|
40
|
+
"@le-space/core": "0.4.0",
|
|
41
41
|
"viem": "^2.38.5"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
package/react/index.d.ts
CHANGED
|
@@ -189,6 +189,7 @@ type DeploymentProgressListener = (event: DeploymentProgressEvent) => void;
|
|
|
189
189
|
|
|
190
190
|
type SponsorRelayHealthTone = 'ok' | 'caution' | 'error' | 'idle';
|
|
191
191
|
interface SponsorRelayProps {
|
|
192
|
+
libp2p?: unknown;
|
|
192
193
|
debug?: boolean;
|
|
193
194
|
manifestUrl?: string;
|
|
194
195
|
manifestJson?: string;
|
|
@@ -223,6 +224,16 @@ interface SponsorRelayRootfsHealth {
|
|
|
223
224
|
label: string;
|
|
224
225
|
detail: string | null;
|
|
225
226
|
}
|
|
227
|
+
interface RelayPingState {
|
|
228
|
+
tone: SponsorRelayHealthTone;
|
|
229
|
+
sent: boolean;
|
|
230
|
+
received: boolean;
|
|
231
|
+
lastPeerId: string | null;
|
|
232
|
+
lastLatencyMs: number | null;
|
|
233
|
+
lastSentAt: number | null;
|
|
234
|
+
lastReceivedAt: number | null;
|
|
235
|
+
error: string | null;
|
|
236
|
+
}
|
|
226
237
|
interface CompactInstanceDetails {
|
|
227
238
|
messageStatus: string;
|
|
228
239
|
allocationSource: string | null;
|
|
@@ -243,6 +254,22 @@ interface CompactInstanceRecord {
|
|
|
243
254
|
instance: InstanceMessage;
|
|
244
255
|
details: CompactInstanceDetails;
|
|
245
256
|
}
|
|
257
|
+
interface CompactBootstrapRegistrationRecord {
|
|
258
|
+
messageHash: string | null;
|
|
259
|
+
hash: string | null;
|
|
260
|
+
itemHash: string | null;
|
|
261
|
+
address: string | null;
|
|
262
|
+
time: number | null;
|
|
263
|
+
instanceItemHash: string | null;
|
|
264
|
+
confirmed: boolean;
|
|
265
|
+
content: {
|
|
266
|
+
peerId: string;
|
|
267
|
+
registrationId?: string;
|
|
268
|
+
multiaddrs: string[];
|
|
269
|
+
browserMultiaddrs?: string[];
|
|
270
|
+
updatedAt: number;
|
|
271
|
+
} | null;
|
|
272
|
+
}
|
|
246
273
|
interface SponsorRelayState {
|
|
247
274
|
ready: boolean;
|
|
248
275
|
open: boolean;
|
|
@@ -260,6 +287,7 @@ interface SponsorRelayState {
|
|
|
260
287
|
refreshing: boolean;
|
|
261
288
|
deploying: boolean;
|
|
262
289
|
deletingInstanceHash: string | null;
|
|
290
|
+
deletingRegistrationHash: string | null;
|
|
263
291
|
};
|
|
264
292
|
statusText: string;
|
|
265
293
|
errorText: string | null;
|
|
@@ -273,6 +301,9 @@ interface SponsorRelayState {
|
|
|
273
301
|
crns: Crn[];
|
|
274
302
|
selectedCrn: Crn | null;
|
|
275
303
|
instances: CompactInstanceRecord[];
|
|
304
|
+
bootstrapRegistrations: CompactBootstrapRegistrationRecord[];
|
|
305
|
+
orphanBootstrapRegistrations: CompactBootstrapRegistrationRecord[];
|
|
306
|
+
relayPing: RelayPingState;
|
|
276
307
|
lastDeploymentHash: string | null;
|
|
277
308
|
deploymentProgress: DeploymentProgressEvent;
|
|
278
309
|
}
|
|
@@ -283,6 +314,7 @@ declare class SponsorRelayController {
|
|
|
283
314
|
private subscribers;
|
|
284
315
|
private client;
|
|
285
316
|
private refreshTimer;
|
|
317
|
+
private pingTimer;
|
|
286
318
|
private manifestRefreshTimer;
|
|
287
319
|
private stopWalletWatch;
|
|
288
320
|
private props;
|
|
@@ -322,8 +354,10 @@ declare class SponsorRelayController {
|
|
|
322
354
|
connectWallet(): Promise<void>;
|
|
323
355
|
private refreshWalletDerivedState;
|
|
324
356
|
refresh(): Promise<void>;
|
|
357
|
+
refreshRelayPing(): Promise<void>;
|
|
325
358
|
deploy(): Promise<void>;
|
|
326
359
|
deleteInstance(instanceHash: string): Promise<void>;
|
|
360
|
+
deleteBootstrapRegistration(registrationHash: string): Promise<void>;
|
|
327
361
|
}
|
|
328
362
|
|
|
329
363
|
declare function SponsorRelayFab(props: SponsorRelayProps): react_jsx_runtime.JSX.Element;
|