@medialane/ui 0.200.1 → 0.201.1

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 (333) hide show
  1. package/dist/components/action-button.cjs +3 -3
  2. package/dist/components/action-button.cjs.map +1 -1
  3. package/dist/components/action-button.d.cts +1 -2
  4. package/dist/components/action-button.d.ts +1 -2
  5. package/dist/components/action-button.js +3 -3
  6. package/dist/components/action-button.js.map +1 -1
  7. package/dist/components/activities-feed.cjs +3 -3
  8. package/dist/components/activities-feed.cjs.map +1 -1
  9. package/dist/components/activities-feed.d.cts +2 -6
  10. package/dist/components/activities-feed.d.ts +2 -6
  11. package/dist/components/activities-feed.js +3 -3
  12. package/dist/components/activities-feed.js.map +1 -1
  13. package/dist/components/asset-comments-dialog.cjs +76 -0
  14. package/dist/components/asset-comments-dialog.cjs.map +1 -0
  15. package/dist/components/asset-comments-dialog.d.cts +26 -0
  16. package/dist/components/asset-comments-dialog.d.ts +26 -0
  17. package/dist/components/asset-comments-dialog.js +42 -0
  18. package/dist/components/asset-comments-dialog.js.map +1 -0
  19. package/dist/components/asset-marketplace-panel.cjs +77 -139
  20. package/dist/components/asset-marketplace-panel.cjs.map +1 -1
  21. package/dist/components/asset-marketplace-panel.d.cts +2 -5
  22. package/dist/components/asset-marketplace-panel.d.ts +2 -5
  23. package/dist/components/asset-marketplace-panel.js +78 -141
  24. package/dist/components/asset-marketplace-panel.js.map +1 -1
  25. package/dist/components/asset-owners-panel.cjs +38 -22
  26. package/dist/components/asset-owners-panel.cjs.map +1 -1
  27. package/dist/components/asset-owners-panel.d.cts +3 -1
  28. package/dist/components/asset-owners-panel.d.ts +3 -1
  29. package/dist/components/asset-owners-panel.js +38 -22
  30. package/dist/components/asset-owners-panel.js.map +1 -1
  31. package/dist/components/asset-page.cjs +324 -0
  32. package/dist/components/asset-page.cjs.map +1 -0
  33. package/dist/components/asset-page.d.cts +44 -0
  34. package/dist/components/asset-page.d.ts +44 -0
  35. package/dist/components/asset-page.js +298 -0
  36. package/dist/components/asset-page.js.map +1 -0
  37. package/dist/components/asset-provenance-tab.cjs +1 -3
  38. package/dist/components/asset-provenance-tab.cjs.map +1 -1
  39. package/dist/components/asset-provenance-tab.js +1 -3
  40. package/dist/components/asset-provenance-tab.js.map +1 -1
  41. package/dist/components/asset-top-sections.cjs +9 -1
  42. package/dist/components/asset-top-sections.cjs.map +1 -1
  43. package/dist/components/asset-top-sections.d.cts +3 -1
  44. package/dist/components/asset-top-sections.d.ts +3 -1
  45. package/dist/components/asset-top-sections.js +9 -1
  46. package/dist/components/asset-top-sections.js.map +1 -1
  47. package/dist/components/asset-type-panels.cjs +139 -0
  48. package/dist/components/asset-type-panels.cjs.map +1 -0
  49. package/dist/components/asset-type-panels.d.cts +11 -0
  50. package/dist/components/asset-type-panels.d.ts +11 -0
  51. package/dist/components/asset-type-panels.js +114 -0
  52. package/dist/components/asset-type-panels.js.map +1 -0
  53. package/dist/components/collection-activity-tab.cjs +2 -2
  54. package/dist/components/collection-activity-tab.cjs.map +1 -1
  55. package/dist/components/collection-activity-tab.d.cts +1 -3
  56. package/dist/components/collection-activity-tab.d.ts +1 -3
  57. package/dist/components/collection-activity-tab.js +2 -2
  58. package/dist/components/collection-activity-tab.js.map +1 -1
  59. package/dist/components/collection-filters-dialog.cjs +98 -0
  60. package/dist/components/collection-filters-dialog.cjs.map +1 -0
  61. package/dist/components/collection-filters-dialog.d.cts +13 -0
  62. package/dist/components/collection-filters-dialog.d.ts +13 -0
  63. package/dist/components/collection-filters-dialog.js +74 -0
  64. package/dist/components/collection-filters-dialog.js.map +1 -0
  65. package/dist/components/collection-header.cjs +82 -0
  66. package/dist/components/collection-header.cjs.map +1 -0
  67. package/dist/components/collection-header.d.cts +13 -0
  68. package/dist/components/collection-header.d.ts +13 -0
  69. package/dist/components/collection-header.js +58 -0
  70. package/dist/components/collection-header.js.map +1 -0
  71. package/dist/components/collection-page.cjs +274 -0
  72. package/dist/components/collection-page.cjs.map +1 -0
  73. package/dist/components/collection-page.d.cts +32 -0
  74. package/dist/components/collection-page.d.ts +32 -0
  75. package/dist/components/collection-page.js +239 -0
  76. package/dist/components/collection-page.js.map +1 -0
  77. package/dist/components/collection-traits-tab.cjs +2 -2
  78. package/dist/components/collection-traits-tab.cjs.map +1 -1
  79. package/dist/components/collection-traits-tab.d.cts +1 -3
  80. package/dist/components/collection-traits-tab.d.ts +1 -3
  81. package/dist/components/collection-traits-tab.js +2 -2
  82. package/dist/components/collection-traits-tab.js.map +1 -1
  83. package/dist/components/creator-chip.cjs +2 -2
  84. package/dist/components/creator-chip.cjs.map +1 -1
  85. package/dist/components/creator-chip.d.cts +1 -3
  86. package/dist/components/creator-chip.d.ts +1 -3
  87. package/dist/components/creator-chip.js +2 -2
  88. package/dist/components/creator-chip.js.map +1 -1
  89. package/dist/components/creator-header.cjs +80 -0
  90. package/dist/components/creator-header.cjs.map +1 -0
  91. package/dist/components/creator-header.d.cts +18 -0
  92. package/dist/components/creator-header.d.ts +18 -0
  93. package/dist/components/creator-header.js +56 -0
  94. package/dist/components/creator-header.js.map +1 -0
  95. package/dist/components/creator-score-inline.cjs +2 -2
  96. package/dist/components/creator-score-inline.cjs.map +1 -1
  97. package/dist/components/creator-score-inline.d.cts +1 -3
  98. package/dist/components/creator-score-inline.d.ts +1 -3
  99. package/dist/components/creator-score-inline.js +2 -2
  100. package/dist/components/creator-score-inline.js.map +1 -1
  101. package/dist/components/drop/create/drop-create.cjs +1 -1
  102. package/dist/components/drop/create/drop-create.cjs.map +1 -1
  103. package/dist/components/drop/create/drop-create.js +1 -1
  104. package/dist/components/drop/create/drop-create.js.map +1 -1
  105. package/dist/components/drop/drop-listing.cjs +1 -2
  106. package/dist/components/drop/drop-listing.cjs.map +1 -1
  107. package/dist/components/drop/drop-listing.d.cts +1 -3
  108. package/dist/components/drop/drop-listing.d.ts +1 -3
  109. package/dist/components/drop/drop-listing.js +1 -2
  110. package/dist/components/drop/drop-listing.js.map +1 -1
  111. package/dist/components/drop/my-drops.cjs +2 -2
  112. package/dist/components/drop/my-drops.cjs.map +1 -1
  113. package/dist/components/drop/my-drops.js +2 -2
  114. package/dist/components/drop/my-drops.js.map +1 -1
  115. package/dist/components/drop/page/drop-page.cjs +8 -8
  116. package/dist/components/drop/page/drop-page.cjs.map +1 -1
  117. package/dist/components/drop/page/drop-page.js +8 -8
  118. package/dist/components/drop/page/drop-page.js.map +1 -1
  119. package/dist/components/floating-comments-button.cjs +78 -0
  120. package/dist/components/floating-comments-button.cjs.map +1 -0
  121. package/dist/components/floating-comments-button.d.cts +9 -0
  122. package/dist/components/floating-comments-button.d.ts +9 -0
  123. package/dist/components/floating-comments-button.js +54 -0
  124. package/dist/components/floating-comments-button.js.map +1 -0
  125. package/dist/components/gated-content.cjs +142 -0
  126. package/dist/components/gated-content.cjs.map +1 -0
  127. package/dist/components/gated-content.d.cts +31 -0
  128. package/dist/components/gated-content.d.ts +31 -0
  129. package/dist/components/gated-content.js +117 -0
  130. package/dist/components/gated-content.js.map +1 -0
  131. package/dist/components/listing-card-menu.cjs +79 -0
  132. package/dist/components/listing-card-menu.cjs.map +1 -0
  133. package/dist/components/listing-card-menu.d.cts +8 -0
  134. package/dist/components/listing-card-menu.d.ts +8 -0
  135. package/dist/components/listing-card-menu.js +45 -0
  136. package/dist/components/listing-card-menu.js.map +1 -0
  137. package/dist/components/listing-card.cjs +2 -1
  138. package/dist/components/listing-card.cjs.map +1 -1
  139. package/dist/components/listing-card.js +2 -1
  140. package/dist/components/listing-card.js.map +1 -1
  141. package/dist/components/make-offer-picker.cjs +114 -0
  142. package/dist/components/make-offer-picker.cjs.map +1 -0
  143. package/dist/components/make-offer-picker.d.cts +9 -0
  144. package/dist/components/make-offer-picker.d.ts +9 -0
  145. package/dist/components/make-offer-picker.js +80 -0
  146. package/dist/components/make-offer-picker.js.map +1 -0
  147. package/dist/components/media-header.cjs +79 -0
  148. package/dist/components/media-header.cjs.map +1 -0
  149. package/dist/components/media-header.d.cts +23 -0
  150. package/dist/components/media-header.d.ts +23 -0
  151. package/dist/components/media-header.js +52 -0
  152. package/dist/components/media-header.js.map +1 -0
  153. package/dist/components/media-wallet/media-wallet-activity.cjs +3 -1
  154. package/dist/components/media-wallet/media-wallet-activity.cjs.map +1 -1
  155. package/dist/components/media-wallet/media-wallet-activity.js +3 -1
  156. package/dist/components/media-wallet/media-wallet-activity.js.map +1 -1
  157. package/dist/components/media-wallet/media-wallet-home.cjs +6 -6
  158. package/dist/components/media-wallet/media-wallet-home.cjs.map +1 -1
  159. package/dist/components/media-wallet/media-wallet-home.js +6 -6
  160. package/dist/components/media-wallet/media-wallet-home.js.map +1 -1
  161. package/dist/components/media-wallet/media-wallet-send.cjs +8 -6
  162. package/dist/components/media-wallet/media-wallet-send.cjs.map +1 -1
  163. package/dist/components/media-wallet/media-wallet-send.js +8 -6
  164. package/dist/components/media-wallet/media-wallet-send.js.map +1 -1
  165. package/dist/components/media-wallet/media-wallet-token-detail.cjs +4 -3
  166. package/dist/components/media-wallet/media-wallet-token-detail.cjs.map +1 -1
  167. package/dist/components/media-wallet/media-wallet-token-detail.js +4 -3
  168. package/dist/components/media-wallet/media-wallet-token-detail.js.map +1 -1
  169. package/dist/components/media-wallet/types.cjs.map +1 -1
  170. package/dist/components/media-wallet/types.d.cts +1 -2
  171. package/dist/components/media-wallet/types.d.ts +1 -2
  172. package/dist/components/media-wallet/types.js.map +1 -1
  173. package/dist/components/medialane-app.cjs.map +1 -1
  174. package/dist/components/medialane-app.d.cts +18 -2
  175. package/dist/components/medialane-app.d.ts +18 -2
  176. package/dist/components/medialane-app.js.map +1 -1
  177. package/dist/components/portfolio-activity.cjs +2 -2
  178. package/dist/components/portfolio-activity.cjs.map +1 -1
  179. package/dist/components/portfolio-activity.d.cts +1 -3
  180. package/dist/components/portfolio-activity.d.ts +1 -3
  181. package/dist/components/portfolio-activity.js +2 -2
  182. package/dist/components/portfolio-activity.js.map +1 -1
  183. package/dist/components/remixes-tab.cjs +2 -2
  184. package/dist/components/remixes-tab.cjs.map +1 -1
  185. package/dist/components/remixes-tab.d.cts +1 -3
  186. package/dist/components/remixes-tab.d.ts +1 -3
  187. package/dist/components/remixes-tab.js +2 -2
  188. package/dist/components/remixes-tab.js.map +1 -1
  189. package/dist/index.cjs +55 -3
  190. package/dist/index.cjs.map +1 -1
  191. package/dist/index.d.cts +18 -4
  192. package/dist/index.d.ts +18 -4
  193. package/dist/index.js +36 -3
  194. package/dist/index.js.map +1 -1
  195. package/dist/utils/asset-attributes.cjs +48 -0
  196. package/dist/utils/asset-attributes.cjs.map +1 -0
  197. package/dist/utils/asset-attributes.d.cts +13 -0
  198. package/dist/utils/asset-attributes.d.ts +13 -0
  199. package/dist/utils/asset-attributes.js +24 -0
  200. package/dist/utils/asset-attributes.js.map +1 -0
  201. package/dist/utils/asset-market-state.cjs +132 -0
  202. package/dist/utils/asset-market-state.cjs.map +1 -0
  203. package/dist/utils/asset-market-state.d.cts +33 -0
  204. package/dist/utils/asset-market-state.d.ts +33 -0
  205. package/dist/utils/asset-market-state.js +101 -0
  206. package/dist/utils/asset-market-state.js.map +1 -0
  207. package/dist/utils/media-wallet/use-erc20-balance.cjs +5 -3
  208. package/dist/utils/media-wallet/use-erc20-balance.cjs.map +1 -1
  209. package/dist/utils/media-wallet/use-erc20-balance.d.cts +3 -5
  210. package/dist/utils/media-wallet/use-erc20-balance.d.ts +3 -5
  211. package/dist/utils/media-wallet/use-erc20-balance.js +5 -3
  212. package/dist/utils/media-wallet/use-erc20-balance.js.map +1 -1
  213. package/dist/utils/use-activities.cjs +4 -4
  214. package/dist/utils/use-activities.cjs.map +1 -1
  215. package/dist/utils/use-activities.d.cts +2 -3
  216. package/dist/utils/use-activities.d.ts +2 -3
  217. package/dist/utils/use-activities.js +4 -4
  218. package/dist/utils/use-activities.js.map +1 -1
  219. package/dist/utils/use-coin-price.cjs +6 -6
  220. package/dist/utils/use-coin-price.cjs.map +1 -1
  221. package/dist/utils/use-coin-price.d.cts +2 -3
  222. package/dist/utils/use-coin-price.d.ts +2 -3
  223. package/dist/utils/use-coin-price.js +6 -6
  224. package/dist/utils/use-coin-price.js.map +1 -1
  225. package/dist/utils/use-collections.cjs +10 -10
  226. package/dist/utils/use-collections.cjs.map +1 -1
  227. package/dist/utils/use-collections.d.cts +5 -6
  228. package/dist/utils/use-collections.d.ts +5 -6
  229. package/dist/utils/use-collections.js +10 -10
  230. package/dist/utils/use-collections.js.map +1 -1
  231. package/dist/utils/use-comments.cjs +50 -0
  232. package/dist/utils/use-comments.cjs.map +1 -0
  233. package/dist/utils/use-comments.d.cts +12 -0
  234. package/dist/utils/use-comments.d.ts +12 -0
  235. package/dist/utils/use-comments.js +16 -0
  236. package/dist/utils/use-comments.js.map +1 -0
  237. package/dist/utils/use-creators.cjs +3 -1
  238. package/dist/utils/use-creators.cjs.map +1 -1
  239. package/dist/utils/use-creators.d.cts +1 -2
  240. package/dist/utils/use-creators.d.ts +1 -2
  241. package/dist/utils/use-creators.js +3 -1
  242. package/dist/utils/use-creators.js.map +1 -1
  243. package/dist/utils/use-drops.cjs +14 -14
  244. package/dist/utils/use-drops.cjs.map +1 -1
  245. package/dist/utils/use-drops.d.cts +7 -7
  246. package/dist/utils/use-drops.d.ts +7 -7
  247. package/dist/utils/use-drops.js +14 -14
  248. package/dist/utils/use-drops.js.map +1 -1
  249. package/dist/utils/use-full-token-data.cjs +50 -0
  250. package/dist/utils/use-full-token-data.cjs.map +1 -0
  251. package/dist/utils/use-full-token-data.d.cts +9 -0
  252. package/dist/utils/use-full-token-data.d.ts +9 -0
  253. package/dist/utils/use-full-token-data.js +16 -0
  254. package/dist/utils/use-full-token-data.js.map +1 -0
  255. package/dist/utils/use-medialane-client.cjs +3 -1
  256. package/dist/utils/use-medialane-client.cjs.map +1 -1
  257. package/dist/utils/use-medialane-client.d.cts +1 -1
  258. package/dist/utils/use-medialane-client.d.ts +1 -1
  259. package/dist/utils/use-medialane-client.js +3 -1
  260. package/dist/utils/use-medialane-client.js.map +1 -1
  261. package/dist/utils/use-notifications.cjs +4 -4
  262. package/dist/utils/use-notifications.cjs.map +1 -1
  263. package/dist/utils/use-notifications.d.cts +1 -2
  264. package/dist/utils/use-notifications.d.ts +1 -2
  265. package/dist/utils/use-notifications.js +4 -4
  266. package/dist/utils/use-notifications.js.map +1 -1
  267. package/dist/utils/use-orders.cjs +14 -14
  268. package/dist/utils/use-orders.cjs.map +1 -1
  269. package/dist/utils/use-orders.d.cts +7 -8
  270. package/dist/utils/use-orders.d.ts +7 -8
  271. package/dist/utils/use-orders.js +14 -14
  272. package/dist/utils/use-orders.js.map +1 -1
  273. package/dist/utils/use-platform-stats.cjs +2 -2
  274. package/dist/utils/use-platform-stats.cjs.map +1 -1
  275. package/dist/utils/use-platform-stats.d.cts +1 -2
  276. package/dist/utils/use-platform-stats.d.ts +1 -2
  277. package/dist/utils/use-platform-stats.js +2 -2
  278. package/dist/utils/use-platform-stats.js.map +1 -1
  279. package/dist/utils/use-pop.cjs +6 -6
  280. package/dist/utils/use-pop.cjs.map +1 -1
  281. package/dist/utils/use-pop.d.cts +3 -4
  282. package/dist/utils/use-pop.d.ts +3 -4
  283. package/dist/utils/use-pop.js +6 -6
  284. package/dist/utils/use-pop.js.map +1 -1
  285. package/dist/utils/use-profiles.cjs +5 -2
  286. package/dist/utils/use-profiles.cjs.map +1 -1
  287. package/dist/utils/use-profiles.d.cts +2 -3
  288. package/dist/utils/use-profiles.d.ts +2 -3
  289. package/dist/utils/use-profiles.js +5 -2
  290. package/dist/utils/use-profiles.js.map +1 -1
  291. package/dist/utils/use-remix-offers.cjs +2 -2
  292. package/dist/utils/use-remix-offers.cjs.map +1 -1
  293. package/dist/utils/use-remix-offers.d.cts +1 -2
  294. package/dist/utils/use-remix-offers.d.ts +1 -2
  295. package/dist/utils/use-remix-offers.js +2 -2
  296. package/dist/utils/use-remix-offers.js.map +1 -1
  297. package/dist/utils/use-rewards.cjs +11 -5
  298. package/dist/utils/use-rewards.cjs.map +1 -1
  299. package/dist/utils/use-rewards.d.cts +5 -6
  300. package/dist/utils/use-rewards.d.ts +5 -6
  301. package/dist/utils/use-rewards.js +11 -5
  302. package/dist/utils/use-rewards.js.map +1 -1
  303. package/dist/utils/use-sponsorship.cjs +14 -17
  304. package/dist/utils/use-sponsorship.cjs.map +1 -1
  305. package/dist/utils/use-sponsorship.d.cts +8 -9
  306. package/dist/utils/use-sponsorship.d.ts +8 -9
  307. package/dist/utils/use-sponsorship.js +14 -17
  308. package/dist/utils/use-sponsorship.js.map +1 -1
  309. package/dist/utils/use-tiers.cjs +16 -16
  310. package/dist/utils/use-tiers.cjs.map +1 -1
  311. package/dist/utils/use-tiers.d.cts +7 -8
  312. package/dist/utils/use-tiers.d.ts +7 -8
  313. package/dist/utils/use-tiers.js +16 -16
  314. package/dist/utils/use-tiers.js.map +1 -1
  315. package/dist/utils/use-tokens-by-ip-type.cjs +2 -2
  316. package/dist/utils/use-tokens-by-ip-type.cjs.map +1 -1
  317. package/dist/utils/use-tokens-by-ip-type.d.cts +1 -2
  318. package/dist/utils/use-tokens-by-ip-type.d.ts +1 -2
  319. package/dist/utils/use-tokens-by-ip-type.js +2 -2
  320. package/dist/utils/use-tokens-by-ip-type.js.map +1 -1
  321. package/dist/utils/use-tokens.cjs +19 -8
  322. package/dist/utils/use-tokens.cjs.map +1 -1
  323. package/dist/utils/use-tokens.d.cts +11 -6
  324. package/dist/utils/use-tokens.d.ts +11 -6
  325. package/dist/utils/use-tokens.js +18 -8
  326. package/dist/utils/use-tokens.js.map +1 -1
  327. package/package.json +3 -3
  328. package/dist/components/collection-hero-banner.cjs +0 -118
  329. package/dist/components/collection-hero-banner.cjs.map +0 -1
  330. package/dist/components/collection-hero-banner.d.cts +0 -20
  331. package/dist/components/collection-hero-banner.d.ts +0 -20
  332. package/dist/components/collection-hero-banner.js +0 -94
  333. package/dist/components/collection-hero-banner.js.map +0 -1
@@ -5,8 +5,8 @@ import { useMedialaneClient } from "./use-medialane-client.js";
5
5
  import { queryKeys } from "./query-keys.js";
6
6
  const ACTIVE_ORDER_REFRESH_INTERVAL = 6e4;
7
7
  const ACTIVE_ORDER_DEDUPING_INTERVAL = 1e4;
8
- function useOrders(getClient, query = {}) {
9
- const client = useMedialaneClient(getClient);
8
+ function useOrders(query = {}) {
9
+ const client = useMedialaneClient();
10
10
  const key = queryKeys.orders(query);
11
11
  const { data, error, isLoading, mutate } = useSWR(
12
12
  key,
@@ -21,8 +21,8 @@ function useOrders(getClient, query = {}) {
21
21
  mutate
22
22
  };
23
23
  }
24
- function useOrder(getClient, orderHash) {
25
- const client = useMedialaneClient(getClient);
24
+ function useOrder(orderHash) {
25
+ const client = useMedialaneClient();
26
26
  const { data, error, isLoading } = useSWR(
27
27
  orderHash ? queryKeys.order(orderHash) : null,
28
28
  () => client.api.getOrder(orderHash),
@@ -30,8 +30,8 @@ function useOrder(getClient, orderHash) {
30
30
  );
31
31
  return { order: data?.data ?? null, isLoading, error };
32
32
  }
33
- function useTokenListings(getClient, contract, tokenId) {
34
- const client = useMedialaneClient(getClient);
33
+ function useTokenListings(contract, tokenId) {
34
+ const client = useMedialaneClient();
35
35
  const { data, error, isLoading, mutate } = useSWR(
36
36
  contract && tokenId ? queryKeys.listings(contract, tokenId) : null,
37
37
  () => client.api.getActiveOrdersForToken(contract, tokenId),
@@ -39,8 +39,8 @@ function useTokenListings(getClient, contract, tokenId) {
39
39
  );
40
40
  return { listings: data?.data ?? [], isLoading, error, mutate };
41
41
  }
42
- function useUserOrders(getClient, address) {
43
- const client = useMedialaneClient(getClient);
42
+ function useUserOrders(address) {
43
+ const client = useMedialaneClient();
44
44
  const normalized = address ? normalizeAddress("STARKNET", address) : null;
45
45
  const { data, error, isLoading, mutate } = useSWR(
46
46
  normalized ? queryKeys.userOrders(normalized) : null,
@@ -49,11 +49,11 @@ function useUserOrders(getClient, address) {
49
49
  );
50
50
  return { orders: data?.data ?? [], isLoading, error, mutate };
51
51
  }
52
- function useCounterOffers(getClient, {
52
+ function useCounterOffers({
53
53
  originalOrderHash,
54
54
  sellerAddress
55
55
  }) {
56
- const client = useMedialaneClient(getClient);
56
+ const client = useMedialaneClient();
57
57
  const normalized = sellerAddress ? normalizeAddress("STARKNET", sellerAddress) : null;
58
58
  const key = originalOrderHash ? queryKeys.counterOffersByOrder(originalOrderHash) : normalized ? queryKeys.counterOffersBySeller(normalized) : null;
59
59
  const { data, error, isLoading, mutate } = useSWR(
@@ -72,8 +72,8 @@ function useCounterOffers(getClient, {
72
72
  mutate
73
73
  };
74
74
  }
75
- function useReceivedOffers(getClient, address) {
76
- const client = useMedialaneClient(getClient);
75
+ function useReceivedOffers(address) {
76
+ const client = useMedialaneClient();
77
77
  const normalized = address ? normalizeAddress("STARKNET", address) : null;
78
78
  const { data, error, isLoading, mutate } = useSWR(
79
79
  normalized ? ["received-offers", normalized] : null,
@@ -82,8 +82,8 @@ function useReceivedOffers(getClient, address) {
82
82
  );
83
83
  return { orders: data?.data ?? [], isLoading, error, mutate };
84
84
  }
85
- function useCollectionFloorListings(getClient, contract, limit = 20) {
86
- const client = useMedialaneClient(getClient);
85
+ function useCollectionFloorListings(contract, limit = 20) {
86
+ const client = useMedialaneClient();
87
87
  const key = contract ? queryKeys.floorListings(contract, limit) : null;
88
88
  const { data, error, isLoading } = useSWR(
89
89
  key,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-orders.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { ApiOrdersQuery, ApiOrder, ApiResponse } from \"@medialane/sdk\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport { queryKeys } from \"./query-keys.js\";\n\nconst ACTIVE_ORDER_REFRESH_INTERVAL = 60_000;\nconst ACTIVE_ORDER_DEDUPING_INTERVAL = 10_000;\n\nexport function useOrders(getClient: () => MedialaneClient, query: ApiOrdersQuery = {}) {\n const client = useMedialaneClient(getClient);\n const key = queryKeys.orders(query);\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiOrder[]>>(\n key,\n () => client.api.getOrders(query),\n { revalidateOnFocus: false, refreshInterval: 30000, dedupingInterval: 5000 }\n );\n\n return {\n orders: data?.data ?? [],\n meta: data?.meta,\n isLoading,\n error,\n mutate,\n };\n}\n\nexport function useOrder(getClient: () => MedialaneClient, orderHash: string | null) {\n const client = useMedialaneClient(getClient);\n\n const { data, error, isLoading } = useSWR(\n orderHash ? queryKeys.order(orderHash) : null,\n () => client.api.getOrder(orderHash!),\n { revalidateOnFocus: false }\n );\n\n return { order: data?.data ?? null, isLoading, error };\n}\n\nexport function useTokenListings(getClient: () => MedialaneClient, contract: string | null, tokenId: string | null) {\n const client = useMedialaneClient(getClient);\n\n const { data, error, isLoading, mutate } = useSWR(\n contract && tokenId ? queryKeys.listings(contract, tokenId) : null,\n () => client.api.getActiveOrdersForToken(contract!, tokenId!),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL, dedupingInterval: ACTIVE_ORDER_DEDUPING_INTERVAL }\n );\n\n return { listings: data?.data ?? [], isLoading, error, mutate };\n}\n\nexport function useUserOrders(getClient: () => MedialaneClient, address: string | null) {\n const client = useMedialaneClient(getClient);\n const normalized = address ? normalizeAddress(\"STARKNET\", address) : null;\n\n const { data, error, isLoading, mutate } = useSWR(\n normalized ? queryKeys.userOrders(normalized) : null,\n () => client.api.getOrdersByUser(normalized!),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL, dedupingInterval: ACTIVE_ORDER_DEDUPING_INTERVAL }\n );\n\n return { orders: data?.data ?? [], isLoading, error, mutate };\n}\n\nexport function useCounterOffers(\n getClient: () => MedialaneClient,\n {\n originalOrderHash,\n sellerAddress,\n }: {\n originalOrderHash?: string | null;\n sellerAddress?: string | null;\n }\n) {\n const client = useMedialaneClient(getClient);\n const normalized = sellerAddress ? normalizeAddress(\"STARKNET\", sellerAddress) : null;\n const key =\n originalOrderHash\n ? queryKeys.counterOffersByOrder(originalOrderHash)\n : normalized\n ? queryKeys.counterOffersBySeller(normalized)\n : null;\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiOrder[]>>(\n key,\n () => client.api.getCounterOffers({\n ...(originalOrderHash ? { originalOrderHash } : {}),\n ...(normalized ? { sellerAddress: normalized } : {}),\n }),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL, dedupingInterval: ACTIVE_ORDER_DEDUPING_INTERVAL }\n );\n\n return {\n counterOffers: data?.data ?? [],\n total: data?.meta?.total ?? 0,\n isLoading,\n error,\n mutate,\n };\n}\n\nexport function useReceivedOffers(getClient: () => MedialaneClient, address: string | null) {\n const client = useMedialaneClient(getClient);\n const normalized = address ? normalizeAddress(\"STARKNET\", address) : null;\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiOrder[]>>(\n normalized ? [\"received-offers\", normalized] : null,\n () => client.api.getReceivedOffers(normalized!, { limit: 50 }),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL, dedupingInterval: ACTIVE_ORDER_DEDUPING_INTERVAL }\n );\n\n return { orders: data?.data ?? [], isLoading, error, mutate };\n}\n\nexport function useCollectionFloorListings(getClient: () => MedialaneClient, contract: string | null, limit = 20) {\n const client = useMedialaneClient(getClient);\n const key = contract ? queryKeys.floorListings(contract, limit) : null;\n\n const { data, error, isLoading } = useSWR<ApiResponse<ApiOrder[]>>(\n key,\n () =>\n client.api.getOrders({\n collection: contract!,\n status: \"ACTIVE\",\n sort: \"price_asc\",\n limit,\n }),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL }\n );\n\n return {\n listings: data?.data ?? [],\n isLoading,\n error,\n };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AACnB,SAAS,wBAAwB;AAGjC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAE1B,MAAM,gCAAgC;AACt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AAC;AAAA,IAC7D,EAAE,mBAAmB,OAAO,iBAAiB,+BAA+B,kBAAkB,+BAA+B;AAAA,EAC/H;AAEA,SAAO,EAAE,QAAQ,MAAM,QAAQ,CAAC,GAAG,WAAW,OAAO,OAAO;AAC9D;AAEO,SAAS,2BAA2B,WAAkC,UAAyB,QAAQ,IAAI;AAChH,QAAM,SAAS,mBAAmB,SAAS;AAC3C,QAAM,MAAM,WAAW,UAAU,cAAc,UAAU,KAAK,IAAI;AAElE,QAAM,EAAE,MAAM,OAAO,UAAU,IAAI;AAAA,IACjC;AAAA,IACA,MACE,OAAO,IAAI,UAAU;AAAA,MACnB,YAAY;AAAA,MACZ,QAAQ;AAAA,MACR,MAAM;AAAA,MACN;AAAA,IACF,CAAC;AAAA,IACH,EAAE,mBAAmB,OAAO,iBAAiB,8BAA8B;AAAA,EAC7E;AAEA,SAAO;AAAA,IACL,UAAU,MAAM,QAAQ,CAAC;AAAA,IACzB;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/use-orders.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport type { ApiOrdersQuery, ApiOrder, ApiResponse } from \"@medialane/sdk\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport { queryKeys } from \"./query-keys.js\";\n\nconst ACTIVE_ORDER_REFRESH_INTERVAL = 60_000;\nconst ACTIVE_ORDER_DEDUPING_INTERVAL = 10_000;\n\nexport function useOrders( query: ApiOrdersQuery = {}) {\n const client = useMedialaneClient();\n const key = queryKeys.orders(query);\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiOrder[]>>(\n key,\n () => client.api.getOrders(query),\n { revalidateOnFocus: false, refreshInterval: 30000, dedupingInterval: 5000 }\n );\n\n return {\n orders: data?.data ?? [],\n meta: data?.meta,\n isLoading,\n error,\n mutate,\n };\n}\n\nexport function useOrder( orderHash: string | null) {\n const client = useMedialaneClient();\n\n const { data, error, isLoading } = useSWR(\n orderHash ? queryKeys.order(orderHash) : null,\n () => client.api.getOrder(orderHash!),\n { revalidateOnFocus: false }\n );\n\n return { order: data?.data ?? null, isLoading, error };\n}\n\nexport function useTokenListings( contract: string | null, tokenId: string | null) {\n const client = useMedialaneClient();\n\n const { data, error, isLoading, mutate } = useSWR(\n contract && tokenId ? queryKeys.listings(contract, tokenId) : null,\n () => client.api.getActiveOrdersForToken(contract!, tokenId!),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL, dedupingInterval: ACTIVE_ORDER_DEDUPING_INTERVAL }\n );\n\n return { listings: data?.data ?? [], isLoading, error, mutate };\n}\n\nexport function useUserOrders( address: string | null) {\n const client = useMedialaneClient();\n const normalized = address ? normalizeAddress(\"STARKNET\", address) : null;\n\n const { data, error, isLoading, mutate } = useSWR(\n normalized ? queryKeys.userOrders(normalized) : null,\n () => client.api.getOrdersByUser(normalized!),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL, dedupingInterval: ACTIVE_ORDER_DEDUPING_INTERVAL }\n );\n\n return { orders: data?.data ?? [], isLoading, error, mutate };\n}\n\nexport function useCounterOffers(\n {\n originalOrderHash,\n sellerAddress,\n }: {\n originalOrderHash?: string | null;\n sellerAddress?: string | null;\n }\n) {\n const client = useMedialaneClient();\n const normalized = sellerAddress ? normalizeAddress(\"STARKNET\", sellerAddress) : null;\n const key =\n originalOrderHash\n ? queryKeys.counterOffersByOrder(originalOrderHash)\n : normalized\n ? queryKeys.counterOffersBySeller(normalized)\n : null;\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiOrder[]>>(\n key,\n () => client.api.getCounterOffers({\n ...(originalOrderHash ? { originalOrderHash } : {}),\n ...(normalized ? { sellerAddress: normalized } : {}),\n }),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL, dedupingInterval: ACTIVE_ORDER_DEDUPING_INTERVAL }\n );\n\n return {\n counterOffers: data?.data ?? [],\n total: data?.meta?.total ?? 0,\n isLoading,\n error,\n mutate,\n };\n}\n\nexport function useReceivedOffers( address: string | null) {\n const client = useMedialaneClient();\n const normalized = address ? normalizeAddress(\"STARKNET\", address) : null;\n\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiOrder[]>>(\n normalized ? [\"received-offers\", normalized] : null,\n () => client.api.getReceivedOffers(normalized!, { limit: 50 }),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL, dedupingInterval: ACTIVE_ORDER_DEDUPING_INTERVAL }\n );\n\n return { orders: data?.data ?? [], isLoading, error, mutate };\n}\n\nexport function useCollectionFloorListings( contract: string | null, limit = 20) {\n const client = useMedialaneClient();\n const key = contract ? queryKeys.floorListings(contract, limit) : null;\n\n const { data, error, isLoading } = useSWR<ApiResponse<ApiOrder[]>>(\n key,\n () =>\n client.api.getOrders({\n collection: contract!,\n status: \"ACTIVE\",\n sort: \"price_asc\",\n limit,\n }),\n { revalidateOnFocus: false, refreshInterval: ACTIVE_ORDER_REFRESH_INTERVAL }\n );\n\n return {\n listings: data?.data ?? [],\n isLoading,\n error,\n };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AACnB,SAAS,wBAAwB;AAEjC,SAAS,0BAA0B;AACnC,SAAS,iBAAiB;AAE1B,MAAM,gCAAgC;AACtC,MAAM,iCAAiC;AAEhC,SAAS,UAAW,QAAwB,CAAC,GAAG;AACrD,QAAM,SAAS,mBAAmB;AAClC,QAAM,MAAM,UAAU,OAAO,KAAK;AAElC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC;AAAA,IACA,MAAM,OAAO,IAAI,UAAU,KAAK;AAAA,IAChC,EAAE,mBAAmB,OAAO,iBAAiB,KAAO,kBAAkB,IAAK;AAAA,EAC7E;AAEA,SAAO;AAAA,IACL,QAAQ,MAAM,QAAQ,CAAC;AAAA,IACvB,MAAM,MAAM;AAAA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A,IACH,EAAE,mBAAmB,OAAO,iBAAiB,8BAA8B;AAAA,EAC7E;AAEA,SAAO;AAAA,IACL,UAAU,MAAM,QAAQ,CAAC;AAAA,IACzB;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
@@ -34,8 +34,8 @@ __export(use_platform_stats_exports, {
34
34
  module.exports = __toCommonJS(use_platform_stats_exports);
35
35
  var import_swr = __toESM(require("swr"), 1);
36
36
  var import_use_medialane_client = require("./use-medialane-client.js");
37
- function usePlatformStats(getClient) {
38
- const client = (0, import_use_medialane_client.useMedialaneClient)(getClient);
37
+ function usePlatformStats() {
38
+ const client = (0, import_use_medialane_client.useMedialaneClient)();
39
39
  const { data, isLoading } = (0, import_swr.default)(
40
40
  "platform-stats",
41
41
  () => client.api.getPlatformStats(),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-platform-stats.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { ApiPlatformStats } from \"@medialane/sdk\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\n\nexport function usePlatformStats(getClient: () => MedialaneClient) {\n const client = useMedialaneClient(getClient);\n const { data, isLoading } = useSWR<ApiPlatformStats>(\n \"platform-stats\",\n () => client.api.getPlatformStats(),\n { revalidateOnFocus: false, dedupingInterval: 60_000 }\n );\n return { stats: data ?? null, isLoading };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AAGnB,kCAAmC;AAE5B,SAAS,iBAAiB,WAAkC;AACjE,QAAM,aAAS,gDAAmB,SAAS;AAC3C,QAAM,EAAE,MAAM,UAAU,QAAI,WAAAA;AAAA,IAC1B;AAAA,IACA,MAAM,OAAO,IAAI,iBAAiB;AAAA,IAClC,EAAE,mBAAmB,OAAO,kBAAkB,IAAO;AAAA,EACvD;AACA,SAAO,EAAE,OAAO,QAAQ,MAAM,UAAU;AAC1C;","names":["useSWR"]}
1
+ {"version":3,"sources":["../../src/utils/use-platform-stats.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { ApiPlatformStats } from \"@medialane/sdk\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\n\nexport function usePlatformStats() {\n const client = useMedialaneClient();\n const { data, isLoading } = useSWR<ApiPlatformStats>(\n \"platform-stats\",\n () => client.api.getPlatformStats(),\n { revalidateOnFocus: false, dedupingInterval: 60_000 }\n );\n return { stats: data ?? null, isLoading };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AAEnB,kCAAmC;AAE5B,SAAS,mBAAmB;AACjC,QAAM,aAAS,gDAAmB;AAClC,QAAM,EAAE,MAAM,UAAU,QAAI,WAAAA;AAAA,IAC1B;AAAA,IACA,MAAM,OAAO,IAAI,iBAAiB;AAAA,IAClC,EAAE,mBAAmB,OAAO,kBAAkB,IAAO;AAAA,EACvD;AACA,SAAO,EAAE,OAAO,QAAQ,MAAM,UAAU;AAC1C;","names":["useSWR"]}
@@ -1,7 +1,6 @@
1
1
  import { ApiPlatformStats } from '@medialane/sdk';
2
- import { MedialaneClient } from '@medialane/sdk/starknet';
3
2
 
4
- declare function usePlatformStats(getClient: () => MedialaneClient): {
3
+ declare function usePlatformStats(): {
5
4
  stats: ApiPlatformStats | null;
6
5
  isLoading: boolean;
7
6
  };
@@ -1,7 +1,6 @@
1
1
  import { ApiPlatformStats } from '@medialane/sdk';
2
- import { MedialaneClient } from '@medialane/sdk/starknet';
3
2
 
4
- declare function usePlatformStats(getClient: () => MedialaneClient): {
3
+ declare function usePlatformStats(): {
5
4
  stats: ApiPlatformStats | null;
6
5
  isLoading: boolean;
7
6
  };
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import useSWR from "swr";
3
3
  import { useMedialaneClient } from "./use-medialane-client.js";
4
- function usePlatformStats(getClient) {
5
- const client = useMedialaneClient(getClient);
4
+ function usePlatformStats() {
5
+ const client = useMedialaneClient();
6
6
  const { data, isLoading } = useSWR(
7
7
  "platform-stats",
8
8
  () => client.api.getPlatformStats(),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-platform-stats.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { ApiPlatformStats } from \"@medialane/sdk\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\n\nexport function usePlatformStats(getClient: () => MedialaneClient) {\n const client = useMedialaneClient(getClient);\n const { data, isLoading } = useSWR<ApiPlatformStats>(\n \"platform-stats\",\n () => client.api.getPlatformStats(),\n { revalidateOnFocus: false, dedupingInterval: 60_000 }\n );\n return { stats: data ?? null, isLoading };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AAGnB,SAAS,0BAA0B;AAE5B,SAAS,iBAAiB,WAAkC;AACjE,QAAM,SAAS,mBAAmB,SAAS;AAC3C,QAAM,EAAE,MAAM,UAAU,IAAI;AAAA,IAC1B;AAAA,IACA,MAAM,OAAO,IAAI,iBAAiB;AAAA,IAClC,EAAE,mBAAmB,OAAO,kBAAkB,IAAO;AAAA,EACvD;AACA,SAAO,EAAE,OAAO,QAAQ,MAAM,UAAU;AAC1C;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/use-platform-stats.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { ApiPlatformStats } from \"@medialane/sdk\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\n\nexport function usePlatformStats() {\n const client = useMedialaneClient();\n const { data, isLoading } = useSWR<ApiPlatformStats>(\n \"platform-stats\",\n () => client.api.getPlatformStats(),\n { revalidateOnFocus: false, dedupingInterval: 60_000 }\n );\n return { stats: data ?? null, isLoading };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AAEnB,SAAS,0BAA0B;AAE5B,SAAS,mBAAmB;AACjC,QAAM,SAAS,mBAAmB;AAClC,QAAM,EAAE,MAAM,UAAU,IAAI;AAAA,IAC1B;AAAA,IACA,MAAM,OAAO,IAAI,iBAAiB;AAAA,IAClC,EAAE,mBAAmB,OAAO,kBAAkB,IAAO;AAAA,EACvD;AACA,SAAO,EAAE,OAAO,QAAQ,MAAM,UAAU;AAC1C;","names":[]}
@@ -38,8 +38,8 @@ module.exports = __toCommonJS(use_pop_exports);
38
38
  var import_swr = __toESM(require("swr"), 1);
39
39
  var import_starknet = require("@medialane/sdk/starknet");
40
40
  var import_use_medialane_client = require("./use-medialane-client.js");
41
- function usePopCollections(getClient) {
42
- const client = (0, import_use_medialane_client.useMedialaneClient)(getClient);
41
+ function usePopCollections() {
42
+ const client = (0, import_use_medialane_client.useMedialaneClient)();
43
43
  const { data, error, isLoading, mutate } = (0, import_swr.default)(
44
44
  "pop-collections",
45
45
  () => client.api.listCollections({ service: "pop-protocol", hideEmpty: false, limit: 50 }),
@@ -47,8 +47,8 @@ function usePopCollections(getClient) {
47
47
  );
48
48
  return { collections: data?.data ?? [], meta: data?.meta, isLoading, error, mutate };
49
49
  }
50
- function useMyPopEvents(getClient, owner) {
51
- const client = (0, import_use_medialane_client.useMedialaneClient)(getClient);
50
+ function useMyPopEvents(owner) {
51
+ const client = (0, import_use_medialane_client.useMedialaneClient)();
52
52
  const { data, error, isLoading, mutate } = (0, import_swr.default)(
53
53
  owner ? `my-pop-events-${owner}` : null,
54
54
  async () => (await client.api.listCollections({ service: "pop-protocol", owner, limit: 50 })).data ?? [],
@@ -59,8 +59,8 @@ function useMyPopEvents(getClient, owner) {
59
59
  function popClaimedKey(collection, wallet) {
60
60
  return collection && wallet ? `pop-claimed-${collection}-${wallet}` : null;
61
61
  }
62
- function usePopClaimStatus(getClient, collection, wallet) {
63
- const client = (0, import_use_medialane_client.useMedialaneClient)(getClient);
62
+ function usePopClaimStatus(collection, wallet) {
63
+ const client = (0, import_use_medialane_client.useMedialaneClient)();
64
64
  const { data, error, isLoading, mutate } = (0, import_swr.default)(
65
65
  popClaimedKey(collection, wallet),
66
66
  () => (0, import_starknet.popHasClaimed)(client.provider, collection, wallet),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-pop.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { ApiCollection, ApiMeta } from \"@medialane/sdk\";\nimport { popHasClaimed, type MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\n\nexport function usePopCollections(getClient: () => MedialaneClient) {\n const client = useMedialaneClient(getClient);\n const { data, error, isLoading, mutate } = useSWR<{ data: ApiCollection[]; meta?: ApiMeta }>(\n \"pop-collections\",\n () => client.api.listCollections({ service: \"pop-protocol\", hideEmpty: false, limit: 50 }),\n { revalidateOnFocus: false }\n );\n return { collections: data?.data ?? [], meta: data?.meta, isLoading, error, mutate };\n}\n\nexport function useMyPopEvents(getClient: () => MedialaneClient, owner: string | null) {\n const client = useMedialaneClient(getClient);\n const { data, error, isLoading, mutate } = useSWR<ApiCollection[]>(\n owner ? `my-pop-events-${owner}` : null,\n async () => (await client.api.listCollections({ service: \"pop-protocol\", owner: owner!, limit: 50 })).data ?? [],\n { revalidateOnFocus: false }\n );\n return { events: data ?? [], isLoading, error, mutate };\n}\n\nexport function popClaimedKey(collection: string | null, wallet: string | null): string | null {\n return collection && wallet ? `pop-claimed-${collection}-${wallet}` : null;\n}\n\n/** Whether `wallet` already holds this collection's credential, read from chain. */\nexport function usePopClaimStatus(\n getClient: () => MedialaneClient,\n collection: string | null,\n wallet: string | null,\n) {\n const client = useMedialaneClient(getClient);\n const { data, error, isLoading, mutate } = useSWR<boolean>(\n popClaimedKey(collection, wallet),\n () => popHasClaimed(client.provider, collection!, wallet!),\n { revalidateOnFocus: false, shouldRetryOnError: false },\n );\n return { hasClaimed: data ?? null, isLoading, error, mutate };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;A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WR"]}
1
+ {"version":3,"sources":["../../src/utils/use-pop.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { ApiCollection, ApiMeta } from \"@medialane/sdk\";\nimport { popHasClaimed } from \"@medialane/sdk/starknet\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\n\nexport function usePopCollections() {\n const client = useMedialaneClient();\n const { data, error, isLoading, mutate } = useSWR<{ data: ApiCollection[]; meta?: ApiMeta }>(\n \"pop-collections\",\n () => client.api.listCollections({ service: \"pop-protocol\", hideEmpty: false, limit: 50 }),\n { revalidateOnFocus: false }\n );\n return { collections: data?.data ?? [], meta: data?.meta, isLoading, error, mutate };\n}\n\nexport function useMyPopEvents( owner: string | null) {\n const client = useMedialaneClient();\n const { data, error, isLoading, mutate } = useSWR<ApiCollection[]>(\n owner ? `my-pop-events-${owner}` : null,\n async () => (await client.api.listCollections({ service: \"pop-protocol\", owner: owner!, limit: 50 })).data ?? [],\n { revalidateOnFocus: false }\n );\n return { events: data ?? [], isLoading, error, mutate };\n}\n\nexport function popClaimedKey(collection: string | null, wallet: string | null): string | null {\n return collection && wallet ? `pop-claimed-${collection}-${wallet}` : null;\n}\n\n/** Whether `wallet` already holds this collection's credential, read from chain. */\nexport function usePopClaimStatus(\n collection: string | null,\n wallet: string | null,\n) {\n const client = useMedialaneClient();\n const { data, error, isLoading, mutate } = useSWR<boolean>(\n popClaimedKey(collection, wallet),\n () => popHasClaimed(client.provider, collection!, wallet!),\n { revalidateOnFocus: false, shouldRetryOnError: false },\n );\n return { hasClaimed: data ?? null, isLoading, error, mutate };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AAEnB,sBAA8B;AAC9B,kCAAmC;AAE5B,SAAS,oBAAoB;AAClC,QAAM,aAAS,gDAAmB;AAClC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC;AAAA,IACA,MAAM,OAAO,IAAI,gBAAgB,EAAE,SAAS,gBAAgB,WAAW,OAAO,OAAO,GAAG,CAAC;AAAA,IACzF,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,aAAa,MAAM,QAAQ,CAAC,GAAG,MAAM,MAAM,MAAM,WAAW,OAAO,OAAO;AACrF;AAEO,SAAS,eAAgB,OAAsB;AACpD,QAAM,aAAS,gDAAmB;AAClC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC,QAAQ,iBAAiB,KAAK,KAAK;AAAA,IACnC,aAAa,MAAM,OAAO,IAAI,gBAAgB,EAAE,SAAS,gBAAgB,OAAe,OAAO,GAAG,CAAC,GAAG,QAAQ,CAAC;AAAA,IAC/G,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,QAAQ,QAAQ,CAAC,GAAG,WAAW,OAAO,OAAO;AACxD;AAEO,SAAS,cAAc,YAA2B,QAAsC;AAC7F,SAAO,cAAc,SAAS,eAAe,UAAU,IAAI,MAAM,KAAK;AACxE;AAGO,SAAS,kBACd,YACA,QACA;AACA,QAAM,aAAS,gDAAmB;AAClC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC,cAAc,YAAY,MAAM;AAAA,IAChC,UAAM,+BAAc,OAAO,UAAU,YAAa,MAAO;AAAA,IACzD,EAAE,mBAAmB,OAAO,oBAAoB,MAAM;AAAA,EACxD;AACA,SAAO,EAAE,YAAY,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC9D;","names":["useSWR"]}
@@ -1,8 +1,7 @@
1
1
  import * as swr from 'swr';
2
2
  import { ApiCollection, ApiMeta } from '@medialane/sdk';
3
- import { MedialaneClient } from '@medialane/sdk/starknet';
4
3
 
5
- declare function usePopCollections(getClient: () => MedialaneClient): {
4
+ declare function usePopCollections(): {
6
5
  collections: ApiCollection[];
7
6
  meta: ApiMeta | undefined;
8
7
  isLoading: boolean;
@@ -12,7 +11,7 @@ declare function usePopCollections(getClient: () => MedialaneClient): {
12
11
  meta?: ApiMeta;
13
12
  }>;
14
13
  };
15
- declare function useMyPopEvents(getClient: () => MedialaneClient, owner: string | null): {
14
+ declare function useMyPopEvents(owner: string | null): {
16
15
  events: ApiCollection[];
17
16
  isLoading: boolean;
18
17
  error: any;
@@ -20,7 +19,7 @@ declare function useMyPopEvents(getClient: () => MedialaneClient, owner: string
20
19
  };
21
20
  declare function popClaimedKey(collection: string | null, wallet: string | null): string | null;
22
21
  /** Whether `wallet` already holds this collection's credential, read from chain. */
23
- declare function usePopClaimStatus(getClient: () => MedialaneClient, collection: string | null, wallet: string | null): {
22
+ declare function usePopClaimStatus(collection: string | null, wallet: string | null): {
24
23
  hasClaimed: boolean | null;
25
24
  isLoading: boolean;
26
25
  error: any;
@@ -1,8 +1,7 @@
1
1
  import * as swr from 'swr';
2
2
  import { ApiCollection, ApiMeta } from '@medialane/sdk';
3
- import { MedialaneClient } from '@medialane/sdk/starknet';
4
3
 
5
- declare function usePopCollections(getClient: () => MedialaneClient): {
4
+ declare function usePopCollections(): {
6
5
  collections: ApiCollection[];
7
6
  meta: ApiMeta | undefined;
8
7
  isLoading: boolean;
@@ -12,7 +11,7 @@ declare function usePopCollections(getClient: () => MedialaneClient): {
12
11
  meta?: ApiMeta;
13
12
  }>;
14
13
  };
15
- declare function useMyPopEvents(getClient: () => MedialaneClient, owner: string | null): {
14
+ declare function useMyPopEvents(owner: string | null): {
16
15
  events: ApiCollection[];
17
16
  isLoading: boolean;
18
17
  error: any;
@@ -20,7 +19,7 @@ declare function useMyPopEvents(getClient: () => MedialaneClient, owner: string
20
19
  };
21
20
  declare function popClaimedKey(collection: string | null, wallet: string | null): string | null;
22
21
  /** Whether `wallet` already holds this collection's credential, read from chain. */
23
- declare function usePopClaimStatus(getClient: () => MedialaneClient, collection: string | null, wallet: string | null): {
22
+ declare function usePopClaimStatus(collection: string | null, wallet: string | null): {
24
23
  hasClaimed: boolean | null;
25
24
  isLoading: boolean;
26
25
  error: any;
@@ -2,8 +2,8 @@
2
2
  import useSWR from "swr";
3
3
  import { popHasClaimed } from "@medialane/sdk/starknet";
4
4
  import { useMedialaneClient } from "./use-medialane-client.js";
5
- function usePopCollections(getClient) {
6
- const client = useMedialaneClient(getClient);
5
+ function usePopCollections() {
6
+ const client = useMedialaneClient();
7
7
  const { data, error, isLoading, mutate } = useSWR(
8
8
  "pop-collections",
9
9
  () => client.api.listCollections({ service: "pop-protocol", hideEmpty: false, limit: 50 }),
@@ -11,8 +11,8 @@ function usePopCollections(getClient) {
11
11
  );
12
12
  return { collections: data?.data ?? [], meta: data?.meta, isLoading, error, mutate };
13
13
  }
14
- function useMyPopEvents(getClient, owner) {
15
- const client = useMedialaneClient(getClient);
14
+ function useMyPopEvents(owner) {
15
+ const client = useMedialaneClient();
16
16
  const { data, error, isLoading, mutate } = useSWR(
17
17
  owner ? `my-pop-events-${owner}` : null,
18
18
  async () => (await client.api.listCollections({ service: "pop-protocol", owner, limit: 50 })).data ?? [],
@@ -23,8 +23,8 @@ function useMyPopEvents(getClient, owner) {
23
23
  function popClaimedKey(collection, wallet) {
24
24
  return collection && wallet ? `pop-claimed-${collection}-${wallet}` : null;
25
25
  }
26
- function usePopClaimStatus(getClient, collection, wallet) {
27
- const client = useMedialaneClient(getClient);
26
+ function usePopClaimStatus(collection, wallet) {
27
+ const client = useMedialaneClient();
28
28
  const { data, error, isLoading, mutate } = useSWR(
29
29
  popClaimedKey(collection, wallet),
30
30
  () => popHasClaimed(client.provider, collection, wallet),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-pop.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { ApiCollection, ApiMeta } from \"@medialane/sdk\";\nimport { popHasClaimed, type MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\n\nexport function usePopCollections(getClient: () => MedialaneClient) {\n const client = useMedialaneClient(getClient);\n const { data, error, isLoading, mutate } = useSWR<{ data: ApiCollection[]; meta?: ApiMeta }>(\n \"pop-collections\",\n () => client.api.listCollections({ service: \"pop-protocol\", hideEmpty: false, limit: 50 }),\n { revalidateOnFocus: false }\n );\n return { collections: data?.data ?? [], meta: data?.meta, isLoading, error, mutate };\n}\n\nexport function useMyPopEvents(getClient: () => MedialaneClient, owner: string | null) {\n const client = useMedialaneClient(getClient);\n const { data, error, isLoading, mutate } = useSWR<ApiCollection[]>(\n owner ? `my-pop-events-${owner}` : null,\n async () => (await client.api.listCollections({ service: \"pop-protocol\", owner: owner!, limit: 50 })).data ?? [],\n { revalidateOnFocus: false }\n );\n return { events: data ?? [], isLoading, error, mutate };\n}\n\nexport function popClaimedKey(collection: string | null, wallet: string | null): string | null {\n return collection && wallet ? `pop-claimed-${collection}-${wallet}` : null;\n}\n\n/** Whether `wallet` already holds this collection's credential, read from chain. */\nexport function usePopClaimStatus(\n getClient: () => MedialaneClient,\n collection: string | null,\n wallet: string | null,\n) {\n const client = useMedialaneClient(getClient);\n const { data, error, isLoading, mutate } = useSWR<boolean>(\n popClaimedKey(collection, wallet),\n () => popHasClaimed(client.provider, collection!, wallet!),\n { revalidateOnFocus: false, shouldRetryOnError: false },\n );\n return { hasClaimed: data ?? null, isLoading, error, mutate };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AAEnB,SAAS,qBAA2C;AACpD,SAAS,0BAA0B;AAE5B,SAAS,kBAAkB,WAAkC;AAClE,QAAM,SAAS,mBAAmB,SAAS;AAC3C,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC;AAAA,IACA,MAAM,OAAO,IAAI,gBAAgB,EAAE,SAAS,gBAAgB,WAAW,OAAO,OAAO,GAAG,CAAC;AAAA,IACzF,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,aAAa,MAAM,QAAQ,CAAC,GAAG,MAAM,MAAM,MAAM,WAAW,OAAO,OAAO;AACrF;AAEO,SAAS,eAAe,WAAkC,OAAsB;AACrF,QAAM,SAAS,mBAAmB,SAAS;AAC3C,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,QAAQ,iBAAiB,KAAK,KAAK;AAAA,IACnC,aAAa,MAAM,OAAO,IAAI,gBAAgB,EAAE,SAAS,gBAAgB,OAAe,OAAO,GAAG,CAAC,GAAG,QAAQ,CAAC;AAAA,IAC/G,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,QAAQ,QAAQ,CAAC,GAAG,WAAW,OAAO,OAAO;AACxD;AAEO,SAAS,cAAc,YAA2B,QAAsC;AAC7F,SAAO,cAAc,SAAS,eAAe,UAAU,IAAI,MAAM,KAAK;AACxE;AAGO,SAAS,kBACd,WACA,YACA,QACA;AACA,QAAM,SAAS,mBAAmB,SAAS;AAC3C,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,cAAc,YAAY,MAAM;AAAA,IAChC,MAAM,cAAc,OAAO,UAAU,YAAa,MAAO;AAAA,IACzD,EAAE,mBAAmB,OAAO,oBAAoB,MAAM;AAAA,EACxD;AACA,SAAO,EAAE,YAAY,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC9D;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/use-pop.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { ApiCollection, ApiMeta } from \"@medialane/sdk\";\nimport { popHasClaimed } from \"@medialane/sdk/starknet\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\n\nexport function usePopCollections() {\n const client = useMedialaneClient();\n const { data, error, isLoading, mutate } = useSWR<{ data: ApiCollection[]; meta?: ApiMeta }>(\n \"pop-collections\",\n () => client.api.listCollections({ service: \"pop-protocol\", hideEmpty: false, limit: 50 }),\n { revalidateOnFocus: false }\n );\n return { collections: data?.data ?? [], meta: data?.meta, isLoading, error, mutate };\n}\n\nexport function useMyPopEvents( owner: string | null) {\n const client = useMedialaneClient();\n const { data, error, isLoading, mutate } = useSWR<ApiCollection[]>(\n owner ? `my-pop-events-${owner}` : null,\n async () => (await client.api.listCollections({ service: \"pop-protocol\", owner: owner!, limit: 50 })).data ?? [],\n { revalidateOnFocus: false }\n );\n return { events: data ?? [], isLoading, error, mutate };\n}\n\nexport function popClaimedKey(collection: string | null, wallet: string | null): string | null {\n return collection && wallet ? `pop-claimed-${collection}-${wallet}` : null;\n}\n\n/** Whether `wallet` already holds this collection's credential, read from chain. */\nexport function usePopClaimStatus(\n collection: string | null,\n wallet: string | null,\n) {\n const client = useMedialaneClient();\n const { data, error, isLoading, mutate } = useSWR<boolean>(\n popClaimedKey(collection, wallet),\n () => popHasClaimed(client.provider, collection!, wallet!),\n { revalidateOnFocus: false, shouldRetryOnError: false },\n );\n return { hasClaimed: data ?? null, isLoading, error, mutate };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AAEnB,SAAS,qBAAqB;AAC9B,SAAS,0BAA0B;AAE5B,SAAS,oBAAoB;AAClC,QAAM,SAAS,mBAAmB;AAClC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC;AAAA,IACA,MAAM,OAAO,IAAI,gBAAgB,EAAE,SAAS,gBAAgB,WAAW,OAAO,OAAO,GAAG,CAAC;AAAA,IACzF,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,aAAa,MAAM,QAAQ,CAAC,GAAG,MAAM,MAAM,MAAM,WAAW,OAAO,OAAO;AACrF;AAEO,SAAS,eAAgB,OAAsB;AACpD,QAAM,SAAS,mBAAmB;AAClC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,QAAQ,iBAAiB,KAAK,KAAK;AAAA,IACnC,aAAa,MAAM,OAAO,IAAI,gBAAgB,EAAE,SAAS,gBAAgB,OAAe,OAAO,GAAG,CAAC,GAAG,QAAQ,CAAC;AAAA,IAC/G,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,QAAQ,QAAQ,CAAC,GAAG,WAAW,OAAO,OAAO;AACxD;AAEO,SAAS,cAAc,YAA2B,QAAsC;AAC7F,SAAO,cAAc,SAAS,eAAe,UAAU,IAAI,MAAM,KAAK;AACxE;AAGO,SAAS,kBACd,YACA,QACA;AACA,QAAM,SAAS,mBAAmB;AAClC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,cAAc,YAAY,MAAM;AAAA,IAChC,MAAM,cAAc,OAAO,UAAU,YAAa,MAAO;AAAA,IACzD,EAAE,mBAAmB,OAAO,oBAAoB,MAAM;AAAA,EACxD;AACA,SAAO,EAAE,YAAY,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC9D;","names":[]}
@@ -34,7 +34,9 @@ __export(use_profiles_exports, {
34
34
  });
35
35
  module.exports = __toCommonJS(use_profiles_exports);
36
36
  var import_swr = __toESM(require("swr"), 1);
37
- function useCollectionProfile(getClient, contractAddress) {
37
+ var import_medialane_app = require("../components/medialane-app.js");
38
+ function useCollectionProfile(contractAddress) {
39
+ const { getClient } = (0, import_medialane_app.useMedialaneApp)();
38
40
  const { data, error, isLoading, mutate } = (0, import_swr.default)(
39
41
  contractAddress ? `profile-collection-${contractAddress}` : null,
40
42
  () => getClient().api.getCollectionProfile(contractAddress),
@@ -42,7 +44,8 @@ function useCollectionProfile(getClient, contractAddress) {
42
44
  );
43
45
  return { profile: data ?? null, isLoading, error, mutate };
44
46
  }
45
- function useCreatorProfile(getClient, walletAddress) {
47
+ function useCreatorProfile(walletAddress) {
48
+ const { getClient } = (0, import_medialane_app.useMedialaneApp)();
46
49
  const { data, error, isLoading, mutate } = (0, import_swr.default)(
47
50
  walletAddress ? `profile-creator-${walletAddress}` : null,
48
51
  async () => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-profiles.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\n\nexport function useCollectionProfile(getClient: () => MedialaneClient, contractAddress: string | undefined) {\n const { data, error, isLoading, mutate } = useSWR(\n contractAddress ? `profile-collection-${contractAddress}` : null,\n () => getClient().api.getCollectionProfile(contractAddress!),\n { revalidateOnFocus: false }\n );\n return { profile: data ?? null, isLoading, error, mutate };\n}\n\nexport function useCreatorProfile(getClient: () => MedialaneClient, walletAddress: string | undefined) {\n const { data, error, isLoading, mutate } = useSWR(\n walletAddress ? `profile-creator-${walletAddress}` : null,\n async () => {\n try {\n return await getClient().api.getCreatorProfile(walletAddress!);\n } catch (e: unknown) {\n\n const msg = e instanceof Error ? e.message : \"\";\n const status = (e as { status?: number })?.status;\n if (msg.includes(\"404\") || msg.includes(\"Not Found\") || status === 404) {\n return null;\n }\n throw e;\n }\n },\n { revalidateOnFocus: false, revalidateOnMount: true }\n );\n return { profile: data ?? null, isLoading, error, mutate };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AAGZ,SAAS,qBAAqB,WAAkC,iBAAqC;AAC1G,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC,kBAAkB,sBAAsB,eAAe,KAAK;AAAA,IAC5D,MAAM,UAAU,EAAE,IAAI,qBAAqB,eAAgB;AAAA,IAC3D,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC3D;AAEO,SAAS,kBAAkB,WAAkC,eAAmC;AACrG,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC,gBAAgB,mBAAmB,aAAa,KAAK;AAAA,IACrD,YAAY;AACV,UAAI;AACF,eAAO,MAAM,UAAU,EAAE,IAAI,kBAAkB,aAAc;AAAA,MAC/D,SAAS,GAAY;AAEnB,cAAM,MAAM,aAAa,QAAQ,EAAE,UAAU;AAC7C,cAAM,SAAU,GAA2B;AAC3C,YAAI,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,WAAW,KAAK,WAAW,KAAK;AACtE,iBAAO;AAAA,QACT;AACA,cAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,EAAE,mBAAmB,OAAO,mBAAmB,KAAK;AAAA,EACtD;AACA,SAAO,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC3D;","names":["useSWR"]}
1
+ {"version":3,"sources":["../../src/utils/use-profiles.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneApp } from \"../components/medialane-app.js\";\n\nexport function useCollectionProfile( contractAddress: string | undefined) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading, mutate } = useSWR(\n contractAddress ? `profile-collection-${contractAddress}` : null,\n () => getClient().api.getCollectionProfile(contractAddress!),\n { revalidateOnFocus: false }\n );\n return { profile: data ?? null, isLoading, error, mutate };\n}\n\nexport function useCreatorProfile( walletAddress: string | undefined) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading, mutate } = useSWR(\n walletAddress ? `profile-creator-${walletAddress}` : null,\n async () => {\n try {\n return await getClient().api.getCreatorProfile(walletAddress!);\n } catch (e: unknown) {\n\n const msg = e instanceof Error ? e.message : \"\";\n const status = (e as { status?: number })?.status;\n if (msg.includes(\"404\") || msg.includes(\"Not Found\") || status === 404) {\n return null;\n }\n throw e;\n }\n },\n { revalidateOnFocus: false, revalidateOnMount: true }\n );\n return { profile: data ?? null, isLoading, error, mutate };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AACnB,2BAAgC;AAEzB,SAAS,qBAAsB,iBAAqC;AACzE,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC,kBAAkB,sBAAsB,eAAe,KAAK;AAAA,IAC5D,MAAM,UAAU,EAAE,IAAI,qBAAqB,eAAgB;AAAA,IAC3D,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC3D;AAEO,SAAS,kBAAmB,eAAmC;AACpE,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC,gBAAgB,mBAAmB,aAAa,KAAK;AAAA,IACrD,YAAY;AACV,UAAI;AACF,eAAO,MAAM,UAAU,EAAE,IAAI,kBAAkB,aAAc;AAAA,MAC/D,SAAS,GAAY;AAEnB,cAAM,MAAM,aAAa,QAAQ,EAAE,UAAU;AAC7C,cAAM,SAAU,GAA2B;AAC3C,YAAI,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,WAAW,KAAK,WAAW,KAAK;AACtE,iBAAO;AAAA,QACT;AACA,cAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,EAAE,mBAAmB,OAAO,mBAAmB,KAAK;AAAA,EACtD;AACA,SAAO,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC3D;","names":["useSWR"]}
@@ -1,14 +1,13 @@
1
1
  import * as swr from 'swr';
2
2
  import * as _medialane_sdk from '@medialane/sdk';
3
- import { MedialaneClient } from '@medialane/sdk/starknet';
4
3
 
5
- declare function useCollectionProfile(getClient: () => MedialaneClient, contractAddress: string | undefined): {
4
+ declare function useCollectionProfile(contractAddress: string | undefined): {
6
5
  profile: _medialane_sdk.ApiCollectionProfile | null;
7
6
  isLoading: boolean;
8
7
  error: any;
9
8
  mutate: swr.KeyedMutator<_medialane_sdk.ApiCollectionProfile | null>;
10
9
  };
11
- declare function useCreatorProfile(getClient: () => MedialaneClient, walletAddress: string | undefined): {
10
+ declare function useCreatorProfile(walletAddress: string | undefined): {
12
11
  profile: _medialane_sdk.ApiCreatorProfile | null;
13
12
  isLoading: boolean;
14
13
  error: any;
@@ -1,14 +1,13 @@
1
1
  import * as swr from 'swr';
2
2
  import * as _medialane_sdk from '@medialane/sdk';
3
- import { MedialaneClient } from '@medialane/sdk/starknet';
4
3
 
5
- declare function useCollectionProfile(getClient: () => MedialaneClient, contractAddress: string | undefined): {
4
+ declare function useCollectionProfile(contractAddress: string | undefined): {
6
5
  profile: _medialane_sdk.ApiCollectionProfile | null;
7
6
  isLoading: boolean;
8
7
  error: any;
9
8
  mutate: swr.KeyedMutator<_medialane_sdk.ApiCollectionProfile | null>;
10
9
  };
11
- declare function useCreatorProfile(getClient: () => MedialaneClient, walletAddress: string | undefined): {
10
+ declare function useCreatorProfile(walletAddress: string | undefined): {
12
11
  profile: _medialane_sdk.ApiCreatorProfile | null;
13
12
  isLoading: boolean;
14
13
  error: any;
@@ -1,6 +1,8 @@
1
1
  "use client";
2
2
  import useSWR from "swr";
3
- function useCollectionProfile(getClient, contractAddress) {
3
+ import { useMedialaneApp } from "../components/medialane-app.js";
4
+ function useCollectionProfile(contractAddress) {
5
+ const { getClient } = useMedialaneApp();
4
6
  const { data, error, isLoading, mutate } = useSWR(
5
7
  contractAddress ? `profile-collection-${contractAddress}` : null,
6
8
  () => getClient().api.getCollectionProfile(contractAddress),
@@ -8,7 +10,8 @@ function useCollectionProfile(getClient, contractAddress) {
8
10
  );
9
11
  return { profile: data ?? null, isLoading, error, mutate };
10
12
  }
11
- function useCreatorProfile(getClient, walletAddress) {
13
+ function useCreatorProfile(walletAddress) {
14
+ const { getClient } = useMedialaneApp();
12
15
  const { data, error, isLoading, mutate } = useSWR(
13
16
  walletAddress ? `profile-creator-${walletAddress}` : null,
14
17
  async () => {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-profiles.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\n\nexport function useCollectionProfile(getClient: () => MedialaneClient, contractAddress: string | undefined) {\n const { data, error, isLoading, mutate } = useSWR(\n contractAddress ? `profile-collection-${contractAddress}` : null,\n () => getClient().api.getCollectionProfile(contractAddress!),\n { revalidateOnFocus: false }\n );\n return { profile: data ?? null, isLoading, error, mutate };\n}\n\nexport function useCreatorProfile(getClient: () => MedialaneClient, walletAddress: string | undefined) {\n const { data, error, isLoading, mutate } = useSWR(\n walletAddress ? `profile-creator-${walletAddress}` : null,\n async () => {\n try {\n return await getClient().api.getCreatorProfile(walletAddress!);\n } catch (e: unknown) {\n\n const msg = e instanceof Error ? e.message : \"\";\n const status = (e as { status?: number })?.status;\n if (msg.includes(\"404\") || msg.includes(\"Not Found\") || status === 404) {\n return null;\n }\n throw e;\n }\n },\n { revalidateOnFocus: false, revalidateOnMount: true }\n );\n return { profile: data ?? null, isLoading, error, mutate };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AAGZ,SAAS,qBAAqB,WAAkC,iBAAqC;AAC1G,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,kBAAkB,sBAAsB,eAAe,KAAK;AAAA,IAC5D,MAAM,UAAU,EAAE,IAAI,qBAAqB,eAAgB;AAAA,IAC3D,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC3D;AAEO,SAAS,kBAAkB,WAAkC,eAAmC;AACrG,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,gBAAgB,mBAAmB,aAAa,KAAK;AAAA,IACrD,YAAY;AACV,UAAI;AACF,eAAO,MAAM,UAAU,EAAE,IAAI,kBAAkB,aAAc;AAAA,MAC/D,SAAS,GAAY;AAEnB,cAAM,MAAM,aAAa,QAAQ,EAAE,UAAU;AAC7C,cAAM,SAAU,GAA2B;AAC3C,YAAI,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,WAAW,KAAK,WAAW,KAAK;AACtE,iBAAO;AAAA,QACT;AACA,cAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,EAAE,mBAAmB,OAAO,mBAAmB,KAAK;AAAA,EACtD;AACA,SAAO,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC3D;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/use-profiles.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneApp } from \"../components/medialane-app.js\";\n\nexport function useCollectionProfile( contractAddress: string | undefined) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading, mutate } = useSWR(\n contractAddress ? `profile-collection-${contractAddress}` : null,\n () => getClient().api.getCollectionProfile(contractAddress!),\n { revalidateOnFocus: false }\n );\n return { profile: data ?? null, isLoading, error, mutate };\n}\n\nexport function useCreatorProfile( walletAddress: string | undefined) {\n const { getClient } = useMedialaneApp();\n const { data, error, isLoading, mutate } = useSWR(\n walletAddress ? `profile-creator-${walletAddress}` : null,\n async () => {\n try {\n return await getClient().api.getCreatorProfile(walletAddress!);\n } catch (e: unknown) {\n\n const msg = e instanceof Error ? e.message : \"\";\n const status = (e as { status?: number })?.status;\n if (msg.includes(\"404\") || msg.includes(\"Not Found\") || status === 404) {\n return null;\n }\n throw e;\n }\n },\n { revalidateOnFocus: false, revalidateOnMount: true }\n );\n return { profile: data ?? null, isLoading, error, mutate };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AACnB,SAAS,uBAAuB;AAEzB,SAAS,qBAAsB,iBAAqC;AACzE,QAAM,EAAE,UAAU,IAAI,gBAAgB;AACtC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,kBAAkB,sBAAsB,eAAe,KAAK;AAAA,IAC5D,MAAM,UAAU,EAAE,IAAI,qBAAqB,eAAgB;AAAA,IAC3D,EAAE,mBAAmB,MAAM;AAAA,EAC7B;AACA,SAAO,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC3D;AAEO,SAAS,kBAAmB,eAAmC;AACpE,QAAM,EAAE,UAAU,IAAI,gBAAgB;AACtC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,gBAAgB,mBAAmB,aAAa,KAAK;AAAA,IACrD,YAAY;AACV,UAAI;AACF,eAAO,MAAM,UAAU,EAAE,IAAI,kBAAkB,aAAc;AAAA,MAC/D,SAAS,GAAY;AAEnB,cAAM,MAAM,aAAa,QAAQ,EAAE,UAAU;AAC7C,cAAM,SAAU,GAA2B;AAC3C,YAAI,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,WAAW,KAAK,WAAW,KAAK;AACtE,iBAAO;AAAA,QACT;AACA,cAAM;AAAA,MACR;AAAA,IACF;AAAA,IACA,EAAE,mBAAmB,OAAO,mBAAmB,KAAK;AAAA,EACtD;AACA,SAAO,EAAE,SAAS,QAAQ,MAAM,WAAW,OAAO,OAAO;AAC3D;","names":[]}
@@ -34,8 +34,8 @@ __export(use_remix_offers_exports, {
34
34
  module.exports = __toCommonJS(use_remix_offers_exports);
35
35
  var import_swr = __toESM(require("swr"), 1);
36
36
  var import_use_medialane_client = require("./use-medialane-client.js");
37
- function useTokenRemixes(getClient, contract, tokenId) {
38
- const client = (0, import_use_medialane_client.useMedialaneClient)(getClient);
37
+ function useTokenRemixes(contract, tokenId) {
38
+ const client = (0, import_use_medialane_client.useMedialaneClient)();
39
39
  const { data, error, isLoading, mutate } = (0, import_swr.default)(
40
40
  contract && tokenId ? `token-remixes-${contract}-${tokenId}` : null,
41
41
  () => client.api.getTokenRemixes(contract, tokenId),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-remix-offers.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { ApiPublicRemix, ApiResponse } from \"@medialane/sdk\";\n\nexport function useTokenRemixes(getClient: () => MedialaneClient, contract: string | null, tokenId: string | null) {\n const client = useMedialaneClient(getClient);\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiPublicRemix[]>>(\n contract && tokenId ? `token-remixes-${contract}-${tokenId}` : null,\n () => client.api.getTokenRemixes(contract!, tokenId!),\n { refreshInterval: 60000, revalidateOnFocus: false }\n );\n\n return { remixes: data?.data ?? [], total: data?.meta?.total ?? 0, isLoading, error, mutate };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AAEnB,kCAAmC;AAG5B,SAAS,gBAAgB,WAAkC,UAAyB,SAAwB;AACjH,QAAM,aAAS,gDAAmB,SAAS;AAC3C,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC,YAAY,UAAU,iBAAiB,QAAQ,IAAI,OAAO,KAAK;AAAA,IAC/D,MAAM,OAAO,IAAI,gBAAgB,UAAW,OAAQ;AAAA,IACpD,EAAE,iBAAiB,KAAO,mBAAmB,MAAM;AAAA,EACrD;AAEA,SAAO,EAAE,SAAS,MAAM,QAAQ,CAAC,GAAG,OAAO,MAAM,MAAM,SAAS,GAAG,WAAW,OAAO,OAAO;AAC9F;","names":["useSWR"]}
1
+ {"version":3,"sources":["../../src/utils/use-remix-offers.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { ApiPublicRemix, ApiResponse } from \"@medialane/sdk\";\n\nexport function useTokenRemixes( contract: string | null, tokenId: string | null) {\n const client = useMedialaneClient();\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiPublicRemix[]>>(\n contract && tokenId ? `token-remixes-${contract}-${tokenId}` : null,\n () => client.api.getTokenRemixes(contract!, tokenId!),\n { refreshInterval: 60000, revalidateOnFocus: false }\n );\n\n return { remixes: data?.data ?? [], total: data?.meta?.total ?? 0, isLoading, error, mutate };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AACnB,kCAAmC;AAG5B,SAAS,gBAAiB,UAAyB,SAAwB;AAChF,QAAM,aAAS,gDAAmB;AAClC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,QAAI,WAAAA;AAAA,IACzC,YAAY,UAAU,iBAAiB,QAAQ,IAAI,OAAO,KAAK;AAAA,IAC/D,MAAM,OAAO,IAAI,gBAAgB,UAAW,OAAQ;AAAA,IACpD,EAAE,iBAAiB,KAAO,mBAAmB,MAAM;AAAA,EACrD;AAEA,SAAO,EAAE,SAAS,MAAM,QAAQ,CAAC,GAAG,OAAO,MAAM,MAAM,SAAS,GAAG,WAAW,OAAO,OAAO;AAC9F;","names":["useSWR"]}
@@ -1,8 +1,7 @@
1
1
  import * as swr from 'swr';
2
- import { MedialaneClient } from '@medialane/sdk/starknet';
3
2
  import { ApiPublicRemix, ApiResponse } from '@medialane/sdk';
4
3
 
5
- declare function useTokenRemixes(getClient: () => MedialaneClient, contract: string | null, tokenId: string | null): {
4
+ declare function useTokenRemixes(contract: string | null, tokenId: string | null): {
6
5
  remixes: ApiPublicRemix[];
7
6
  total: number;
8
7
  isLoading: boolean;
@@ -1,8 +1,7 @@
1
1
  import * as swr from 'swr';
2
- import { MedialaneClient } from '@medialane/sdk/starknet';
3
2
  import { ApiPublicRemix, ApiResponse } from '@medialane/sdk';
4
3
 
5
- declare function useTokenRemixes(getClient: () => MedialaneClient, contract: string | null, tokenId: string | null): {
4
+ declare function useTokenRemixes(contract: string | null, tokenId: string | null): {
6
5
  remixes: ApiPublicRemix[];
7
6
  total: number;
8
7
  isLoading: boolean;
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import useSWR from "swr";
3
3
  import { useMedialaneClient } from "./use-medialane-client.js";
4
- function useTokenRemixes(getClient, contract, tokenId) {
5
- const client = useMedialaneClient(getClient);
4
+ function useTokenRemixes(contract, tokenId) {
5
+ const client = useMedialaneClient();
6
6
  const { data, error, isLoading, mutate } = useSWR(
7
7
  contract && tokenId ? `token-remixes-${contract}-${tokenId}` : null,
8
8
  () => client.api.getTokenRemixes(contract, tokenId),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-remix-offers.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { ApiPublicRemix, ApiResponse } from \"@medialane/sdk\";\n\nexport function useTokenRemixes(getClient: () => MedialaneClient, contract: string | null, tokenId: string | null) {\n const client = useMedialaneClient(getClient);\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiPublicRemix[]>>(\n contract && tokenId ? `token-remixes-${contract}-${tokenId}` : null,\n () => client.api.getTokenRemixes(contract!, tokenId!),\n { refreshInterval: 60000, revalidateOnFocus: false }\n );\n\n return { remixes: data?.data ?? [], total: data?.meta?.total ?? 0, isLoading, error, mutate };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AAEnB,SAAS,0BAA0B;AAG5B,SAAS,gBAAgB,WAAkC,UAAyB,SAAwB;AACjH,QAAM,SAAS,mBAAmB,SAAS;AAC3C,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,YAAY,UAAU,iBAAiB,QAAQ,IAAI,OAAO,KAAK;AAAA,IAC/D,MAAM,OAAO,IAAI,gBAAgB,UAAW,OAAQ;AAAA,IACpD,EAAE,iBAAiB,KAAO,mBAAmB,MAAM;AAAA,EACrD;AAEA,SAAO,EAAE,SAAS,MAAM,QAAQ,CAAC,GAAG,OAAO,MAAM,MAAM,SAAS,GAAG,WAAW,OAAO,OAAO;AAC9F;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/use-remix-offers.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport { useMedialaneClient } from \"./use-medialane-client.js\";\nimport type { ApiPublicRemix, ApiResponse } from \"@medialane/sdk\";\n\nexport function useTokenRemixes( contract: string | null, tokenId: string | null) {\n const client = useMedialaneClient();\n const { data, error, isLoading, mutate } = useSWR<ApiResponse<ApiPublicRemix[]>>(\n contract && tokenId ? `token-remixes-${contract}-${tokenId}` : null,\n () => client.api.getTokenRemixes(contract!, tokenId!),\n { refreshInterval: 60000, revalidateOnFocus: false }\n );\n\n return { remixes: data?.data ?? [], total: data?.meta?.total ?? 0, isLoading, error, mutate };\n}\n"],"mappings":";AAEA,OAAO,YAAY;AACnB,SAAS,0BAA0B;AAG5B,SAAS,gBAAiB,UAAyB,SAAwB;AAChF,QAAM,SAAS,mBAAmB;AAClC,QAAM,EAAE,MAAM,OAAO,WAAW,OAAO,IAAI;AAAA,IACzC,YAAY,UAAU,iBAAiB,QAAQ,IAAI,OAAO,KAAK;AAAA,IAC/D,MAAM,OAAO,IAAI,gBAAgB,UAAW,OAAQ;AAAA,IACpD,EAAE,iBAAiB,KAAO,mBAAmB,MAAM;AAAA,EACrD;AAEA,SAAO,EAAE,SAAS,MAAM,QAAQ,CAAC,GAAG,OAAO,MAAM,MAAM,SAAS,GAAG,WAAW,OAAO,OAAO;AAC9F;","names":[]}
@@ -37,14 +37,17 @@ __export(use_rewards_exports, {
37
37
  });
38
38
  module.exports = __toCommonJS(use_rewards_exports);
39
39
  var import_swr = __toESM(require("swr"), 1);
40
- function useRewards(getClient, address) {
40
+ var import_medialane_app = require("../components/medialane-app.js");
41
+ function useRewards(address) {
42
+ const { getClient } = (0, import_medialane_app.useMedialaneApp)();
41
43
  return (0, import_swr.default)(
42
44
  address ? `rewards:${address}` : null,
43
45
  () => getClient().api.getRewards(address),
44
46
  { revalidateOnFocus: false, dedupingInterval: 6e4 }
45
47
  );
46
48
  }
47
- function useLeaderboard(getClient, page = 1, limit = 50) {
49
+ function useLeaderboard(page = 1, limit = 50) {
50
+ const { getClient } = (0, import_medialane_app.useMedialaneApp)();
48
51
  return (0, import_swr.default)(
49
52
  `rewards-leaderboard:${page}:${limit}`,
50
53
  async () => {
@@ -57,7 +60,8 @@ function useLeaderboard(getClient, page = 1, limit = 50) {
57
60
  { revalidateOnFocus: false, dedupingInterval: 12e4 }
58
61
  );
59
62
  }
60
- function useRewardsEvents(getClient, address, page = 1, limit = 20) {
63
+ function useRewardsEvents(address, page = 1, limit = 20) {
64
+ const { getClient } = (0, import_medialane_app.useMedialaneApp)();
61
65
  return (0, import_swr.default)(
62
66
  address ? `rewards-events:${address}:${page}:${limit}` : null,
63
67
  async () => {
@@ -70,14 +74,16 @@ function useRewardsEvents(getClient, address, page = 1, limit = 20) {
70
74
  { revalidateOnFocus: false, dedupingInterval: 6e4 }
71
75
  );
72
76
  }
73
- function useRewardsConfig(getClient) {
77
+ function useRewardsConfig() {
78
+ const { getClient } = (0, import_medialane_app.useMedialaneApp)();
74
79
  return (0, import_swr.default)(
75
80
  "rewards-config",
76
81
  () => getClient().api.getRewardsConfig(),
77
82
  { revalidateOnFocus: false, dedupingInterval: 3e5 }
78
83
  );
79
84
  }
80
- function useRewardsBatch(getClient, addresses) {
85
+ function useRewardsBatch(addresses) {
86
+ const { getClient } = (0, import_medialane_app.useMedialaneApp)();
81
87
  const unique = [...new Set(addresses)].slice(0, 50);
82
88
  const key = unique.length ? `rewards-batch:${[...unique].sort().join(",")}` : null;
83
89
  return (0, import_swr.default)(
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/use-rewards.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type {\n ApiUserRewards,\n ApiRewardsLeaderboardEntry,\n ApiRewardsConfig,\n ApiRewardsBatchEntry,\n ApiPointEvent,\n} from \"@medialane/sdk\";\n\nexport type UserRewards = ApiUserRewards;\nexport type LeaderboardEntry = ApiRewardsLeaderboardEntry;\nexport type BadgeSummary = ApiUserRewards[\"badges\"][number];\nexport type LevelSummary = NonNullable<ApiUserRewards[\"nextLevel\"]>;\n\nexport function useRewards(getClient: () => MedialaneClient, address: string | null | undefined) {\n return useSWR<ApiUserRewards>(\n address ? `rewards:${address}` : null,\n () => getClient().api.getRewards(address!),\n { revalidateOnFocus: false, dedupingInterval: 60_000 }\n );\n}\n\nexport function useLeaderboard(getClient: () => MedialaneClient, page = 1, limit = 50) {\n return useSWR<{ data: ApiRewardsLeaderboardEntry[]; meta: { page: number; limit: number; total: number } }>(\n `rewards-leaderboard:${page}:${limit}`,\n async () => {\n const res = await getClient().api.getRewardsLeaderboard(page, limit);\n return {\n data: res.data,\n meta: { page: res.meta?.page ?? page, limit: res.meta?.limit ?? limit, total: res.meta?.total ?? res.data.length },\n };\n },\n { revalidateOnFocus: false, dedupingInterval: 120_000 }\n );\n}\n\nexport function useRewardsEvents(\n getClient: () => MedialaneClient,\n address: string | null | undefined,\n page = 1,\n limit = 20\n) {\n return useSWR<{ data: ApiPointEvent[]; meta: { page: number; limit: number; total: number } }>(\n address ? `rewards-events:${address}:${page}:${limit}` : null,\n async () => {\n const res = await getClient().api.getRewardsEvents(address!, page, limit);\n return {\n data: res.data,\n meta: { page: res.meta?.page ?? page, limit: res.meta?.limit ?? limit, total: res.meta?.total ?? res.data.length },\n };\n },\n { revalidateOnFocus: false, dedupingInterval: 60_000 }\n );\n}\n\nexport function useRewardsConfig(getClient: () => MedialaneClient) {\n return useSWR<ApiRewardsConfig>(\n \"rewards-config\",\n () => getClient().api.getRewardsConfig(),\n { revalidateOnFocus: false, dedupingInterval: 300_000 }\n );\n}\n\nexport function useRewardsBatch(getClient: () => MedialaneClient, addresses: string[]) {\n const unique = [...new Set(addresses)].slice(0, 50);\n const key = unique.length ? `rewards-batch:${[...unique].sort().join(\",\")}` : null;\n return useSWR<Map<string, ApiRewardsBatchEntry>>(\n key,\n async () => {\n const entries = await getClient().api.getRewardsBatch(unique);\n return new Map(entries.map((e) => [e.address, e]));\n },\n { revalidateOnFocus: false, dedupingInterval: 120_000 }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAA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EAAE,IAAI,iBAAiB;AAAA,IACvC,EAAE,mBAAmB,OAAO,kBAAkB,IAAQ;AAAA,EACxD;AACF;AAEO,SAAS,gBAAgB,WAAkC,WAAqB;AACrF,QAAM,SAAS,CAAC,GAAG,IAAI,IAAI,SAAS,CAAC,EAAE,MAAM,GAAG,EAAE;AAClD,QAAM,MAAM,OAAO,SAAS,iBAAiB,CAAC,GAAG,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,CAAC,KAAK;AAC9E,aAAO,WAAAA;AAAA,IACL;AAAA,IACA,YAAY;AACV,YAAM,UAAU,MAAM,UAAU,EAAE,IAAI,gBAAgB,MAAM;AAC5D,aAAO,IAAI,IAAI,QAAQ,IAAI,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;AAAA,IACnD;AAAA,IACA,EAAE,mBAAmB,OAAO,kBAAkB,KAAQ;AAAA,EACxD;AACF;","names":["useSWR"]}
1
+ {"version":3,"sources":["../../src/utils/use-rewards.ts"],"sourcesContent":["\"use client\";\n\nimport useSWR from \"swr\";\nimport type {\n ApiUserRewards,\n ApiRewardsLeaderboardEntry,\n ApiRewardsConfig,\n ApiRewardsBatchEntry,\n ApiPointEvent,\n} from \"@medialane/sdk\";\nimport { useMedialaneApp } from \"../components/medialane-app.js\";\n\nexport type UserRewards = ApiUserRewards;\nexport type LeaderboardEntry = ApiRewardsLeaderboardEntry;\nexport type BadgeSummary = ApiUserRewards[\"badges\"][number];\nexport type LevelSummary = NonNullable<ApiUserRewards[\"nextLevel\"]>;\n\nexport function useRewards( address: string | null | undefined) {\n const { getClient } = useMedialaneApp();\n return useSWR<ApiUserRewards>(\n address ? `rewards:${address}` : null,\n () => getClient().api.getRewards(address!),\n { revalidateOnFocus: false, dedupingInterval: 60_000 }\n );\n}\n\nexport function useLeaderboard( page = 1, limit = 50) {\n const { getClient } = useMedialaneApp();\n return useSWR<{ data: ApiRewardsLeaderboardEntry[]; meta: { page: number; limit: number; total: number } }>(\n `rewards-leaderboard:${page}:${limit}`,\n async () => {\n const res = await getClient().api.getRewardsLeaderboard(page, limit);\n return {\n data: res.data,\n meta: { page: res.meta?.page ?? page, limit: res.meta?.limit ?? limit, total: res.meta?.total ?? res.data.length },\n };\n },\n { revalidateOnFocus: false, dedupingInterval: 120_000 }\n );\n}\n\nexport function useRewardsEvents(\n address: string | null | undefined,\n page = 1,\n limit = 20\n) {\n const { getClient } = useMedialaneApp();\n return useSWR<{ data: ApiPointEvent[]; meta: { page: number; limit: number; total: number } }>(\n address ? `rewards-events:${address}:${page}:${limit}` : null,\n async () => {\n const res = await getClient().api.getRewardsEvents(address!, page, limit);\n return {\n data: res.data,\n meta: { page: res.meta?.page ?? page, limit: res.meta?.limit ?? limit, total: res.meta?.total ?? res.data.length },\n };\n },\n { revalidateOnFocus: false, dedupingInterval: 60_000 }\n );\n}\n\nexport function useRewardsConfig() {\n const { getClient } = useMedialaneApp();\n return useSWR<ApiRewardsConfig>(\n \"rewards-config\",\n () => getClient().api.getRewardsConfig(),\n { revalidateOnFocus: false, dedupingInterval: 300_000 }\n );\n}\n\nexport function useRewardsBatch( addresses: string[]) {\n const { getClient } = useMedialaneApp();\n const unique = [...new Set(addresses)].slice(0, 50);\n const key = unique.length ? `rewards-batch:${[...unique].sort().join(\",\")}` : null;\n return useSWR<Map<string, ApiRewardsBatchEntry>>(\n key,\n async () => {\n const entries = await getClient().api.getRewardsBatch(unique);\n return new Map(entries.map((e) => [e.address, e]));\n },\n { revalidateOnFocus: false, dedupingInterval: 120_000 }\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AAQnB,2BAAgC;AAOzB,SAAS,WAAY,SAAoC;AAC9D,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,aAAO,WAAAA;AAAA,IACL,UAAU,WAAW,OAAO,KAAK;AAAA,IACjC,MAAM,UAAU,EAAE,IAAI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