@medialane/ui 0.218.0 → 0.220.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.
Files changed (53) hide show
  1. package/dist/components/account/input-otp.d.cts +2 -2
  2. package/dist/components/account/input-otp.d.ts +2 -2
  3. package/dist/components/button.d.cts +2 -2
  4. package/dist/components/button.d.ts +2 -2
  5. package/dist/components/external-link-field.cjs +56 -0
  6. package/dist/components/external-link-field.cjs.map +1 -0
  7. package/dist/components/external-link-field.d.cts +9 -0
  8. package/dist/components/external-link-field.d.ts +9 -0
  9. package/dist/components/external-link-field.js +32 -0
  10. package/dist/components/external-link-field.js.map +1 -0
  11. package/dist/components/fast-mint/fast-mint.d.cts +2 -2
  12. package/dist/components/fast-mint/fast-mint.d.ts +2 -2
  13. package/dist/components/portfolio-collections.cjs +82 -0
  14. package/dist/components/portfolio-collections.cjs.map +1 -0
  15. package/dist/components/portfolio-collections.d.cts +8 -0
  16. package/dist/components/portfolio-collections.d.ts +8 -0
  17. package/dist/components/portfolio-collections.js +58 -0
  18. package/dist/components/portfolio-collections.js.map +1 -0
  19. package/dist/components/portfolio-shell.cjs +22 -12
  20. package/dist/components/portfolio-shell.cjs.map +1 -1
  21. package/dist/components/portfolio-shell.d.cts +6 -1
  22. package/dist/components/portfolio-shell.d.ts +6 -1
  23. package/dist/components/portfolio-shell.js +22 -12
  24. package/dist/components/portfolio-shell.js.map +1 -1
  25. package/dist/components/sheet.d.cts +1 -1
  26. package/dist/components/sheet.d.ts +1 -1
  27. package/dist/index.cjs +6 -0
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +3 -1
  30. package/dist/index.d.ts +3 -1
  31. package/dist/index.js +4 -0
  32. package/dist/index.js.map +1 -1
  33. package/dist/utils/portfolio-counts.cjs +2 -1
  34. package/dist/utils/portfolio-counts.cjs.map +1 -1
  35. package/dist/utils/portfolio-counts.d.cts +1 -0
  36. package/dist/utils/portfolio-counts.d.ts +1 -0
  37. package/dist/utils/portfolio-counts.js +2 -1
  38. package/dist/utils/portfolio-counts.js.map +1 -1
  39. package/dist/utils/portfolio-tabs.cjs +33 -0
  40. package/dist/utils/portfolio-tabs.cjs.map +1 -0
  41. package/dist/utils/portfolio-tabs.d.cts +8 -0
  42. package/dist/utils/portfolio-tabs.d.ts +8 -0
  43. package/dist/utils/portfolio-tabs.js +9 -0
  44. package/dist/utils/portfolio-tabs.js.map +1 -0
  45. package/dist/utils/use-orders.d.cts +613 -13
  46. package/dist/utils/use-orders.d.ts +613 -13
  47. package/dist/utils/use-sponsorship.cjs +10 -8
  48. package/dist/utils/use-sponsorship.cjs.map +1 -1
  49. package/dist/utils/use-sponsorship.d.cts +1 -0
  50. package/dist/utils/use-sponsorship.d.ts +1 -0
  51. package/dist/utils/use-sponsorship.js +10 -8
  52. package/dist/utils/use-sponsorship.js.map +1 -1
  53. package/package.json +3 -3
@@ -1,49 +1,649 @@
1
1
  import * as swr from 'swr';
2
2
  import * as _medialane_sdk from '@medialane/sdk';
3
- import { ApiOrder, ApiResponse, ApiOrdersQuery } from '@medialane/sdk';
3
+ import { ApiResponse, ApiOrdersQuery } from '@medialane/sdk';
4
4
 
5
5
  declare function useOrders(query?: ApiOrdersQuery): {
6
- orders: ApiOrder[];
6
+ orders: {
7
+ offerer: string;
8
+ nftContract: string | null;
9
+ price: {
10
+ currency: string | null;
11
+ raw: string | null;
12
+ formatted: string | null;
13
+ decimals: number;
14
+ };
15
+ endTime: string;
16
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
17
+ fulfiller: string | null;
18
+ orderHash: string;
19
+ startTime: string;
20
+ txHash: {
21
+ created: string | null;
22
+ fulfilled: string | null;
23
+ cancelled: string | null;
24
+ };
25
+ token: {
26
+ name: string | null;
27
+ description: string | null;
28
+ image: string | null;
29
+ animationUrl: string | null;
30
+ } | null;
31
+ chain: string;
32
+ id: string;
33
+ offer: {
34
+ token: string;
35
+ itemType: string;
36
+ identifier: string;
37
+ startAmount: string;
38
+ endAmount: string;
39
+ };
40
+ consideration: {
41
+ recipient: string;
42
+ token: string;
43
+ itemType: string;
44
+ identifier: string;
45
+ startAmount: string;
46
+ endAmount: string;
47
+ };
48
+ nftTokenId: string | null;
49
+ createdBlockNumber: string;
50
+ remainingAmount: string | null;
51
+ createdAt: string;
52
+ updatedAt: string;
53
+ parentOrderHash?: string | null | undefined;
54
+ counterOfferMessage?: string | null | undefined;
55
+ hasActiveCounterOffer?: boolean | undefined;
56
+ }[];
7
57
  meta: _medialane_sdk.ApiMeta | undefined;
8
58
  isLoading: boolean;
9
59
  error: any;
10
- mutate: swr.KeyedMutator<ApiResponse<ApiOrder[]>>;
60
+ mutate: swr.KeyedMutator<ApiResponse<{
61
+ offerer: string;
62
+ nftContract: string | null;
63
+ price: {
64
+ currency: string | null;
65
+ raw: string | null;
66
+ formatted: string | null;
67
+ decimals: number;
68
+ };
69
+ endTime: string;
70
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
71
+ fulfiller: string | null;
72
+ orderHash: string;
73
+ startTime: string;
74
+ txHash: {
75
+ created: string | null;
76
+ fulfilled: string | null;
77
+ cancelled: string | null;
78
+ };
79
+ token: {
80
+ name: string | null;
81
+ description: string | null;
82
+ image: string | null;
83
+ animationUrl: string | null;
84
+ } | null;
85
+ chain: string;
86
+ id: string;
87
+ offer: {
88
+ token: string;
89
+ itemType: string;
90
+ identifier: string;
91
+ startAmount: string;
92
+ endAmount: string;
93
+ };
94
+ consideration: {
95
+ recipient: string;
96
+ token: string;
97
+ itemType: string;
98
+ identifier: string;
99
+ startAmount: string;
100
+ endAmount: string;
101
+ };
102
+ nftTokenId: string | null;
103
+ createdBlockNumber: string;
104
+ remainingAmount: string | null;
105
+ createdAt: string;
106
+ updatedAt: string;
107
+ parentOrderHash?: string | null | undefined;
108
+ counterOfferMessage?: string | null | undefined;
109
+ hasActiveCounterOffer?: boolean | undefined;
110
+ }[]>>;
11
111
  };
12
112
  declare function useOrder(orderHash: string | null): {
13
- order: ApiOrder | null;
113
+ order: {
114
+ offerer: string;
115
+ nftContract: string | null;
116
+ price: {
117
+ currency: string | null;
118
+ raw: string | null;
119
+ formatted: string | null;
120
+ decimals: number;
121
+ };
122
+ endTime: string;
123
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
124
+ fulfiller: string | null;
125
+ orderHash: string;
126
+ startTime: string;
127
+ txHash: {
128
+ created: string | null;
129
+ fulfilled: string | null;
130
+ cancelled: string | null;
131
+ };
132
+ token: {
133
+ name: string | null;
134
+ description: string | null;
135
+ image: string | null;
136
+ animationUrl: string | null;
137
+ } | null;
138
+ chain: string;
139
+ id: string;
140
+ offer: {
141
+ token: string;
142
+ itemType: string;
143
+ identifier: string;
144
+ startAmount: string;
145
+ endAmount: string;
146
+ };
147
+ consideration: {
148
+ recipient: string;
149
+ token: string;
150
+ itemType: string;
151
+ identifier: string;
152
+ startAmount: string;
153
+ endAmount: string;
154
+ };
155
+ nftTokenId: string | null;
156
+ createdBlockNumber: string;
157
+ remainingAmount: string | null;
158
+ createdAt: string;
159
+ updatedAt: string;
160
+ parentOrderHash?: string | null | undefined;
161
+ counterOfferMessage?: string | null | undefined;
162
+ hasActiveCounterOffer?: boolean | undefined;
163
+ } | null;
14
164
  isLoading: boolean;
15
165
  error: any;
16
166
  };
17
167
  declare function useTokenListings(contract: string | null, tokenId: string | null): {
18
- listings: ApiOrder[];
168
+ listings: {
169
+ offerer: string;
170
+ nftContract: string | null;
171
+ price: {
172
+ currency: string | null;
173
+ raw: string | null;
174
+ formatted: string | null;
175
+ decimals: number;
176
+ };
177
+ endTime: string;
178
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
179
+ fulfiller: string | null;
180
+ orderHash: string;
181
+ startTime: string;
182
+ txHash: {
183
+ created: string | null;
184
+ fulfilled: string | null;
185
+ cancelled: string | null;
186
+ };
187
+ token: {
188
+ name: string | null;
189
+ description: string | null;
190
+ image: string | null;
191
+ animationUrl: string | null;
192
+ } | null;
193
+ chain: string;
194
+ id: string;
195
+ offer: {
196
+ token: string;
197
+ itemType: string;
198
+ identifier: string;
199
+ startAmount: string;
200
+ endAmount: string;
201
+ };
202
+ consideration: {
203
+ recipient: string;
204
+ token: string;
205
+ itemType: string;
206
+ identifier: string;
207
+ startAmount: string;
208
+ endAmount: string;
209
+ };
210
+ nftTokenId: string | null;
211
+ createdBlockNumber: string;
212
+ remainingAmount: string | null;
213
+ createdAt: string;
214
+ updatedAt: string;
215
+ parentOrderHash?: string | null | undefined;
216
+ counterOfferMessage?: string | null | undefined;
217
+ hasActiveCounterOffer?: boolean | undefined;
218
+ }[];
19
219
  isLoading: boolean;
20
220
  error: any;
21
- mutate: swr.KeyedMutator<ApiResponse<ApiOrder[]>>;
221
+ mutate: swr.KeyedMutator<ApiResponse<{
222
+ offerer: string;
223
+ nftContract: string | null;
224
+ price: {
225
+ currency: string | null;
226
+ raw: string | null;
227
+ formatted: string | null;
228
+ decimals: number;
229
+ };
230
+ endTime: string;
231
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
232
+ fulfiller: string | null;
233
+ orderHash: string;
234
+ startTime: string;
235
+ txHash: {
236
+ created: string | null;
237
+ fulfilled: string | null;
238
+ cancelled: string | null;
239
+ };
240
+ token: {
241
+ name: string | null;
242
+ description: string | null;
243
+ image: string | null;
244
+ animationUrl: string | null;
245
+ } | null;
246
+ chain: string;
247
+ id: string;
248
+ offer: {
249
+ token: string;
250
+ itemType: string;
251
+ identifier: string;
252
+ startAmount: string;
253
+ endAmount: string;
254
+ };
255
+ consideration: {
256
+ recipient: string;
257
+ token: string;
258
+ itemType: string;
259
+ identifier: string;
260
+ startAmount: string;
261
+ endAmount: string;
262
+ };
263
+ nftTokenId: string | null;
264
+ createdBlockNumber: string;
265
+ remainingAmount: string | null;
266
+ createdAt: string;
267
+ updatedAt: string;
268
+ parentOrderHash?: string | null | undefined;
269
+ counterOfferMessage?: string | null | undefined;
270
+ hasActiveCounterOffer?: boolean | undefined;
271
+ }[]>>;
22
272
  };
23
273
  declare function useUserOrders(address: string | null): {
24
- orders: ApiOrder[];
274
+ orders: {
275
+ offerer: string;
276
+ nftContract: string | null;
277
+ price: {
278
+ currency: string | null;
279
+ raw: string | null;
280
+ formatted: string | null;
281
+ decimals: number;
282
+ };
283
+ endTime: string;
284
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
285
+ fulfiller: string | null;
286
+ orderHash: string;
287
+ startTime: string;
288
+ txHash: {
289
+ created: string | null;
290
+ fulfilled: string | null;
291
+ cancelled: string | null;
292
+ };
293
+ token: {
294
+ name: string | null;
295
+ description: string | null;
296
+ image: string | null;
297
+ animationUrl: string | null;
298
+ } | null;
299
+ chain: string;
300
+ id: string;
301
+ offer: {
302
+ token: string;
303
+ itemType: string;
304
+ identifier: string;
305
+ startAmount: string;
306
+ endAmount: string;
307
+ };
308
+ consideration: {
309
+ recipient: string;
310
+ token: string;
311
+ itemType: string;
312
+ identifier: string;
313
+ startAmount: string;
314
+ endAmount: string;
315
+ };
316
+ nftTokenId: string | null;
317
+ createdBlockNumber: string;
318
+ remainingAmount: string | null;
319
+ createdAt: string;
320
+ updatedAt: string;
321
+ parentOrderHash?: string | null | undefined;
322
+ counterOfferMessage?: string | null | undefined;
323
+ hasActiveCounterOffer?: boolean | undefined;
324
+ }[];
25
325
  isLoading: boolean;
26
326
  error: any;
27
- mutate: swr.KeyedMutator<ApiResponse<ApiOrder[]>>;
327
+ mutate: swr.KeyedMutator<ApiResponse<{
328
+ offerer: string;
329
+ nftContract: string | null;
330
+ price: {
331
+ currency: string | null;
332
+ raw: string | null;
333
+ formatted: string | null;
334
+ decimals: number;
335
+ };
336
+ endTime: string;
337
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
338
+ fulfiller: string | null;
339
+ orderHash: string;
340
+ startTime: string;
341
+ txHash: {
342
+ created: string | null;
343
+ fulfilled: string | null;
344
+ cancelled: string | null;
345
+ };
346
+ token: {
347
+ name: string | null;
348
+ description: string | null;
349
+ image: string | null;
350
+ animationUrl: string | null;
351
+ } | null;
352
+ chain: string;
353
+ id: string;
354
+ offer: {
355
+ token: string;
356
+ itemType: string;
357
+ identifier: string;
358
+ startAmount: string;
359
+ endAmount: string;
360
+ };
361
+ consideration: {
362
+ recipient: string;
363
+ token: string;
364
+ itemType: string;
365
+ identifier: string;
366
+ startAmount: string;
367
+ endAmount: string;
368
+ };
369
+ nftTokenId: string | null;
370
+ createdBlockNumber: string;
371
+ remainingAmount: string | null;
372
+ createdAt: string;
373
+ updatedAt: string;
374
+ parentOrderHash?: string | null | undefined;
375
+ counterOfferMessage?: string | null | undefined;
376
+ hasActiveCounterOffer?: boolean | undefined;
377
+ }[]>>;
28
378
  };
29
379
  declare function useCounterOffers({ originalOrderHash, sellerAddress, }: {
30
380
  originalOrderHash?: string | null;
31
381
  sellerAddress?: string | null;
32
382
  }): {
33
- counterOffers: ApiOrder[];
383
+ counterOffers: {
384
+ offerer: string;
385
+ nftContract: string | null;
386
+ price: {
387
+ currency: string | null;
388
+ raw: string | null;
389
+ formatted: string | null;
390
+ decimals: number;
391
+ };
392
+ endTime: string;
393
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
394
+ fulfiller: string | null;
395
+ orderHash: string;
396
+ startTime: string;
397
+ txHash: {
398
+ created: string | null;
399
+ fulfilled: string | null;
400
+ cancelled: string | null;
401
+ };
402
+ token: {
403
+ name: string | null;
404
+ description: string | null;
405
+ image: string | null;
406
+ animationUrl: string | null;
407
+ } | null;
408
+ chain: string;
409
+ id: string;
410
+ offer: {
411
+ token: string;
412
+ itemType: string;
413
+ identifier: string;
414
+ startAmount: string;
415
+ endAmount: string;
416
+ };
417
+ consideration: {
418
+ recipient: string;
419
+ token: string;
420
+ itemType: string;
421
+ identifier: string;
422
+ startAmount: string;
423
+ endAmount: string;
424
+ };
425
+ nftTokenId: string | null;
426
+ createdBlockNumber: string;
427
+ remainingAmount: string | null;
428
+ createdAt: string;
429
+ updatedAt: string;
430
+ parentOrderHash?: string | null | undefined;
431
+ counterOfferMessage?: string | null | undefined;
432
+ hasActiveCounterOffer?: boolean | undefined;
433
+ }[];
34
434
  total: number;
35
435
  isLoading: boolean;
36
436
  error: any;
37
- mutate: swr.KeyedMutator<ApiResponse<ApiOrder[]>>;
437
+ mutate: swr.KeyedMutator<ApiResponse<{
438
+ offerer: string;
439
+ nftContract: string | null;
440
+ price: {
441
+ currency: string | null;
442
+ raw: string | null;
443
+ formatted: string | null;
444
+ decimals: number;
445
+ };
446
+ endTime: string;
447
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
448
+ fulfiller: string | null;
449
+ orderHash: string;
450
+ startTime: string;
451
+ txHash: {
452
+ created: string | null;
453
+ fulfilled: string | null;
454
+ cancelled: string | null;
455
+ };
456
+ token: {
457
+ name: string | null;
458
+ description: string | null;
459
+ image: string | null;
460
+ animationUrl: string | null;
461
+ } | null;
462
+ chain: string;
463
+ id: string;
464
+ offer: {
465
+ token: string;
466
+ itemType: string;
467
+ identifier: string;
468
+ startAmount: string;
469
+ endAmount: string;
470
+ };
471
+ consideration: {
472
+ recipient: string;
473
+ token: string;
474
+ itemType: string;
475
+ identifier: string;
476
+ startAmount: string;
477
+ endAmount: string;
478
+ };
479
+ nftTokenId: string | null;
480
+ createdBlockNumber: string;
481
+ remainingAmount: string | null;
482
+ createdAt: string;
483
+ updatedAt: string;
484
+ parentOrderHash?: string | null | undefined;
485
+ counterOfferMessage?: string | null | undefined;
486
+ hasActiveCounterOffer?: boolean | undefined;
487
+ }[]>>;
38
488
  };
39
489
  declare function useReceivedOffers(address: string | null): {
40
- orders: ApiOrder[];
490
+ orders: {
491
+ offerer: string;
492
+ nftContract: string | null;
493
+ price: {
494
+ currency: string | null;
495
+ raw: string | null;
496
+ formatted: string | null;
497
+ decimals: number;
498
+ };
499
+ endTime: string;
500
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
501
+ fulfiller: string | null;
502
+ orderHash: string;
503
+ startTime: string;
504
+ txHash: {
505
+ created: string | null;
506
+ fulfilled: string | null;
507
+ cancelled: string | null;
508
+ };
509
+ token: {
510
+ name: string | null;
511
+ description: string | null;
512
+ image: string | null;
513
+ animationUrl: string | null;
514
+ } | null;
515
+ chain: string;
516
+ id: string;
517
+ offer: {
518
+ token: string;
519
+ itemType: string;
520
+ identifier: string;
521
+ startAmount: string;
522
+ endAmount: string;
523
+ };
524
+ consideration: {
525
+ recipient: string;
526
+ token: string;
527
+ itemType: string;
528
+ identifier: string;
529
+ startAmount: string;
530
+ endAmount: string;
531
+ };
532
+ nftTokenId: string | null;
533
+ createdBlockNumber: string;
534
+ remainingAmount: string | null;
535
+ createdAt: string;
536
+ updatedAt: string;
537
+ parentOrderHash?: string | null | undefined;
538
+ counterOfferMessage?: string | null | undefined;
539
+ hasActiveCounterOffer?: boolean | undefined;
540
+ }[];
41
541
  isLoading: boolean;
42
542
  error: any;
43
- mutate: swr.KeyedMutator<ApiResponse<ApiOrder[]>>;
543
+ mutate: swr.KeyedMutator<ApiResponse<{
544
+ offerer: string;
545
+ nftContract: string | null;
546
+ price: {
547
+ currency: string | null;
548
+ raw: string | null;
549
+ formatted: string | null;
550
+ decimals: number;
551
+ };
552
+ endTime: string;
553
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
554
+ fulfiller: string | null;
555
+ orderHash: string;
556
+ startTime: string;
557
+ txHash: {
558
+ created: string | null;
559
+ fulfilled: string | null;
560
+ cancelled: string | null;
561
+ };
562
+ token: {
563
+ name: string | null;
564
+ description: string | null;
565
+ image: string | null;
566
+ animationUrl: string | null;
567
+ } | null;
568
+ chain: string;
569
+ id: string;
570
+ offer: {
571
+ token: string;
572
+ itemType: string;
573
+ identifier: string;
574
+ startAmount: string;
575
+ endAmount: string;
576
+ };
577
+ consideration: {
578
+ recipient: string;
579
+ token: string;
580
+ itemType: string;
581
+ identifier: string;
582
+ startAmount: string;
583
+ endAmount: string;
584
+ };
585
+ nftTokenId: string | null;
586
+ createdBlockNumber: string;
587
+ remainingAmount: string | null;
588
+ createdAt: string;
589
+ updatedAt: string;
590
+ parentOrderHash?: string | null | undefined;
591
+ counterOfferMessage?: string | null | undefined;
592
+ hasActiveCounterOffer?: boolean | undefined;
593
+ }[]>>;
44
594
  };
45
595
  declare function useCollectionFloorListings(contract: string | null, limit?: number): {
46
- listings: ApiOrder[];
596
+ listings: {
597
+ offerer: string;
598
+ nftContract: string | null;
599
+ price: {
600
+ currency: string | null;
601
+ raw: string | null;
602
+ formatted: string | null;
603
+ decimals: number;
604
+ };
605
+ endTime: string;
606
+ status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
607
+ fulfiller: string | null;
608
+ orderHash: string;
609
+ startTime: string;
610
+ txHash: {
611
+ created: string | null;
612
+ fulfilled: string | null;
613
+ cancelled: string | null;
614
+ };
615
+ token: {
616
+ name: string | null;
617
+ description: string | null;
618
+ image: string | null;
619
+ animationUrl: string | null;
620
+ } | null;
621
+ chain: string;
622
+ id: string;
623
+ offer: {
624
+ token: string;
625
+ itemType: string;
626
+ identifier: string;
627
+ startAmount: string;
628
+ endAmount: string;
629
+ };
630
+ consideration: {
631
+ recipient: string;
632
+ token: string;
633
+ itemType: string;
634
+ identifier: string;
635
+ startAmount: string;
636
+ endAmount: string;
637
+ };
638
+ nftTokenId: string | null;
639
+ createdBlockNumber: string;
640
+ remainingAmount: string | null;
641
+ createdAt: string;
642
+ updatedAt: string;
643
+ parentOrderHash?: string | null | undefined;
644
+ counterOfferMessage?: string | null | undefined;
645
+ hasActiveCounterOffer?: boolean | undefined;
646
+ }[];
47
647
  isLoading: boolean;
48
648
  error: any;
49
649
  };