@medialane/ui 0.221.0 → 0.222.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/README.md +1 -1
- package/dist/components/account/input-otp.d.cts +2 -2
- package/dist/components/account/input-otp.d.ts +2 -2
- package/dist/components/button.d.cts +2 -2
- package/dist/components/button.d.ts +2 -2
- package/dist/components/remix-browse-page.cjs +1 -4
- package/dist/components/remix-browse-page.cjs.map +1 -1
- package/dist/components/remix-browse-page.js +1 -4
- package/dist/components/remix-browse-page.js.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/utils/use-collections.d.cts +439 -9
- package/dist/utils/use-collections.d.ts +439 -9
- package/dist/utils/use-pop.d.cts +113 -4
- package/dist/utils/use-pop.d.ts +113 -4
- package/dist/utils/use-tiers.d.cts +150 -5
- package/dist/utils/use-tiers.d.ts +150 -5
- package/dist/utils/use-tokens-by-ip-type.d.cts +170 -3
- package/dist/utils/use-tokens-by-ip-type.d.ts +170 -3
- package/dist/utils/use-tokens.d.cts +337 -5
- package/dist/utils/use-tokens.d.ts +337 -5
- package/package.json +3 -3
|
@@ -1,24 +1,356 @@
|
|
|
1
1
|
import * as _medialane_sdk from '@medialane/sdk';
|
|
2
|
-
import { ApiToken } from '@medialane/sdk';
|
|
3
2
|
import * as swr from 'swr';
|
|
3
|
+
import * as zod from 'zod';
|
|
4
4
|
|
|
5
5
|
declare function useToken(contract: string | null, tokenId: string | null): {
|
|
6
|
-
token:
|
|
6
|
+
token: {
|
|
7
|
+
chain: string;
|
|
8
|
+
tokenId: string;
|
|
9
|
+
owner: string | null;
|
|
10
|
+
tokenUri: string | null;
|
|
11
|
+
contractAddress: string;
|
|
12
|
+
id: string;
|
|
13
|
+
createdAt: string;
|
|
14
|
+
updatedAt: string;
|
|
15
|
+
metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
|
|
16
|
+
standard: "ERC721" | "ERC1155" | null;
|
|
17
|
+
metadata: {
|
|
18
|
+
name: string | null;
|
|
19
|
+
description: string | null;
|
|
20
|
+
image: string | null;
|
|
21
|
+
author: string | null;
|
|
22
|
+
animationUrl: string | null;
|
|
23
|
+
attributes: zod.objectOutputType<{
|
|
24
|
+
trait_type: zod.ZodString;
|
|
25
|
+
value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
|
|
26
|
+
display_type: zod.ZodOptional<zod.ZodString>;
|
|
27
|
+
}, zod.ZodTypeAny, "passthrough">[] | null;
|
|
28
|
+
ipType: string | null;
|
|
29
|
+
licenseType: string | null;
|
|
30
|
+
commercialUse: boolean | null;
|
|
31
|
+
};
|
|
32
|
+
balances: {
|
|
33
|
+
amount: string;
|
|
34
|
+
owner: string;
|
|
35
|
+
}[] | null;
|
|
36
|
+
activeOrders: {
|
|
37
|
+
status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
|
|
38
|
+
chain: string;
|
|
39
|
+
offerer: string;
|
|
40
|
+
nftContract: string | null;
|
|
41
|
+
price: {
|
|
42
|
+
currency: string | null;
|
|
43
|
+
raw: string | null;
|
|
44
|
+
formatted: string | null;
|
|
45
|
+
decimals: number;
|
|
46
|
+
};
|
|
47
|
+
endTime: string;
|
|
48
|
+
fulfiller: string | null;
|
|
49
|
+
orderHash: string;
|
|
50
|
+
startTime: string;
|
|
51
|
+
txHash: {
|
|
52
|
+
created: string | null;
|
|
53
|
+
fulfilled: string | null;
|
|
54
|
+
cancelled: string | null;
|
|
55
|
+
};
|
|
56
|
+
token: {
|
|
57
|
+
name: string | null;
|
|
58
|
+
description: string | null;
|
|
59
|
+
image: string | null;
|
|
60
|
+
animationUrl: string | null;
|
|
61
|
+
} | null;
|
|
62
|
+
offer: {
|
|
63
|
+
token: string;
|
|
64
|
+
itemType: string;
|
|
65
|
+
identifier: string;
|
|
66
|
+
startAmount: string;
|
|
67
|
+
endAmount: string;
|
|
68
|
+
};
|
|
69
|
+
id: string;
|
|
70
|
+
consideration: {
|
|
71
|
+
recipient: string;
|
|
72
|
+
token: string;
|
|
73
|
+
itemType: string;
|
|
74
|
+
identifier: string;
|
|
75
|
+
startAmount: string;
|
|
76
|
+
endAmount: string;
|
|
77
|
+
};
|
|
78
|
+
nftTokenId: string | null;
|
|
79
|
+
createdBlockNumber: string;
|
|
80
|
+
remainingAmount: string | null;
|
|
81
|
+
createdAt: string;
|
|
82
|
+
updatedAt: string;
|
|
83
|
+
parentOrderHash?: string | null | undefined;
|
|
84
|
+
counterOfferMessage?: string | null | undefined;
|
|
85
|
+
hasActiveCounterOffer?: boolean | undefined;
|
|
86
|
+
}[];
|
|
87
|
+
holderCount?: number | undefined;
|
|
88
|
+
supply?: string | undefined;
|
|
89
|
+
} | null;
|
|
7
90
|
isLoading: boolean;
|
|
8
91
|
isIndexing: boolean;
|
|
9
92
|
error: any;
|
|
10
|
-
mutate: swr.KeyedMutator<
|
|
93
|
+
mutate: swr.KeyedMutator<{
|
|
94
|
+
chain: string;
|
|
95
|
+
tokenId: string;
|
|
96
|
+
owner: string | null;
|
|
97
|
+
tokenUri: string | null;
|
|
98
|
+
contractAddress: string;
|
|
99
|
+
id: string;
|
|
100
|
+
createdAt: string;
|
|
101
|
+
updatedAt: string;
|
|
102
|
+
metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
|
|
103
|
+
standard: "ERC721" | "ERC1155" | null;
|
|
104
|
+
metadata: {
|
|
105
|
+
name: string | null;
|
|
106
|
+
description: string | null;
|
|
107
|
+
image: string | null;
|
|
108
|
+
author: string | null;
|
|
109
|
+
animationUrl: string | null;
|
|
110
|
+
attributes: zod.objectOutputType<{
|
|
111
|
+
trait_type: zod.ZodString;
|
|
112
|
+
value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
|
|
113
|
+
display_type: zod.ZodOptional<zod.ZodString>;
|
|
114
|
+
}, zod.ZodTypeAny, "passthrough">[] | null;
|
|
115
|
+
ipType: string | null;
|
|
116
|
+
licenseType: string | null;
|
|
117
|
+
commercialUse: boolean | null;
|
|
118
|
+
};
|
|
119
|
+
balances: {
|
|
120
|
+
amount: string;
|
|
121
|
+
owner: string;
|
|
122
|
+
}[] | null;
|
|
123
|
+
activeOrders: {
|
|
124
|
+
status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
|
|
125
|
+
chain: string;
|
|
126
|
+
offerer: string;
|
|
127
|
+
nftContract: string | null;
|
|
128
|
+
price: {
|
|
129
|
+
currency: string | null;
|
|
130
|
+
raw: string | null;
|
|
131
|
+
formatted: string | null;
|
|
132
|
+
decimals: number;
|
|
133
|
+
};
|
|
134
|
+
endTime: string;
|
|
135
|
+
fulfiller: string | null;
|
|
136
|
+
orderHash: string;
|
|
137
|
+
startTime: string;
|
|
138
|
+
txHash: {
|
|
139
|
+
created: string | null;
|
|
140
|
+
fulfilled: string | null;
|
|
141
|
+
cancelled: string | null;
|
|
142
|
+
};
|
|
143
|
+
token: {
|
|
144
|
+
name: string | null;
|
|
145
|
+
description: string | null;
|
|
146
|
+
image: string | null;
|
|
147
|
+
animationUrl: string | null;
|
|
148
|
+
} | null;
|
|
149
|
+
offer: {
|
|
150
|
+
token: string;
|
|
151
|
+
itemType: string;
|
|
152
|
+
identifier: string;
|
|
153
|
+
startAmount: string;
|
|
154
|
+
endAmount: string;
|
|
155
|
+
};
|
|
156
|
+
id: string;
|
|
157
|
+
consideration: {
|
|
158
|
+
recipient: string;
|
|
159
|
+
token: string;
|
|
160
|
+
itemType: string;
|
|
161
|
+
identifier: string;
|
|
162
|
+
startAmount: string;
|
|
163
|
+
endAmount: string;
|
|
164
|
+
};
|
|
165
|
+
nftTokenId: string | null;
|
|
166
|
+
createdBlockNumber: string;
|
|
167
|
+
remainingAmount: string | null;
|
|
168
|
+
createdAt: string;
|
|
169
|
+
updatedAt: string;
|
|
170
|
+
parentOrderHash?: string | null | undefined;
|
|
171
|
+
counterOfferMessage?: string | null | undefined;
|
|
172
|
+
hasActiveCounterOffer?: boolean | undefined;
|
|
173
|
+
}[];
|
|
174
|
+
holderCount?: number | undefined;
|
|
175
|
+
supply?: string | undefined;
|
|
176
|
+
}>;
|
|
11
177
|
};
|
|
12
178
|
declare function useTokenBalance(contract: string | null, tokenId: string | null, owner: string | null | undefined): {
|
|
13
179
|
amount: string | null;
|
|
14
180
|
mutate: swr.KeyedMutator<_medialane_sdk.ApiTokenBalance>;
|
|
15
181
|
};
|
|
16
182
|
declare function useTokensByOwner(address: string | null, page?: number, limit?: number, refreshMs?: number): {
|
|
17
|
-
tokens:
|
|
183
|
+
tokens: {
|
|
184
|
+
chain: string;
|
|
185
|
+
tokenId: string;
|
|
186
|
+
owner: string | null;
|
|
187
|
+
tokenUri: string | null;
|
|
188
|
+
contractAddress: string;
|
|
189
|
+
id: string;
|
|
190
|
+
createdAt: string;
|
|
191
|
+
updatedAt: string;
|
|
192
|
+
metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
|
|
193
|
+
standard: "ERC721" | "ERC1155" | null;
|
|
194
|
+
metadata: {
|
|
195
|
+
name: string | null;
|
|
196
|
+
description: string | null;
|
|
197
|
+
image: string | null;
|
|
198
|
+
author: string | null;
|
|
199
|
+
animationUrl: string | null;
|
|
200
|
+
attributes: zod.objectOutputType<{
|
|
201
|
+
trait_type: zod.ZodString;
|
|
202
|
+
value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
|
|
203
|
+
display_type: zod.ZodOptional<zod.ZodString>;
|
|
204
|
+
}, zod.ZodTypeAny, "passthrough">[] | null;
|
|
205
|
+
ipType: string | null;
|
|
206
|
+
licenseType: string | null;
|
|
207
|
+
commercialUse: boolean | null;
|
|
208
|
+
};
|
|
209
|
+
balances: {
|
|
210
|
+
amount: string;
|
|
211
|
+
owner: string;
|
|
212
|
+
}[] | null;
|
|
213
|
+
activeOrders: {
|
|
214
|
+
status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
|
|
215
|
+
chain: string;
|
|
216
|
+
offerer: string;
|
|
217
|
+
nftContract: string | null;
|
|
218
|
+
price: {
|
|
219
|
+
currency: string | null;
|
|
220
|
+
raw: string | null;
|
|
221
|
+
formatted: string | null;
|
|
222
|
+
decimals: number;
|
|
223
|
+
};
|
|
224
|
+
endTime: string;
|
|
225
|
+
fulfiller: string | null;
|
|
226
|
+
orderHash: string;
|
|
227
|
+
startTime: string;
|
|
228
|
+
txHash: {
|
|
229
|
+
created: string | null;
|
|
230
|
+
fulfilled: string | null;
|
|
231
|
+
cancelled: string | null;
|
|
232
|
+
};
|
|
233
|
+
token: {
|
|
234
|
+
name: string | null;
|
|
235
|
+
description: string | null;
|
|
236
|
+
image: string | null;
|
|
237
|
+
animationUrl: string | null;
|
|
238
|
+
} | null;
|
|
239
|
+
offer: {
|
|
240
|
+
token: string;
|
|
241
|
+
itemType: string;
|
|
242
|
+
identifier: string;
|
|
243
|
+
startAmount: string;
|
|
244
|
+
endAmount: string;
|
|
245
|
+
};
|
|
246
|
+
id: string;
|
|
247
|
+
consideration: {
|
|
248
|
+
recipient: string;
|
|
249
|
+
token: string;
|
|
250
|
+
itemType: string;
|
|
251
|
+
identifier: string;
|
|
252
|
+
startAmount: string;
|
|
253
|
+
endAmount: string;
|
|
254
|
+
};
|
|
255
|
+
nftTokenId: string | null;
|
|
256
|
+
createdBlockNumber: string;
|
|
257
|
+
remainingAmount: string | null;
|
|
258
|
+
createdAt: string;
|
|
259
|
+
updatedAt: string;
|
|
260
|
+
parentOrderHash?: string | null | undefined;
|
|
261
|
+
counterOfferMessage?: string | null | undefined;
|
|
262
|
+
hasActiveCounterOffer?: boolean | undefined;
|
|
263
|
+
}[];
|
|
264
|
+
holderCount?: number | undefined;
|
|
265
|
+
supply?: string | undefined;
|
|
266
|
+
}[];
|
|
18
267
|
meta: _medialane_sdk.ApiMeta | undefined;
|
|
19
268
|
isLoading: boolean;
|
|
20
269
|
error: any;
|
|
21
|
-
mutate: swr.KeyedMutator<_medialane_sdk.ApiResponse<
|
|
270
|
+
mutate: swr.KeyedMutator<_medialane_sdk.ApiResponse<{
|
|
271
|
+
chain: string;
|
|
272
|
+
tokenId: string;
|
|
273
|
+
owner: string | null;
|
|
274
|
+
tokenUri: string | null;
|
|
275
|
+
contractAddress: string;
|
|
276
|
+
id: string;
|
|
277
|
+
createdAt: string;
|
|
278
|
+
updatedAt: string;
|
|
279
|
+
metadataStatus: "PENDING" | "FETCHING" | "FETCHED" | "FAILED";
|
|
280
|
+
standard: "ERC721" | "ERC1155" | null;
|
|
281
|
+
metadata: {
|
|
282
|
+
name: string | null;
|
|
283
|
+
description: string | null;
|
|
284
|
+
image: string | null;
|
|
285
|
+
author: string | null;
|
|
286
|
+
animationUrl: string | null;
|
|
287
|
+
attributes: zod.objectOutputType<{
|
|
288
|
+
trait_type: zod.ZodString;
|
|
289
|
+
value: zod.ZodUnion<[zod.ZodString, zod.ZodNumber, zod.ZodBoolean]>;
|
|
290
|
+
display_type: zod.ZodOptional<zod.ZodString>;
|
|
291
|
+
}, zod.ZodTypeAny, "passthrough">[] | null;
|
|
292
|
+
ipType: string | null;
|
|
293
|
+
licenseType: string | null;
|
|
294
|
+
commercialUse: boolean | null;
|
|
295
|
+
};
|
|
296
|
+
balances: {
|
|
297
|
+
amount: string;
|
|
298
|
+
owner: string;
|
|
299
|
+
}[] | null;
|
|
300
|
+
activeOrders: {
|
|
301
|
+
status: "ACTIVE" | "FULFILLED" | "CANCELLED" | "EXPIRED";
|
|
302
|
+
chain: string;
|
|
303
|
+
offerer: string;
|
|
304
|
+
nftContract: string | null;
|
|
305
|
+
price: {
|
|
306
|
+
currency: string | null;
|
|
307
|
+
raw: string | null;
|
|
308
|
+
formatted: string | null;
|
|
309
|
+
decimals: number;
|
|
310
|
+
};
|
|
311
|
+
endTime: string;
|
|
312
|
+
fulfiller: string | null;
|
|
313
|
+
orderHash: string;
|
|
314
|
+
startTime: string;
|
|
315
|
+
txHash: {
|
|
316
|
+
created: string | null;
|
|
317
|
+
fulfilled: string | null;
|
|
318
|
+
cancelled: string | null;
|
|
319
|
+
};
|
|
320
|
+
token: {
|
|
321
|
+
name: string | null;
|
|
322
|
+
description: string | null;
|
|
323
|
+
image: string | null;
|
|
324
|
+
animationUrl: string | null;
|
|
325
|
+
} | null;
|
|
326
|
+
offer: {
|
|
327
|
+
token: string;
|
|
328
|
+
itemType: string;
|
|
329
|
+
identifier: string;
|
|
330
|
+
startAmount: string;
|
|
331
|
+
endAmount: string;
|
|
332
|
+
};
|
|
333
|
+
id: string;
|
|
334
|
+
consideration: {
|
|
335
|
+
recipient: string;
|
|
336
|
+
token: string;
|
|
337
|
+
itemType: string;
|
|
338
|
+
identifier: string;
|
|
339
|
+
startAmount: string;
|
|
340
|
+
endAmount: string;
|
|
341
|
+
};
|
|
342
|
+
nftTokenId: string | null;
|
|
343
|
+
createdBlockNumber: string;
|
|
344
|
+
remainingAmount: string | null;
|
|
345
|
+
createdAt: string;
|
|
346
|
+
updatedAt: string;
|
|
347
|
+
parentOrderHash?: string | null | undefined;
|
|
348
|
+
counterOfferMessage?: string | null | undefined;
|
|
349
|
+
hasActiveCounterOffer?: boolean | undefined;
|
|
350
|
+
}[];
|
|
351
|
+
holderCount?: number | undefined;
|
|
352
|
+
supply?: string | undefined;
|
|
353
|
+
}[]>>;
|
|
22
354
|
};
|
|
23
355
|
declare function useTokenHistory(contract: string | null, tokenId: string | null): {
|
|
24
356
|
history: _medialane_sdk.ApiActivity[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medialane/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.222.0",
|
|
4
4
|
"description": "Shared UI components for Medialane apps",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"preview": "vite --config preview/vite.config.ts"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"@medialane/sdk": ">=0.
|
|
54
|
+
"@medialane/sdk": ">=0.200.0 <0.202.0",
|
|
55
55
|
"@radix-ui/react-checkbox": ">=1.1.0",
|
|
56
56
|
"@radix-ui/react-collapsible": ">=1.1.0",
|
|
57
57
|
"@radix-ui/react-dialog": ">=1.1.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@happy-dom/global-registrator": "^20.14.5",
|
|
86
|
-
"@medialane/sdk": "0.
|
|
86
|
+
"@medialane/sdk": "0.200.0",
|
|
87
87
|
"@radix-ui/react-checkbox": "^1.3.8",
|
|
88
88
|
"@radix-ui/react-collapsible": "^1.1.17",
|
|
89
89
|
"@radix-ui/react-dialog": "^1.1.20",
|