@medialane/ui 0.382.0 → 0.384.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/dist/components/account/account-section.cjs +3 -4
  2. package/dist/components/account/account-section.cjs.map +1 -1
  3. package/dist/components/account/account-section.d.cts +3 -3
  4. package/dist/components/account/account-section.d.ts +3 -3
  5. package/dist/components/account/account-section.js +3 -4
  6. package/dist/components/account/account-section.js.map +1 -1
  7. package/dist/components/account/guardian-recovery-section.cjs +2 -1
  8. package/dist/components/account/guardian-recovery-section.cjs.map +1 -1
  9. package/dist/components/account/guardian-recovery-section.js +2 -1
  10. package/dist/components/account/guardian-recovery-section.js.map +1 -1
  11. package/dist/components/account/input-otp.d.cts +2 -2
  12. package/dist/components/account/input-otp.d.ts +2 -2
  13. package/dist/components/accounts-page.cjs +2 -1
  14. package/dist/components/accounts-page.cjs.map +1 -1
  15. package/dist/components/accounts-page.js +2 -1
  16. package/dist/components/accounts-page.js.map +1 -1
  17. package/dist/components/activities-feed.cjs +2 -1
  18. package/dist/components/activities-feed.cjs.map +1 -1
  19. package/dist/components/activities-feed.js +2 -1
  20. package/dist/components/activities-feed.js.map +1 -1
  21. package/dist/components/activity-timeline-row.cjs +2 -1
  22. package/dist/components/activity-timeline-row.cjs.map +1 -1
  23. package/dist/components/activity-timeline-row.js +2 -1
  24. package/dist/components/activity-timeline-row.js.map +1 -1
  25. package/dist/components/asset-overview-content.cjs +2 -1
  26. package/dist/components/asset-overview-content.cjs.map +1 -1
  27. package/dist/components/asset-overview-content.js +2 -1
  28. package/dist/components/asset-overview-content.js.map +1 -1
  29. package/dist/components/asset-picker.cjs +2 -1
  30. package/dist/components/asset-picker.cjs.map +1 -1
  31. package/dist/components/asset-picker.js +2 -1
  32. package/dist/components/asset-picker.js.map +1 -1
  33. package/dist/components/button.d.cts +1 -1
  34. package/dist/components/button.d.ts +1 -1
  35. package/dist/components/claim-rail.cjs +5 -8
  36. package/dist/components/claim-rail.cjs.map +1 -1
  37. package/dist/components/claim-rail.d.cts +1 -4
  38. package/dist/components/claim-rail.d.ts +1 -4
  39. package/dist/components/claim-rail.js +5 -8
  40. package/dist/components/claim-rail.js.map +1 -1
  41. package/dist/components/collection-settings.cjs +2 -3
  42. package/dist/components/collection-settings.cjs.map +1 -1
  43. package/dist/components/collection-settings.js +2 -3
  44. package/dist/components/collection-settings.js.map +1 -1
  45. package/dist/components/collection-slug-claim.cjs +1 -7
  46. package/dist/components/collection-slug-claim.cjs.map +1 -1
  47. package/dist/components/collection-slug-claim.js +1 -7
  48. package/dist/components/collection-slug-claim.js.map +1 -1
  49. package/dist/components/comments-section.cjs +2 -1
  50. package/dist/components/comments-section.cjs.map +1 -1
  51. package/dist/components/comments-section.js +2 -1
  52. package/dist/components/comments-section.js.map +1 -1
  53. package/dist/components/discover-features.cjs +7 -6
  54. package/dist/components/discover-features.cjs.map +1 -1
  55. package/dist/components/discover-features.js +7 -6
  56. package/dist/components/discover-features.js.map +1 -1
  57. package/dist/components/empty-or-error.cjs +3 -2
  58. package/dist/components/empty-or-error.cjs.map +1 -1
  59. package/dist/components/empty-or-error.js +3 -2
  60. package/dist/components/empty-or-error.js.map +1 -1
  61. package/dist/components/gated-content.cjs +5 -4
  62. package/dist/components/gated-content.cjs.map +1 -1
  63. package/dist/components/gated-content.js +5 -4
  64. package/dist/components/gated-content.js.map +1 -1
  65. package/dist/components/icon-tile.cjs +49 -0
  66. package/dist/components/icon-tile.cjs.map +1 -0
  67. package/dist/components/icon-tile.d.cts +17 -0
  68. package/dist/components/icon-tile.d.ts +17 -0
  69. package/dist/components/icon-tile.js +25 -0
  70. package/dist/components/icon-tile.js.map +1 -0
  71. package/dist/components/ip-type-nav.cjs +3 -3
  72. package/dist/components/ip-type-nav.cjs.map +1 -1
  73. package/dist/components/ip-type-nav.js +3 -3
  74. package/dist/components/ip-type-nav.js.map +1 -1
  75. package/dist/components/ip-type-page.cjs +3 -2
  76. package/dist/components/ip-type-page.cjs.map +1 -1
  77. package/dist/components/ip-type-page.js +3 -2
  78. package/dist/components/ip-type-page.js.map +1 -1
  79. package/dist/components/journey-content.cjs +2 -1
  80. package/dist/components/journey-content.cjs.map +1 -1
  81. package/dist/components/journey-content.js +2 -1
  82. package/dist/components/journey-content.js.map +1 -1
  83. package/dist/components/launchpad/edition-mint-schema.d.cts +2 -2
  84. package/dist/components/launchpad/edition-mint-schema.d.ts +2 -2
  85. package/dist/components/launchpad-services.cjs +27 -22
  86. package/dist/components/launchpad-services.cjs.map +1 -1
  87. package/dist/components/launchpad-services.d.cts +2 -0
  88. package/dist/components/launchpad-services.d.ts +2 -0
  89. package/dist/components/launchpad-services.js +27 -22
  90. package/dist/components/launchpad-services.js.map +1 -1
  91. package/dist/components/launchpad-strip.cjs +6 -1
  92. package/dist/components/launchpad-strip.cjs.map +1 -1
  93. package/dist/components/launchpad-strip.js +6 -1
  94. package/dist/components/launchpad-strip.js.map +1 -1
  95. package/dist/components/license-request-page.cjs +2 -1
  96. package/dist/components/license-request-page.cjs.map +1 -1
  97. package/dist/components/license-request-page.js +2 -1
  98. package/dist/components/license-request-page.js.map +1 -1
  99. package/dist/components/marketplace-dialog-primitives.cjs +2 -1
  100. package/dist/components/marketplace-dialog-primitives.cjs.map +1 -1
  101. package/dist/components/marketplace-dialog-primitives.js +2 -1
  102. package/dist/components/marketplace-dialog-primitives.js.map +1 -1
  103. package/dist/components/media-wallet/media-wallet-home.cjs +3 -2
  104. package/dist/components/media-wallet/media-wallet-home.cjs.map +1 -1
  105. package/dist/components/media-wallet/media-wallet-home.js +3 -2
  106. package/dist/components/media-wallet/media-wallet-home.js.map +1 -1
  107. package/dist/components/media-wallet/wallet-activity-icon.cjs +5 -8
  108. package/dist/components/media-wallet/wallet-activity-icon.cjs.map +1 -1
  109. package/dist/components/media-wallet/wallet-activity-icon.js +5 -8
  110. package/dist/components/media-wallet/wallet-activity-icon.js.map +1 -1
  111. package/dist/components/mint-landing.cjs +7 -10
  112. package/dist/components/mint-landing.cjs.map +1 -1
  113. package/dist/components/mint-landing.js +7 -10
  114. package/dist/components/mint-landing.js.map +1 -1
  115. package/dist/components/nav-command-menu.cjs +2 -1
  116. package/dist/components/nav-command-menu.cjs.map +1 -1
  117. package/dist/components/nav-command-menu.js +2 -1
  118. package/dist/components/nav-command-menu.js.map +1 -1
  119. package/dist/components/remixes-tab.cjs +2 -1
  120. package/dist/components/remixes-tab.cjs.map +1 -1
  121. package/dist/components/remixes-tab.js +2 -1
  122. package/dist/components/remixes-tab.js.map +1 -1
  123. package/dist/components/rewards/badge-catalog.cjs +2 -1
  124. package/dist/components/rewards/badge-catalog.cjs.map +1 -1
  125. package/dist/components/rewards/badge-catalog.js +2 -1
  126. package/dist/components/rewards/badge-catalog.js.map +1 -1
  127. package/dist/components/rewards/leaderboard-panel.cjs +2 -1
  128. package/dist/components/rewards/leaderboard-panel.cjs.map +1 -1
  129. package/dist/components/rewards/leaderboard-panel.js +2 -1
  130. package/dist/components/rewards/leaderboard-panel.js.map +1 -1
  131. package/dist/components/rewards/rewards-dashboard.cjs +2 -4
  132. package/dist/components/rewards/rewards-dashboard.cjs.map +1 -1
  133. package/dist/components/rewards/rewards-dashboard.js +2 -4
  134. package/dist/components/rewards/rewards-dashboard.js.map +1 -1
  135. package/dist/components/rewards-section.cjs +2 -1
  136. package/dist/components/rewards-section.cjs.map +1 -1
  137. package/dist/components/rewards-section.js +2 -1
  138. package/dist/components/rewards-section.js.map +1 -1
  139. package/dist/components/route-error.cjs +2 -1
  140. package/dist/components/route-error.cjs.map +1 -1
  141. package/dist/components/route-error.js +2 -1
  142. package/dist/components/route-error.js.map +1 -1
  143. package/dist/components/service-collections-page.cjs +2 -1
  144. package/dist/components/service-collections-page.cjs.map +1 -1
  145. package/dist/components/service-collections-page.js +2 -1
  146. package/dist/components/service-collections-page.js.map +1 -1
  147. package/dist/components/settings-section.cjs +3 -4
  148. package/dist/components/settings-section.cjs.map +1 -1
  149. package/dist/components/settings-section.d.cts +1 -3
  150. package/dist/components/settings-section.d.ts +1 -3
  151. package/dist/components/settings-section.js +3 -4
  152. package/dist/components/settings-section.js.map +1 -1
  153. package/dist/components/sponsorship-offers-page.cjs +2 -1
  154. package/dist/components/sponsorship-offers-page.cjs.map +1 -1
  155. package/dist/components/sponsorship-offers-page.js +2 -1
  156. package/dist/components/sponsorship-offers-page.js.map +1 -1
  157. package/dist/components/tab-empty-state.cjs +2 -1
  158. package/dist/components/tab-empty-state.cjs.map +1 -1
  159. package/dist/components/tab-empty-state.js +2 -1
  160. package/dist/components/tab-empty-state.js.map +1 -1
  161. package/dist/components/transaction-dialog.cjs +2 -1
  162. package/dist/components/transaction-dialog.cjs.map +1 -1
  163. package/dist/components/transaction-dialog.js +2 -1
  164. package/dist/components/transaction-dialog.js.map +1 -1
  165. package/dist/index.cjs +3 -0
  166. package/dist/index.cjs.map +1 -1
  167. package/dist/index.d.cts +1 -0
  168. package/dist/index.d.ts +1 -0
  169. package/dist/index.js +2 -0
  170. package/dist/index.js.map +1 -1
  171. package/dist/medialane.css +20 -0
  172. package/package.json +1 -1
@@ -6,6 +6,7 @@ import { useMedialaneApp } from "./medialane-app.js";
6
6
  import { useT } from "../i18n/provider.js";
7
7
  import { panelTint } from "./panel.js";
8
8
  import { ActionButton } from "./action-button.js";
9
+ import { IconTile } from "./icon-tile.js";
9
10
  const typeOf = (content) => content.type ? GATED_CONTENT_TYPES[content.type] ?? GATED_CONTENT_TYPE_FALLBACK : GATED_CONTENT_TYPE_FALLBACK;
10
11
  function GatedContentHero({
11
12
  profile,
@@ -24,7 +25,7 @@ function GatedContentHero({
24
25
  className: "panel w-full flex items-center gap-4 hover:bg-background/40 px-5 py-4 transition-colors text-left",
25
26
  style: panelTint("blue"),
26
27
  children: [
27
- /* @__PURE__ */ jsx("div", { className: "h-11 w-11 rounded-xl bg-brand-blue/15 flex items-center justify-center shrink-0 text-brand-blue", children: /* @__PURE__ */ jsx(Icon, { className: "h-5 w-5" }) }),
28
+ /* @__PURE__ */ jsx(IconTile, { children: /* @__PURE__ */ jsx(Icon, {}) }),
28
29
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
29
30
  /* @__PURE__ */ jsx("p", { className: "text-2xs font-bold text-brand-blue leading-none", children: t("\u2713 You're a holder \u2014 unlocked") }),
30
31
  /* @__PURE__ */ jsx("p", { className: "text-sm font-bold text-foreground leading-snug mt-1 truncate", children: state.content.title ?? title })
@@ -41,7 +42,7 @@ function GatedContentHero({
41
42
  className: "w-full flex items-center gap-4 rounded-2xl hover:bg-background/40 px-5 py-4 transition-colors text-left group",
42
43
  style: panelTint("blue"),
43
44
  children: [
44
- /* @__PURE__ */ jsx("div", { className: "h-11 w-11 rounded-xl bg-muted flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx(Lock, { className: "h-5 w-5 text-muted-foreground" }) }),
45
+ /* @__PURE__ */ jsx(IconTile, { children: /* @__PURE__ */ jsx(Lock, {}) }),
45
46
  /* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
46
47
  /* @__PURE__ */ jsx(
47
48
  "p",
@@ -60,7 +61,7 @@ function GatedContentHero({
60
61
  }
61
62
  function LockedNotice({ title, body, children }) {
62
63
  return /* @__PURE__ */ jsxs("div", { className: "py-16 flex flex-col items-center gap-5 text-center max-w-sm mx-auto", children: [
63
- /* @__PURE__ */ jsx("div", { className: "h-16 w-16 rounded-2xl bg-muted flex items-center justify-center", children: /* @__PURE__ */ jsx(Lock, { className: "h-8 w-8 text-muted-foreground/50" }) }),
64
+ /* @__PURE__ */ jsx(IconTile, { size: "lg", children: /* @__PURE__ */ jsx(Lock, {}) }),
64
65
  /* @__PURE__ */ jsxs("div", { children: [
65
66
  /* @__PURE__ */ jsx("p", { className: "text-base font-semibold", children: title }),
66
67
  /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mt-1", children: body })
@@ -93,7 +94,7 @@ function GatedContentPanel({ state, onBrowseListings }) {
93
94
  const { icon: Icon, cta } = typeOf(state.content);
94
95
  return /* @__PURE__ */ jsxs("div", { className: "py-8 flex flex-col items-center gap-6 text-center max-w-md mx-auto", children: [
95
96
  /* @__PURE__ */ jsxs("div", { className: "relative", children: [
96
- /* @__PURE__ */ jsx("div", { className: "h-20 w-20 rounded-2xl bg-brand-blue/15 flex items-center justify-center text-brand-blue", children: /* @__PURE__ */ jsx(Unlock, { className: "h-10 w-10" }) }),
97
+ /* @__PURE__ */ jsx(IconTile, { size: "lg", children: /* @__PURE__ */ jsx(Unlock, {}) }),
97
98
  /* @__PURE__ */ jsx("div", { className: "absolute -bottom-1 -right-1 h-6 w-6 rounded-full bg-brand-blue flex items-center justify-center", children: /* @__PURE__ */ jsx(Sparkles, { className: "h-3 w-3 text-white" }) })
98
99
  ] }),
99
100
  /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/gated-content.tsx"],"sourcesContent":["\"use client\";\n\nimport { Loader2, Lock, ShoppingBag, Sparkles, Unlock } from \"lucide-react\";\nimport type { ApiCollectionProfile } from \"@medialane/sdk\";\nimport { GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK } from \"../data/gated-content-types.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { panelTint } from \"./panel.js\";\nimport { ActionButton } from \"./action-button.js\";\n\nexport interface GatedContent {\n title: string | null;\n url: string;\n type: string | null;\n}\n\nexport type GatedContentState =\n | { status: \"signed_out\" }\n | { status: \"loading\" }\n | { status: \"not_holder\" }\n | { status: \"unlocked\"; content: GatedContent }\n | { status: \"error\" };\n\nconst typeOf = (content: GatedContent) => (content.type ? GATED_CONTENT_TYPES[content.type] ?? GATED_CONTENT_TYPE_FALLBACK : GATED_CONTENT_TYPE_FALLBACK);\n\nexport function GatedContentHero({\n profile,\n state,\n onViewExclusive,\n}: {\n profile: ApiCollectionProfile | null;\n state: GatedContentState;\n onViewExclusive: () => void;\n}) {\n const t = useT();\n if (!profile?.hasGatedContent) return null;\n const title = profile.gatedContentTitle ?? \"Exclusive content for holders\";\n\n if (state.status === \"unlocked\") {\n const { icon: Icon } = typeOf(state.content);\n return (\n <button\n onClick={onViewExclusive}\n className=\"panel w-full flex items-center gap-4 hover:bg-background/40 px-5 py-4 transition-colors text-left\"\n style={panelTint(\"blue\")}\n >\n <div className=\"h-11 w-11 rounded-xl bg-brand-blue/15 flex items-center justify-center shrink-0 text-brand-blue\">\n <Icon className=\"h-5 w-5\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-2xs font-bold text-brand-blue leading-none\">{t(\"✓ You're a holder — unlocked\")}</p>\n <p className=\"text-sm font-bold text-foreground leading-snug mt-1 truncate\">{state.content.title ?? title}</p>\n </div>\n <Unlock className=\"h-4 w-4 text-brand-blue shrink-0\" />\n </button>\n );\n }\n\n return (\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-2xl hover:bg-background/40 px-5 py-4 transition-colors text-left group\"\n style={panelTint(\"blue\")}\n >\n <div className=\"h-11 w-11 rounded-xl bg-muted flex items-center justify-center shrink-0\">\n <Lock className=\"h-5 w-5 text-muted-foreground\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <p\n className=\"text-2xs font-bold leading-none mb-1 text-brand-blue\"\n >\n {t(\"Holder exclusive\")}\n </p>\n <p className=\"text-sm font-bold text-foreground leading-snug truncate\">{title}</p>\n <p className=\"text-xs text-muted-foreground mt-0.5\">{t(\"Own a token from this collection to unlock\")}</p>\n </div>\n <Sparkles className=\"h-4 w-4 text-muted-foreground/50 group-hover:text-primary transition-colors shrink-0\" />\n </button>\n );\n}\n\nfunction LockedNotice({ title, body, children }: { title: string; body: string; children?: React.ReactNode }) {\n return (\n <div className=\"py-16 flex flex-col items-center gap-5 text-center max-w-sm mx-auto\">\n <div className=\"h-16 w-16 rounded-2xl bg-muted flex items-center justify-center\">\n <Lock className=\"h-8 w-8 text-muted-foreground/50\" />\n </div>\n <div>\n <p className=\"text-base font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{body}</p>\n </div>\n {children}\n </div>\n );\n}\n\nconst PRIMARY = \"inline-flex items-center gap-2 bg-foreground text-background hover:opacity-90 font-semibold px-5 py-2.5 rounded-xl transition-all text-sm\";\n\nexport function GatedContentPanel({ state, onBrowseListings }: { state: GatedContentState; onBrowseListings: () => void }) {\n const t = useT();\n const { connectLabel = \"Sign in\", onRequireWallet } = useMedialaneApp();\n\n if (state.status === \"signed_out\") {\n return (\n <LockedNotice title={t(\"{label} to unlock\", { label: t(connectLabel) })} body={t(\"This collection has exclusive content for holders. Sign in so we can check your holdings.\")}>\n <button type=\"button\" onClick={onRequireWallet} className={PRIMARY}>{t(connectLabel)}</button>\n </LockedNotice>\n );\n }\n if (state.status === \"loading\") {\n return (\n <div className=\"py-16 flex flex-col items-center gap-3\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground/40\" />\n <p className=\"text-xs text-muted-foreground\">{t(\"Checking your holdings…\")}</p>\n </div>\n );\n }\n if (state.status === \"not_holder\") {\n return (\n <LockedNotice title={t(\"Holders only\")} body={t(\"Hold at least one token from this collection to open the exclusive content.\")}>\n <button type=\"button\" onClick={onBrowseListings} className={PRIMARY}>\n <ShoppingBag className=\"h-4 w-4\" />\n {t(\"Browse listings\")}\n </button>\n </LockedNotice>\n );\n }\n if (state.status === \"error\") {\n return <LockedNotice title={t(\"Couldn't check your holdings\")} body={t(\"Refresh the page to try again.\")} />;\n }\n\n const { icon: Icon, cta } = typeOf(state.content);\n return (\n <div className=\"py-8 flex flex-col items-center gap-6 text-center max-w-md mx-auto\">\n <div className=\"relative\">\n <div className=\"h-20 w-20 rounded-2xl bg-brand-blue/15 flex items-center justify-center text-brand-blue\">\n <Unlock className=\"h-10 w-10\" />\n </div>\n <div className=\"absolute -bottom-1 -right-1 h-6 w-6 rounded-full bg-brand-blue flex items-center justify-center\">\n <Sparkles className=\"h-3 w-3 text-white\" />\n </div>\n </div>\n <div className=\"space-y-1.5\">\n <p className=\"text-2xs font-bold text-brand-blue\">{t(\"✓ Verified holder\")}</p>\n <h3 className=\"text-xl font-bold\">{state.content.title ?? t(\"Exclusive content\")}</h3>\n <p className=\"text-sm text-muted-foreground\">{t(\"Your access is verified. Enjoy your exclusive content.\")}</p>\n </div>\n <ActionButton solid asChild>\n <a href={state.content.url} target=\"_blank\" rel=\"noopener noreferrer\">\n <Icon className=\"h-5 w-5\" />\n {cta}\n </a>\n </ActionButton>\n </div>\n );\n}\n"],"mappings":";AA+CU,cAEF,YAFE;AA7CV,SAAS,SAAS,MAAM,aAAa,UAAU,cAAc;AAE7D,SAAS,qBAAqB,mCAAmC;AACjE,SAAS,uBAAuB;AAChC,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAe7B,MAAM,SAAS,CAAC,YAA2B,QAAQ,OAAO,oBAAoB,QAAQ,IAAI,KAAK,8BAA8B;AAEtH,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,IAAI,KAAK;AACf,MAAI,CAAC,SAAS,gBAAiB,QAAO;AACtC,QAAM,QAAQ,QAAQ,qBAAqB;AAE3C,MAAI,MAAM,WAAW,YAAY;AAC/B,UAAM,EAAE,MAAM,KAAK,IAAI,OAAO,MAAM,OAAO;AAC3C,WACE;AAAA,MAAC;AAAA;AAAA,QACC,SAAS;AAAA,QACT,WAAU;AAAA,QACV,OAAO,UAAU,MAAM;AAAA,QAEvB;AAAA,8BAAC,SAAI,WAAU,mGACb,8BAAC,QAAK,WAAU,WAAU,GAC5B;AAAA,UACA,qBAAC,SAAI,WAAU,kBACb;AAAA,gCAAC,OAAE,WAAU,mDAAmD,YAAE,wCAA8B,GAAE;AAAA,YAClG,oBAAC,OAAE,WAAU,gEAAgE,gBAAM,QAAQ,SAAS,OAAM;AAAA,aAC5G;AAAA,UACA,oBAAC,UAAO,WAAU,oCAAmC;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names":[]}
1
+ {"version":3,"sources":["../../src/components/gated-content.tsx"],"sourcesContent":["\"use client\";\n\nimport { Loader2, Lock, ShoppingBag, Sparkles, Unlock } from \"lucide-react\";\nimport type { ApiCollectionProfile } from \"@medialane/sdk\";\nimport { GATED_CONTENT_TYPES, GATED_CONTENT_TYPE_FALLBACK } from \"../data/gated-content-types.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { panelTint } from \"./panel.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { IconTile } from \"./icon-tile.js\";\n\nexport interface GatedContent {\n title: string | null;\n url: string;\n type: string | null;\n}\n\nexport type GatedContentState =\n | { status: \"signed_out\" }\n | { status: \"loading\" }\n | { status: \"not_holder\" }\n | { status: \"unlocked\"; content: GatedContent }\n | { status: \"error\" };\n\nconst typeOf = (content: GatedContent) => (content.type ? GATED_CONTENT_TYPES[content.type] ?? GATED_CONTENT_TYPE_FALLBACK : GATED_CONTENT_TYPE_FALLBACK);\n\nexport function GatedContentHero({\n profile,\n state,\n onViewExclusive,\n}: {\n profile: ApiCollectionProfile | null;\n state: GatedContentState;\n onViewExclusive: () => void;\n}) {\n const t = useT();\n if (!profile?.hasGatedContent) return null;\n const title = profile.gatedContentTitle ?? \"Exclusive content for holders\";\n\n if (state.status === \"unlocked\") {\n const { icon: Icon } = typeOf(state.content);\n return (\n <button\n onClick={onViewExclusive}\n className=\"panel w-full flex items-center gap-4 hover:bg-background/40 px-5 py-4 transition-colors text-left\"\n style={panelTint(\"blue\")}\n >\n <IconTile>\n <Icon />\n </IconTile>\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-2xs font-bold text-brand-blue leading-none\">{t(\"✓ You're a holder — unlocked\")}</p>\n <p className=\"text-sm font-bold text-foreground leading-snug mt-1 truncate\">{state.content.title ?? title}</p>\n </div>\n <Unlock className=\"h-4 w-4 text-brand-blue shrink-0\" />\n </button>\n );\n }\n\n return (\n <button\n onClick={onViewExclusive}\n className=\"w-full flex items-center gap-4 rounded-2xl hover:bg-background/40 px-5 py-4 transition-colors text-left group\"\n style={panelTint(\"blue\")}\n >\n <IconTile>\n <Lock />\n </IconTile>\n <div className=\"flex-1 min-w-0\">\n <p\n className=\"text-2xs font-bold leading-none mb-1 text-brand-blue\"\n >\n {t(\"Holder exclusive\")}\n </p>\n <p className=\"text-sm font-bold text-foreground leading-snug truncate\">{title}</p>\n <p className=\"text-xs text-muted-foreground mt-0.5\">{t(\"Own a token from this collection to unlock\")}</p>\n </div>\n <Sparkles className=\"h-4 w-4 text-muted-foreground/50 group-hover:text-primary transition-colors shrink-0\" />\n </button>\n );\n}\n\nfunction LockedNotice({ title, body, children }: { title: string; body: string; children?: React.ReactNode }) {\n return (\n <div className=\"py-16 flex flex-col items-center gap-5 text-center max-w-sm mx-auto\">\n <IconTile size=\"lg\">\n <Lock />\n </IconTile>\n <div>\n <p className=\"text-base font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{body}</p>\n </div>\n {children}\n </div>\n );\n}\n\nconst PRIMARY = \"inline-flex items-center gap-2 bg-foreground text-background hover:opacity-90 font-semibold px-5 py-2.5 rounded-xl transition-all text-sm\";\n\nexport function GatedContentPanel({ state, onBrowseListings }: { state: GatedContentState; onBrowseListings: () => void }) {\n const t = useT();\n const { connectLabel = \"Sign in\", onRequireWallet } = useMedialaneApp();\n\n if (state.status === \"signed_out\") {\n return (\n <LockedNotice title={t(\"{label} to unlock\", { label: t(connectLabel) })} body={t(\"This collection has exclusive content for holders. Sign in so we can check your holdings.\")}>\n <button type=\"button\" onClick={onRequireWallet} className={PRIMARY}>{t(connectLabel)}</button>\n </LockedNotice>\n );\n }\n if (state.status === \"loading\") {\n return (\n <div className=\"py-16 flex flex-col items-center gap-3\">\n <Loader2 className=\"h-8 w-8 animate-spin text-muted-foreground/40\" />\n <p className=\"text-xs text-muted-foreground\">{t(\"Checking your holdings…\")}</p>\n </div>\n );\n }\n if (state.status === \"not_holder\") {\n return (\n <LockedNotice title={t(\"Holders only\")} body={t(\"Hold at least one token from this collection to open the exclusive content.\")}>\n <button type=\"button\" onClick={onBrowseListings} className={PRIMARY}>\n <ShoppingBag className=\"h-4 w-4\" />\n {t(\"Browse listings\")}\n </button>\n </LockedNotice>\n );\n }\n if (state.status === \"error\") {\n return <LockedNotice title={t(\"Couldn't check your holdings\")} body={t(\"Refresh the page to try again.\")} />;\n }\n\n const { icon: Icon, cta } = typeOf(state.content);\n return (\n <div className=\"py-8 flex flex-col items-center gap-6 text-center max-w-md mx-auto\">\n <div className=\"relative\">\n <IconTile size=\"lg\">\n <Unlock />\n </IconTile>\n <div className=\"absolute -bottom-1 -right-1 h-6 w-6 rounded-full bg-brand-blue flex items-center justify-center\">\n <Sparkles className=\"h-3 w-3 text-white\" />\n </div>\n </div>\n <div className=\"space-y-1.5\">\n <p className=\"text-2xs font-bold text-brand-blue\">{t(\"✓ Verified holder\")}</p>\n <h3 className=\"text-xl font-bold\">{state.content.title ?? t(\"Exclusive content\")}</h3>\n <p className=\"text-sm text-muted-foreground\">{t(\"Your access is verified. Enjoy your exclusive content.\")}</p>\n </div>\n <ActionButton solid asChild>\n <a href={state.content.url} target=\"_blank\" rel=\"noopener noreferrer\">\n <Icon className=\"h-5 w-5\" />\n {cta}\n </a>\n </ActionButton>\n </div>\n );\n}\n"],"mappings":";AAgDU,cAEF,YAFE;AA9CV,SAAS,SAAS,MAAM,aAAa,UAAU,cAAc;AAE7D,SAAS,qBAAqB,mCAAmC;AACjE,SAAS,uBAAuB;AAChC,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AAezB,MAAM,SAAS,CAAC,YAA2B,QAAQ,OAAO,oBAAoB,QAAQ,IAAI,KAAK,8BAA8B;AAEtH,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AACF,GAIG;AACD,QAAM,IAAI,KAAK;AACf,MAAI,CAAC,SAAS,gBAAiB,QA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I,WAAU,eACb;AAAA,0BAAC,OAAE,WAAU,sCAAsC,YAAE,wBAAmB,GAAE;AAAA,MAC1E,oBAAC,QAAG,WAAU,qBAAqB,gBAAM,QAAQ,SAAS,EAAE,mBAAmB,GAAE;AAAA,MACjF,oBAAC,OAAE,WAAU,iCAAiC,YAAE,wDAAwD,GAAE;AAAA,OAC5G;AAAA,IACA,oBAAC,gBAAa,OAAK,MAAC,SAAO,MACzB,+BAAC,OAAE,MAAM,MAAM,QAAQ,KAAK,QAAO,UAAS,KAAI,uBAC9C;AAAA,0BAAC,QAAK,WAAU,WAAU;AAAA,MACzB;AAAA,OACH,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var icon_tile_exports = {};
20
+ __export(icon_tile_exports, {
21
+ IconTile: () => IconTile
22
+ });
23
+ module.exports = __toCommonJS(icon_tile_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_cn = require("../utils/cn.js");
26
+ const SIZES = {
27
+ sm: "h-8 w-8 rounded-xl text-sm [&_svg]:h-4 [&_svg]:w-4",
28
+ md: "h-11 w-11 rounded-xl text-base [&_svg]:h-5 [&_svg]:w-5",
29
+ lg: "h-16 w-16 rounded-2xl text-xl [&_svg]:h-7 [&_svg]:w-7"
30
+ };
31
+ function IconTile({ size = "md", destructive, className, ...props }) {
32
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
33
+ "span",
34
+ {
35
+ className: (0, import_cn.cn)(
36
+ "inline-flex shrink-0 items-center justify-center font-bold text-white",
37
+ destructive ? "bg-destructive" : "bg-primary",
38
+ SIZES[size],
39
+ className
40
+ ),
41
+ ...props
42
+ }
43
+ );
44
+ }
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ IconTile
48
+ });
49
+ //# sourceMappingURL=icon-tile.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/icon-tile.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst SIZES = {\n sm: \"h-8 w-8 rounded-xl text-sm [&_svg]:h-4 [&_svg]:w-4\",\n md: \"h-11 w-11 rounded-xl text-base [&_svg]:h-5 [&_svg]:w-5\",\n lg: \"h-16 w-16 rounded-2xl text-xl [&_svg]:h-7 [&_svg]:w-7\",\n} as const;\n\nexport interface IconTileProps extends React.HTMLAttributes<HTMLSpanElement> {\n size?: keyof typeof SIZES;\n /** Red tile for errors and irreversible actions. */\n destructive?: boolean;\n}\n\n/** An icon in the logo's shape: white line icon on solid brand blue. */\nexport function IconTile({ size = \"md\", destructive, className, ...props }: IconTileProps) {\n return (\n <span\n className={cn(\n \"inline-flex shrink-0 items-center justify-center font-bold text-white\",\n destructive ? \"bg-destructive\" : \"bg-primary\",\n SIZES[size],\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBI;AAjBJ,gBAAmB;AAEnB,MAAM,QAAQ;AAAA,EACZ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AASO,SAAS,SAAS,EAAE,OAAO,MAAM,aAAa,WAAW,GAAG,MAAM,GAAkB;AACzF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA,cAAc,mBAAmB;AAAA,QACjC,MAAM,IAAI;AAAA,QACV;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -0,0 +1,17 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ declare const SIZES: {
5
+ readonly sm: "h-8 w-8 rounded-xl text-sm [&_svg]:h-4 [&_svg]:w-4";
6
+ readonly md: "h-11 w-11 rounded-xl text-base [&_svg]:h-5 [&_svg]:w-5";
7
+ readonly lg: "h-16 w-16 rounded-2xl text-xl [&_svg]:h-7 [&_svg]:w-7";
8
+ };
9
+ interface IconTileProps extends React.HTMLAttributes<HTMLSpanElement> {
10
+ size?: keyof typeof SIZES;
11
+ /** Red tile for errors and irreversible actions. */
12
+ destructive?: boolean;
13
+ }
14
+ /** An icon in the logo's shape: white line icon on solid brand blue. */
15
+ declare function IconTile({ size, destructive, className, ...props }: IconTileProps): react_jsx_runtime.JSX.Element;
16
+
17
+ export { IconTile, type IconTileProps };
@@ -0,0 +1,17 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+
4
+ declare const SIZES: {
5
+ readonly sm: "h-8 w-8 rounded-xl text-sm [&_svg]:h-4 [&_svg]:w-4";
6
+ readonly md: "h-11 w-11 rounded-xl text-base [&_svg]:h-5 [&_svg]:w-5";
7
+ readonly lg: "h-16 w-16 rounded-2xl text-xl [&_svg]:h-7 [&_svg]:w-7";
8
+ };
9
+ interface IconTileProps extends React.HTMLAttributes<HTMLSpanElement> {
10
+ size?: keyof typeof SIZES;
11
+ /** Red tile for errors and irreversible actions. */
12
+ destructive?: boolean;
13
+ }
14
+ /** An icon in the logo's shape: white line icon on solid brand blue. */
15
+ declare function IconTile({ size, destructive, className, ...props }: IconTileProps): react_jsx_runtime.JSX.Element;
16
+
17
+ export { IconTile, type IconTileProps };
@@ -0,0 +1,25 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { cn } from "../utils/cn.js";
3
+ const SIZES = {
4
+ sm: "h-8 w-8 rounded-xl text-sm [&_svg]:h-4 [&_svg]:w-4",
5
+ md: "h-11 w-11 rounded-xl text-base [&_svg]:h-5 [&_svg]:w-5",
6
+ lg: "h-16 w-16 rounded-2xl text-xl [&_svg]:h-7 [&_svg]:w-7"
7
+ };
8
+ function IconTile({ size = "md", destructive, className, ...props }) {
9
+ return /* @__PURE__ */ jsx(
10
+ "span",
11
+ {
12
+ className: cn(
13
+ "inline-flex shrink-0 items-center justify-center font-bold text-white",
14
+ destructive ? "bg-destructive" : "bg-primary",
15
+ SIZES[size],
16
+ className
17
+ ),
18
+ ...props
19
+ }
20
+ );
21
+ }
22
+ export {
23
+ IconTile
24
+ };
25
+ //# sourceMappingURL=icon-tile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/icon-tile.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nconst SIZES = {\n sm: \"h-8 w-8 rounded-xl text-sm [&_svg]:h-4 [&_svg]:w-4\",\n md: \"h-11 w-11 rounded-xl text-base [&_svg]:h-5 [&_svg]:w-5\",\n lg: \"h-16 w-16 rounded-2xl text-xl [&_svg]:h-7 [&_svg]:w-7\",\n} as const;\n\nexport interface IconTileProps extends React.HTMLAttributes<HTMLSpanElement> {\n size?: keyof typeof SIZES;\n /** Red tile for errors and irreversible actions. */\n destructive?: boolean;\n}\n\n/** An icon in the logo's shape: white line icon on solid brand blue. */\nexport function IconTile({ size = \"md\", destructive, className, ...props }: IconTileProps) {\n return (\n <span\n className={cn(\n \"inline-flex shrink-0 items-center justify-center font-bold text-white\",\n destructive ? \"bg-destructive\" : \"bg-primary\",\n SIZES[size],\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"AAkBI;AAjBJ,SAAS,UAAU;AAEnB,MAAM,QAAQ;AAAA,EACZ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AASO,SAAS,SAAS,EAAE,OAAO,MAAM,aAAa,WAAW,GAAG,MAAM,GAAkB;AACzF,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,cAAc,mBAAmB;AAAA,QACjC,MAAM,IAAI;AAAA,QACV;AAAA,MACF;AAAA,MACC,GAAG;AAAA;AAAA,EACN;AAEJ;","names":[]}
@@ -37,20 +37,20 @@ var import_link = __toESM(require("./link.js"), 1);
37
37
  var import_lucide_react = require("lucide-react");
38
38
  var import_section_heading = require("./section-heading.js");
39
39
  var import_ip_type_badge = require("./ip-type-badge.js");
40
- var import_cn = require("../utils/cn.js");
41
40
  var import_provider = require("../i18n/provider.js");
42
41
  var import_translate = require("../i18n/translate.js");
42
+ var import_icon_tile = require("./icon-tile.js");
43
43
  function IpTypeNav() {
44
44
  const t = (0, import_provider.useT)();
45
45
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "space-y-4", children: [
46
46
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_section_heading.SectionHeading, { icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.LayoutGrid, {}), title: t("Browse by type"), href: "/nft", linkLabel: (0, import_translate.msg)("View all") }),
47
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3", children: import_ip_type_badge.IP_TYPE_CONFIG.map(({ slug, label, icon: Icon, colorClass, bgClass }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3", children: import_ip_type_badge.IP_TYPE_CONFIG.map(({ slug, label, icon: Icon }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
48
48
  import_link.default,
49
49
  {
50
50
  href: `/${slug}`,
51
51
  className: "panel group flex flex-col items-center gap-2.5 p-4 hover:bg-card/80 transition-all hover:shadow-md hover:shadow-black/10",
52
52
  children: [
53
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("h-10 w-10 rounded-xl flex items-center justify-center", bgClass), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: (0, import_cn.cn)("h-5 w-5", colorClass) }) }),
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_tile.IconTile, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {}) }),
54
54
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs font-semibold text-center leading-tight", children: t(label) })
55
55
  ]
56
56
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/ip-type-nav.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { LayoutGrid } from \"lucide-react\";\nimport { SectionHeading } from \"./section-heading.js\";\nimport { IP_TYPE_CONFIG } from \"./ip-type-badge.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nimport { msg } from \"../i18n/translate.js\";\nexport function IpTypeNav() {\n const t = useT();\n return (\n <section className=\"space-y-4\">\n <SectionHeading icon={<LayoutGrid />} title={t(\"Browse by type\")} href=\"/nft\" linkLabel={msg(\"View all\")} />\n\n <div className=\"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3\">\n {IP_TYPE_CONFIG.map(({ slug, label, icon: Icon, colorClass, bgClass }) => (\n <Link\n key={slug}\n href={`/${slug}`}\n className=\"panel group flex flex-col items-center gap-2.5 p-4 hover:bg-card/80 transition-all hover:shadow-md hover:shadow-black/10\"\n >\n <div className={cn(\"h-10 w-10 rounded-xl flex items-center justify-center\", bgClass)}>\n <Icon className={cn(\"h-5 w-5\", colorClass)} />\n </div>\n <span className=\"text-xs font-semibold text-center leading-tight\">{t(label)}</span>\n </Link>\n ))}\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAc4B;AAZ5B,kBAAiB;AACjB,0BAA2B;AAC3B,6BAA+B;AAC/B,2BAA+B;AAC/B,gBAAmB;AACnB,sBAAqB;AAErB,uBAAoB;AACb,SAAS,YAAY;AAC1B,QAAM,QAAI,sBAAK;AACf,SACE,6CAAC,aAAQ,WAAU,aACjB;AAAA,gDAAC,yCAAe,MAAM,4CAAC,kCAAW,GAAI,OAAO,EAAE,gBAAgB,GAAG,MAAK,QAAO,eAAW,sBAAI,UAAU,GAAG;AAAA,IAE1G,4CAAC,SAAI,WAAU,wDACZ,8CAAe,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,MAAM,YAAY,QAAQ,MAClE;AAAA,MAAC,YAAAA;AAAA,MAAA;AAAA,QAEC,MAAM,IAAI,IAAI;AAAA,QACd,WAAU;AAAA,QAEV;AAAA,sDAAC,SAAI,eAAW,cAAG,yDAAyD,OAAO,GACjF,sDAAC,QAAK,eAAW,cAAG,WAAW,UAAU,GAAG,GAC9C;AAAA,UACA,4CAAC,UAAK,WAAU,mDAAmD,YAAE,KAAK,GAAE;AAAA;AAAA;AAAA,MAPvE;AAAA,IAQP,CACD,GACH;AAAA,KACF;AAEJ;","names":["Link"]}
1
+ {"version":3,"sources":["../../src/components/ip-type-nav.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { LayoutGrid } from \"lucide-react\";\nimport { SectionHeading } from \"./section-heading.js\";\nimport { IP_TYPE_CONFIG } from \"./ip-type-badge.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nimport { msg } from \"../i18n/translate.js\";\nimport { IconTile } from \"./icon-tile.js\";\nexport function IpTypeNav() {\n const t = useT();\n return (\n <section className=\"space-y-4\">\n <SectionHeading icon={<LayoutGrid />} title={t(\"Browse by type\")} href=\"/nft\" linkLabel={msg(\"View all\")} />\n\n <div className=\"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3\">\n {IP_TYPE_CONFIG.map(({ slug, label, icon: Icon }) => (\n <Link\n key={slug}\n href={`/${slug}`}\n className=\"panel group flex flex-col items-center gap-2.5 p-4 hover:bg-card/80 transition-all hover:shadow-md hover:shadow-black/10\"\n >\n <IconTile>\n <Icon />\n </IconTile>\n <span className=\"text-xs font-semibold text-center leading-tight\">{t(label)}</span>\n </Link>\n ))}\n </div>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAc4B;AAZ5B,kBAAiB;AACjB,0BAA2B;AAC3B,6BAA+B;AAC/B,2BAA+B;AAC/B,sBAAqB;AAErB,uBAAoB;AACpB,uBAAyB;AAClB,SAAS,YAAY;AAC1B,QAAM,QAAI,sBAAK;AACf,SACE,6CAAC,aAAQ,WAAU,aACjB;AAAA,gDAAC,yCAAe,MAAM,4CAAC,kCAAW,GAAI,OAAO,EAAE,gBAAgB,GAAG,MAAK,QAAO,eAAW,sBAAI,UAAU,GAAG;AAAA,IAE1G,4CAAC,SAAI,WAAU,wDACZ,8CAAe,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,KAAK,MAC7C;AAAA,MAAC,YAAAA;AAAA,MAAA;AAAA,QAEC,MAAM,IAAI,IAAI;AAAA,QACd,WAAU;AAAA,QAEV;AAAA,sDAAC,6BACC,sDAAC,QAAK,GACR;AAAA,UACA,4CAAC,UAAK,WAAU,mDAAmD,YAAE,KAAK,GAAE;AAAA;AAAA;AAAA,MAPvE;AAAA,IAQP,CACD,GACH;AAAA,KACF;AAEJ;","names":["Link"]}
@@ -4,20 +4,20 @@ import Link from "./link.js";
4
4
  import { LayoutGrid } from "lucide-react";
5
5
  import { SectionHeading } from "./section-heading.js";
6
6
  import { IP_TYPE_CONFIG } from "./ip-type-badge.js";
7
- import { cn } from "../utils/cn.js";
8
7
  import { useT } from "../i18n/provider.js";
9
8
  import { msg } from "../i18n/translate.js";
9
+ import { IconTile } from "./icon-tile.js";
10
10
  function IpTypeNav() {
11
11
  const t = useT();
12
12
  return /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
13
13
  /* @__PURE__ */ jsx(SectionHeading, { icon: /* @__PURE__ */ jsx(LayoutGrid, {}), title: t("Browse by type"), href: "/nft", linkLabel: msg("View all") }),
14
- /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3", children: IP_TYPE_CONFIG.map(({ slug, label, icon: Icon, colorClass, bgClass }) => /* @__PURE__ */ jsxs(
14
+ /* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3", children: IP_TYPE_CONFIG.map(({ slug, label, icon: Icon }) => /* @__PURE__ */ jsxs(
15
15
  Link,
16
16
  {
17
17
  href: `/${slug}`,
18
18
  className: "panel group flex flex-col items-center gap-2.5 p-4 hover:bg-card/80 transition-all hover:shadow-md hover:shadow-black/10",
19
19
  children: [
20
- /* @__PURE__ */ jsx("div", { className: cn("h-10 w-10 rounded-xl flex items-center justify-center", bgClass), children: /* @__PURE__ */ jsx(Icon, { className: cn("h-5 w-5", colorClass) }) }),
20
+ /* @__PURE__ */ jsx(IconTile, { children: /* @__PURE__ */ jsx(Icon, {}) }),
21
21
  /* @__PURE__ */ jsx("span", { className: "text-xs font-semibold text-center leading-tight", children: t(label) })
22
22
  ]
23
23
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/ip-type-nav.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { LayoutGrid } from \"lucide-react\";\nimport { SectionHeading } from \"./section-heading.js\";\nimport { IP_TYPE_CONFIG } from \"./ip-type-badge.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nimport { msg } from \"../i18n/translate.js\";\nexport function IpTypeNav() {\n const t = useT();\n return (\n <section className=\"space-y-4\">\n <SectionHeading icon={<LayoutGrid />} title={t(\"Browse by type\")} href=\"/nft\" linkLabel={msg(\"View all\")} />\n\n <div className=\"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3\">\n {IP_TYPE_CONFIG.map(({ slug, label, icon: Icon, colorClass, bgClass }) => (\n <Link\n key={slug}\n href={`/${slug}`}\n className=\"panel group flex flex-col items-center gap-2.5 p-4 hover:bg-card/80 transition-all hover:shadow-md hover:shadow-black/10\"\n >\n <div className={cn(\"h-10 w-10 rounded-xl flex items-center justify-center\", bgClass)}>\n <Icon className={cn(\"h-5 w-5\", colorClass)} />\n </div>\n <span className=\"text-xs font-semibold text-center leading-tight\">{t(label)}</span>\n </Link>\n ))}\n </div>\n </section>\n );\n}\n"],"mappings":";AAc4B,cAIlB,YAJkB;AAZ5B,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,UAAU;AACnB,SAAS,YAAY;AAErB,SAAS,WAAW;AACb,SAAS,YAAY;AAC1B,QAAM,IAAI,KAAK;AACf,SACE,qBAAC,aAAQ,WAAU,aACjB;AAAA,wBAAC,kBAAe,MAAM,oBAAC,cAAW,GAAI,OAAO,EAAE,gBAAgB,GAAG,MAAK,QAAO,WAAW,IAAI,UAAU,GAAG;AAAA,IAE1G,oBAAC,SAAI,WAAU,wDACZ,yBAAe,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,MAAM,YAAY,QAAQ,MAClE;AAAA,MAAC;AAAA;AAAA,QAEC,MAAM,IAAI,IAAI;AAAA,QACd,WAAU;AAAA,QAEV;AAAA,8BAAC,SAAI,WAAW,GAAG,yDAAyD,OAAO,GACjF,8BAAC,QAAK,WAAW,GAAG,WAAW,UAAU,GAAG,GAC9C;AAAA,UACA,oBAAC,UAAK,WAAU,mDAAmD,YAAE,KAAK,GAAE;AAAA;AAAA;AAAA,MAPvE;AAAA,IAQP,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/ip-type-nav.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { LayoutGrid } from \"lucide-react\";\nimport { SectionHeading } from \"./section-heading.js\";\nimport { IP_TYPE_CONFIG } from \"./ip-type-badge.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nimport { msg } from \"../i18n/translate.js\";\nimport { IconTile } from \"./icon-tile.js\";\nexport function IpTypeNav() {\n const t = useT();\n return (\n <section className=\"space-y-4\">\n <SectionHeading icon={<LayoutGrid />} title={t(\"Browse by type\")} href=\"/nft\" linkLabel={msg(\"View all\")} />\n\n <div className=\"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-6 gap-3\">\n {IP_TYPE_CONFIG.map(({ slug, label, icon: Icon }) => (\n <Link\n key={slug}\n href={`/${slug}`}\n className=\"panel group flex flex-col items-center gap-2.5 p-4 hover:bg-card/80 transition-all hover:shadow-md hover:shadow-black/10\"\n >\n <IconTile>\n <Icon />\n </IconTile>\n <span className=\"text-xs font-semibold text-center leading-tight\">{t(label)}</span>\n </Link>\n ))}\n </div>\n </section>\n );\n}\n"],"mappings":";AAc4B,cAIlB,YAJkB;AAZ5B,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AAErB,SAAS,WAAW;AACpB,SAAS,gBAAgB;AAClB,SAAS,YAAY;AAC1B,QAAM,IAAI,KAAK;AACf,SACE,qBAAC,aAAQ,WAAU,aACjB;AAAA,wBAAC,kBAAe,MAAM,oBAAC,cAAW,GAAI,OAAO,EAAE,gBAAgB,GAAG,MAAK,QAAO,WAAW,IAAI,UAAU,GAAG;AAAA,IAE1G,oBAAC,SAAI,WAAU,wDACZ,yBAAe,IAAI,CAAC,EAAE,MAAM,OAAO,MAAM,KAAK,MAC7C;AAAA,MAAC;AAAA;AAAA,QAEC,MAAM,IAAI,IAAI;AAAA,QACd,WAAU;AAAA,QAEV;AAAA,8BAAC,YACC,8BAAC,QAAK,GACR;AAAA,UACA,oBAAC,UAAK,WAAU,mDAAmD,YAAE,KAAK,GAAE;AAAA;AAAA;AAAA,MAPvE;AAAA,IAQP,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
@@ -51,6 +51,7 @@ var import_use_tokens_by_ip_type = require("../utils/use-tokens-by-ip-type.js");
51
51
  var import_empty_messages = require("../utils/empty-messages.js");
52
52
  var import_provider = require("../i18n/provider.js");
53
53
  var import_use_format = require("../i18n/use-format.js");
54
+ var import_icon_tile = require("./icon-tile.js");
54
55
  const PAGE_SIZE = 24;
55
56
  function FilterChip({ active, onClick, label }) {
56
57
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -150,7 +151,7 @@ function IpTypePage({ slug, useMarketActions }) {
150
151
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_page_container.PageContainer, { className: "box-border max-w-full pt-20 pb-16 space-y-8", children: [
151
152
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4", children: [
152
153
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-4", children: [
153
- config && Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("h-14 w-14 rounded-2xl flex items-center justify-center shadow-lg", config.bgClass), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: (0, import_cn.cn)("h-7 w-7", config.colorClass) }) }),
154
+ config && Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_tile.IconTile, { size: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {}) }),
154
155
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
155
156
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-3xl font-semibold", children: config?.label ? t(config.label) : slug }),
156
157
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-muted-foreground mt-0.5", children: meta?.total != null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: t("{total} assets \xB7 {listedCount} market", { total: intl.number(meta.total), listedCount }) }) : t("Browsing indexed digital assets on Medialane") })
@@ -273,7 +274,7 @@ function IpTypePage({ slug, useMarketActions }) {
273
274
  ] }) })
274
275
  ] }),
275
276
  isInitialLoading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4", children: Array.from({ length: PAGE_SIZE }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_token_card.TokenCardSkeleton, {}, i)) }) : displayed.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "py-24 flex flex-col items-center gap-4 text-center", children: [
276
- config && Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("h-16 w-16 rounded-2xl flex items-center justify-center", config.bgClass), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: (0, import_cn.cn)("h-8 w-8", config.colorClass) }) }),
277
+ config && Icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon_tile.IconTile, { size: "lg", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, {}) }),
277
278
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
278
279
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-semibold text-lg", children: listedOnly ? t("Listed assets appear here") : t(import_empty_messages.emptyMessages.assetsOfType.title) }),
279
280
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-muted-foreground text-sm mt-1", children: listedOnly ? t("Try removing the 'Listed only' filter to see all assets.") : t(import_empty_messages.emptyMessages.assetsOfType.description) })
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/ip-type-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useEffect, useRef } from \"react\";\nimport { SlidersHorizontal, Search, X as XIcon } from \"lucide-react\";\nimport type { ApiToken } from \"@medialane/sdk\";\nimport Link from \"./link.js\";\nimport { Badge } from \"./badge.js\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport { LoadMoreSentinel } from \"./load-more-sentinel.js\";\nimport { IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./ip-type-badge.js\";\nimport { TokenCard, TokenCardSkeleton } from \"./token-card.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport type { CollectionMarketActions } from \"./collection-page.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { isSameAddress } from \"../utils/same-address.js\";\nimport { useTokensByIpType } from \"../utils/use-tokens-by-ip-type.js\";\nimport { emptyMessages } from \"../utils/empty-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { useFormat } from \"../i18n/use-format.js\";\n\nconst PAGE_SIZE = 24;\n\nfunction FilterChip({ active, onClick, label }: { active: boolean; onClick: () => void; label: string }) {\n return (\n <button\n onClick={onClick}\n className={cn(\n \"text-xs px-3 py-1.5 rounded-full transition-colors whitespace-nowrap\",\n active\n ? \"bg-primary/15 text-primary font-medium\"\n : \"text-muted-foreground bg-background/40\"\n )}\n >\n {label}\n </button>\n );\n}\n\nexport interface IpTypePageProps {\n slug: string;\n useMarketActions: () => CollectionMarketActions;\n}\n\nexport function IpTypePage({ slug, useMarketActions }: IpTypePageProps) {\n const intl = useFormat();\n const t = useT();\n const { walletAddress } = useMedialaneApp();\n const market = useMarketActions();\n const config = IP_TYPE_MAP[slug];\n const Icon = config?.icon;\n const [page, setPage] = useState(1);\n const [listedOnly, setListedOnly] = useState(false);\n const [allTokens, setAllTokens] = useState<ApiToken[]>([]);\n const prevSlug = useRef(slug);\n\n const [filtersOpen, setFiltersOpen] = useState(false);\n const [sortOrder, setSortOrder] = useState<\"recent\" | \"price_asc\" | \"price_desc\">(\"recent\");\n const [licenseFilter, setLicenseFilter] = useState<string>(\"all\");\n const [creatorSearchInput, setCreatorSearchInput] = useState(\"\");\n const [creatorSearch, setCreatorSearch] = useState(\"\");\n\n useEffect(() => {\n if (prevSlug.current !== slug) {\n prevSlug.current = slug;\n setPage(1);\n setAllTokens([]);\n }\n }, [slug]);\n\n useEffect(() => {\n const t = setTimeout(() => setCreatorSearch(creatorSearchInput), 300);\n return () => clearTimeout(t);\n }, [creatorSearchInput]);\n\n const { tokens, meta, isLoading } = useTokensByIpType(slug, page, PAGE_SIZE);\n\n useEffect(() => {\n if (isLoading) return;\n if (page === 1) {\n setAllTokens(tokens);\n } else {\n setAllTokens((prev) => {\n const seen = new Set(prev.map((t) => `${t.contractAddress}:${t.tokenId}`));\n const fresh = tokens.filter((t) => !seen.has(`${t.contractAddress}:${t.tokenId}`));\n return fresh.length > 0 ? [...prev, ...fresh] : prev;\n });\n }\n }, [tokens, isLoading, page]);\n\n const activeFilterCount =\n (sortOrder !== \"recent\" ? 1 : 0) +\n (licenseFilter !== \"all\" ? 1 : 0) +\n (creatorSearch !== \"\" ? 1 : 0);\n const activeChipCount = activeFilterCount + (listedOnly ? 1 : 0);\n const hasActiveFilters = activeChipCount > 0;\n const resetAll = () => {\n setSortOrder(\"recent\");\n setLicenseFilter(\"all\");\n setCreatorSearch(\"\");\n setCreatorSearchInput(\"\");\n setListedOnly(false);\n };\n\n let displayed = listedOnly\n ? allTokens.filter((t) => (t.activeOrders?.length ?? 0) > 0)\n : [...allTokens];\n\n if (licenseFilter !== \"all\") {\n displayed = displayed.filter((t) =>\n t.metadata?.attributes?.some(\n (a) => a.trait_type === \"License\" && a.value === licenseFilter\n )\n );\n }\n if (creatorSearch) {\n const q = creatorSearch.toLowerCase();\n displayed = displayed.filter((t) => {\n const creatorVal =\n t.metadata?.attributes?.find((a) => a.trait_type === \"Creator\")?.value ?? \"\";\n return (\n String(creatorVal).toLowerCase().includes(q) ||\n t.contractAddress.toLowerCase().includes(q)\n );\n });\n }\n if (sortOrder === \"price_asc\") {\n displayed = [...displayed].sort((a, b) => {\n const pa = parseFloat(a.activeOrders?.[0]?.price?.formatted ?? \"Infinity\");\n const pb = parseFloat(b.activeOrders?.[0]?.price?.formatted ?? \"Infinity\");\n return pa - pb;\n });\n } else if (sortOrder === \"price_desc\") {\n displayed = [...displayed].sort((a, b) => {\n const pa = parseFloat(a.activeOrders?.[0]?.price?.formatted ?? \"0\");\n const pb = parseFloat(b.activeOrders?.[0]?.price?.formatted ?? \"0\");\n return pb - pa;\n });\n }\n\n const isInitialLoading = isLoading && allTokens.length === 0;\n const isLoadingMore = isLoading && allTokens.length > 0;\n const hasMore = meta?.total != null ? allTokens.length < meta.total : false;\n const listedCount = allTokens.filter((t) => (t.activeOrders?.length ?? 0) > 0).length;\n\n return (\n <PageContainer className=\"box-border max-w-full pt-20 pb-16 space-y-8\">\n\n <div className=\"space-y-4\">\n <div className=\"flex items-center gap-4\">\n {config && Icon && (\n <div className={cn(\"h-14 w-14 rounded-2xl flex items-center justify-center shadow-lg\", config.bgClass)}>\n <Icon className={cn(\"h-7 w-7\", config.colorClass)} />\n </div>\n )}\n <div>\n <h1 className=\"text-3xl font-semibold\">{config?.label ? t(config.label) : slug}</h1>\n <p className=\"text-muted-foreground mt-0.5\">\n {meta?.total != null ? (\n <>{t(\"{total} assets · {listedCount} market\", { total: intl.number(meta.total), listedCount })}</>\n ) : (\n t(\"Browsing indexed digital assets on Medialane\")\n )}\n </p>\n </div>\n </div>\n\n <div className=\"flex items-center gap-2 flex-wrap\">\n <button\n onClick={() => setFiltersOpen(true)}\n aria-label={t(\"Filters\")}\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs px-3.5 py-2 rounded-full font-medium transition-colors\",\n hasActiveFilters\n ? \"bg-primary/15 text-primary\"\n : \"text-muted-foreground bg-background/40\"\n )}\n >\n <SlidersHorizontal className=\"h-3.5 w-3.5\" />\n {activeChipCount > 0 && (\n <span className=\"ml-0.5 bg-primary text-primary-foreground rounded-full px-1.5 text-2xs font-bold leading-4\">\n {activeChipCount}\n </span>\n )}\n </button>\n\n {listedOnly && (\n <Badge variant=\"secondary\" className=\"cursor-pointer gap-1 text-xs\" onClick={() => setListedOnly(false)}>\n {t(\"Listed only\")}\n <XIcon className=\"h-3 w-3\" />\n </Badge>\n )}\n {sortOrder !== \"recent\" && (\n <Badge variant=\"secondary\" className=\"cursor-pointer gap-1 text-xs\" onClick={() => setSortOrder(\"recent\")}>\n {sortOrder === \"price_asc\" ? t(\"Price ↑\") : t(\"Price ↓\")}\n <XIcon className=\"h-3 w-3\" />\n </Badge>\n )}\n {licenseFilter !== \"all\" && (\n <Badge variant=\"secondary\" className=\"cursor-pointer gap-1 text-xs\" onClick={() => setLicenseFilter(\"all\")}>\n {licenseFilter}\n <XIcon className=\"h-3 w-3\" />\n </Badge>\n )}\n {creatorSearch && (\n <Badge variant=\"secondary\" className=\"cursor-pointer gap-1 text-xs\" onClick={() => { setCreatorSearch(\"\"); setCreatorSearchInput(\"\"); }}>\n {creatorSearch.length > 10 ? `${creatorSearch.slice(0, 10)}…` : creatorSearch}\n <XIcon className=\"h-3 w-3\" />\n </Badge>\n )}\n </div>\n\n <Dialog open={filtersOpen} onOpenChange={setFiltersOpen}>\n <DialogContent className=\"w-full max-w-sm sm:max-w-md p-0 overflow-hidden gap-0 flex flex-col max-h-[85svh]\">\n <div className=\"flex items-center justify-between px-5 py-4 border-b border-border/60 pr-12\">\n <DialogTitle className=\"text-base font-bold flex items-center gap-2\">\n <SlidersHorizontal className=\"h-4 w-4 text-primary\" />\n {t(\"Filters\")}\n </DialogTitle>\n {hasActiveFilters && (\n <Button variant=\"ghost\" size=\"sm\" className=\"h-7 text-xs text-muted-foreground\" onClick={resetAll}>\n {t(\"Clear all\")}\n </Button>\n )}\n </div>\n\n <div className=\"flex-1 overflow-y-auto px-5 py-4 space-y-5\">\n\n <div className=\"space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"Status\")}</p>\n <div className=\"flex flex-wrap gap-1.5\">\n <FilterChip active={!listedOnly} onClick={() => setListedOnly(false)} label={t(\"All\")} />\n <FilterChip\n active={listedOnly}\n onClick={() => setListedOnly(true)}\n label={`${t(\"Listed only\")}${listedCount > 0 ? ` (${listedCount})` : \"\"}`}\n />\n </div>\n </div>\n\n <div className=\"space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"Sort\")}</p>\n <div className=\"flex flex-wrap gap-1.5\">\n <FilterChip active={sortOrder === \"recent\"} onClick={() => setSortOrder(\"recent\")} label={t(\"Recent\")} />\n <FilterChip active={sortOrder === \"price_asc\"} onClick={() => setSortOrder(\"price_asc\")} label={t(\"Price ↑\")} />\n <FilterChip active={sortOrder === \"price_desc\"} onClick={() => setSortOrder(\"price_desc\")} label={t(\"Price ↓\")} />\n </div>\n </div>\n\n <div className=\"space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"License\")}</p>\n <div className=\"flex flex-wrap gap-1.5\">\n {[\"all\", \"CC0\", \"CC BY\", \"CC BY-SA\", \"CC BY-NC\", \"CC BY-ND\", \"Custom\"].map((lic) => (\n <FilterChip\n key={lic}\n active={licenseFilter === lic}\n onClick={() => setLicenseFilter(lic)}\n label={lic === \"all\" ? t(\"All licenses\") : lic}\n />\n ))}\n </div>\n </div>\n\n <div className=\"space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"Creator\")}</p>\n <div className=\"relative\">\n <Search className=\"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground\" />\n <Input\n className=\"h-9 text-sm pl-8\"\n placeholder={t(\"Name or wallet address…\")}\n value={creatorSearchInput}\n onChange={(e) => setCreatorSearchInput(e.target.value)}\n />\n </div>\n </div>\n\n <div className=\"space-y-2 pt-1 border-t border-border/60\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"IP type\")}</p>\n <div className=\"flex flex-wrap gap-1.5\">\n {IP_TYPE_CONFIG.map((tab) => (\n <Link\n key={tab.slug}\n href={`/${tab.slug}`}\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full transition-colors whitespace-nowrap\",\n tab.slug === slug\n ? \"bg-primary/15 text-primary font-medium\"\n : \"text-muted-foreground bg-background/40\"\n )}\n >\n <tab.icon className={cn(\"h-3 w-3\", tab.slug === slug ? tab.colorClass : \"\")} />\n {t(tab.label)}\n </Link>\n ))}\n </div>\n </div>\n </div>\n\n <div className=\"px-5 py-3 border-t border-border/60\">\n <Button className=\"w-full\" onClick={() => setFiltersOpen(false)}>\n {t(\"Apply filters\")}\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n </div>\n\n {isInitialLoading ? (\n <div className=\"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4\">\n {Array.from({ length: PAGE_SIZE }).map((_, i) => (\n <TokenCardSkeleton key={i} />\n ))}\n </div>\n ) : displayed.length === 0 ? (\n <div className=\"py-24 flex flex-col items-center gap-4 text-center\">\n {config && Icon && (\n <div className={cn(\"h-16 w-16 rounded-2xl flex items-center justify-center\", config.bgClass)}>\n <Icon className={cn(\"h-8 w-8\", config.colorClass)} />\n </div>\n )}\n <div>\n <p className=\"font-semibold text-lg\">\n {listedOnly ? t(\"Listed assets appear here\") : t(emptyMessages.assetsOfType.title)}\n </p>\n <p className=\"text-muted-foreground text-sm mt-1\">\n {listedOnly\n ? t(\"Try removing the 'Listed only' filter to see all assets.\")\n : t(emptyMessages.assetsOfType.description)}\n </p>\n </div>\n <Button asChild variant=\"soft\">\n <Link href=\"/launchpad/single-editions\">{t(\"Create asset\")}</Link>\n </Button>\n </div>\n ) : (\n <div className=\"space-y-6\">\n <div className=\"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4\">\n {displayed.map((token) => {\n const listing = token.activeOrders?.find((o) => o.offer.itemType === \"ERC721\" || o.offer.itemType === \"ERC1155\");\n const isOwner = !!walletAddress && !!token.owner && isSameAddress(token.owner, walletAddress);\n return (\n <TokenCard\n key={`${token.contractAddress}:${token.tokenId}`}\n token={token}\n isOwner={isOwner}\n onBuy={!isOwner && listing ? () => market.buy(listing) : undefined}\n onOffer={isOwner ? undefined : market.offer}\n />\n );\n })}\n </div>\n\n {!listedOnly && (\n <LoadMoreSentinel\n hasMore={hasMore}\n isLoading={isLoadingMore}\n onLoadMore={() => setPage((p) => p + 1)}\n />\n )}\n </div>\n )}\n\n {market.dialogs}\n </PageContainer>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BI;AAzBJ,mBAA4C;AAC5C,0BAAsD;AAEtD,kBAAiB;AACjB,mBAAsB;AACtB,oBAAuB;AACvB,oBAAmD;AACnD,mBAAsB;AACtB,4BAA8B;AAC9B,gCAAiC;AACjC,2BAA4C;AAC5C,wBAA6C;AAC7C,2BAAgC;AAEhC,gBAAmB;AACnB,0BAA8B;AAC9B,mCAAkC;AAClC,4BAA8B;AAC9B,sBAAqB;AACrB,wBAA0B;AAE1B,MAAM,YAAY;AAElB,SAAS,WAAW,EAAE,QAAQ,SAAS,MAAM,GAA4D;AACvG,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA,SACI,2CACA;AAAA,MACN;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAOO,SAAS,WAAW,EAAE,MAAM,iBAAiB,GAAoB;AACtE,QAAM,WAAO,6BAAU;AACvB,QAAM,QAAI,sBAAK;AACf,QAAM,EAAE,cAAc,QAAI,sCAAgB;AAC1C,QAAM,SAAS,iBAAiB;AAChC,QAAM,SAAS,iCAAY,IAAI;AAC/B,QAAM,OAAO,QAAQ;AACrB,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,CAAC;AAClC,QA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"],"sourcesContent":["\"use client\";\n\nimport { useState, useEffect, useRef } from \"react\";\nimport { SlidersHorizontal, Search, X as XIcon } from \"lucide-react\";\nimport type { ApiToken } from \"@medialane/sdk\";\nimport Link from \"./link.js\";\nimport { Badge } from \"./badge.js\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { PageContainer } from \"./page-container.js\";\nimport { LoadMoreSentinel } from \"./load-more-sentinel.js\";\nimport { IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./ip-type-badge.js\";\nimport { TokenCard, TokenCardSkeleton } from \"./token-card.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport type { CollectionMarketActions } from \"./collection-page.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { isSameAddress } from \"../utils/same-address.js\";\nimport { useTokensByIpType } from \"../utils/use-tokens-by-ip-type.js\";\nimport { emptyMessages } from \"../utils/empty-messages.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { useFormat } from \"../i18n/use-format.js\";\nimport { IconTile } from \"./icon-tile.js\";\n\nconst PAGE_SIZE = 24;\n\nfunction FilterChip({ active, onClick, label }: { active: boolean; onClick: () => void; label: string }) {\n return (\n <button\n onClick={onClick}\n className={cn(\n \"text-xs px-3 py-1.5 rounded-full transition-colors whitespace-nowrap\",\n active\n ? \"bg-primary/15 text-primary font-medium\"\n : \"text-muted-foreground bg-background/40\"\n )}\n >\n {label}\n </button>\n );\n}\n\nexport interface IpTypePageProps {\n slug: string;\n useMarketActions: () => CollectionMarketActions;\n}\n\nexport function IpTypePage({ slug, useMarketActions }: IpTypePageProps) {\n const intl = useFormat();\n const t = useT();\n const { walletAddress } = useMedialaneApp();\n const market = useMarketActions();\n const config = IP_TYPE_MAP[slug];\n const Icon = config?.icon;\n const [page, setPage] = useState(1);\n const [listedOnly, setListedOnly] = useState(false);\n const [allTokens, setAllTokens] = useState<ApiToken[]>([]);\n const prevSlug = useRef(slug);\n\n const [filtersOpen, setFiltersOpen] = useState(false);\n const [sortOrder, setSortOrder] = useState<\"recent\" | \"price_asc\" | \"price_desc\">(\"recent\");\n const [licenseFilter, setLicenseFilter] = useState<string>(\"all\");\n const [creatorSearchInput, setCreatorSearchInput] = useState(\"\");\n const [creatorSearch, setCreatorSearch] = useState(\"\");\n\n useEffect(() => {\n if (prevSlug.current !== slug) {\n prevSlug.current = slug;\n setPage(1);\n setAllTokens([]);\n }\n }, [slug]);\n\n useEffect(() => {\n const t = setTimeout(() => setCreatorSearch(creatorSearchInput), 300);\n return () => clearTimeout(t);\n }, [creatorSearchInput]);\n\n const { tokens, meta, isLoading } = useTokensByIpType(slug, page, PAGE_SIZE);\n\n useEffect(() => {\n if (isLoading) return;\n if (page === 1) {\n setAllTokens(tokens);\n } else {\n setAllTokens((prev) => {\n const seen = new Set(prev.map((t) => `${t.contractAddress}:${t.tokenId}`));\n const fresh = tokens.filter((t) => !seen.has(`${t.contractAddress}:${t.tokenId}`));\n return fresh.length > 0 ? [...prev, ...fresh] : prev;\n });\n }\n }, [tokens, isLoading, page]);\n\n const activeFilterCount =\n (sortOrder !== \"recent\" ? 1 : 0) +\n (licenseFilter !== \"all\" ? 1 : 0) +\n (creatorSearch !== \"\" ? 1 : 0);\n const activeChipCount = activeFilterCount + (listedOnly ? 1 : 0);\n const hasActiveFilters = activeChipCount > 0;\n const resetAll = () => {\n setSortOrder(\"recent\");\n setLicenseFilter(\"all\");\n setCreatorSearch(\"\");\n setCreatorSearchInput(\"\");\n setListedOnly(false);\n };\n\n let displayed = listedOnly\n ? allTokens.filter((t) => (t.activeOrders?.length ?? 0) > 0)\n : [...allTokens];\n\n if (licenseFilter !== \"all\") {\n displayed = displayed.filter((t) =>\n t.metadata?.attributes?.some(\n (a) => a.trait_type === \"License\" && a.value === licenseFilter\n )\n );\n }\n if (creatorSearch) {\n const q = creatorSearch.toLowerCase();\n displayed = displayed.filter((t) => {\n const creatorVal =\n t.metadata?.attributes?.find((a) => a.trait_type === \"Creator\")?.value ?? \"\";\n return (\n String(creatorVal).toLowerCase().includes(q) ||\n t.contractAddress.toLowerCase().includes(q)\n );\n });\n }\n if (sortOrder === \"price_asc\") {\n displayed = [...displayed].sort((a, b) => {\n const pa = parseFloat(a.activeOrders?.[0]?.price?.formatted ?? \"Infinity\");\n const pb = parseFloat(b.activeOrders?.[0]?.price?.formatted ?? \"Infinity\");\n return pa - pb;\n });\n } else if (sortOrder === \"price_desc\") {\n displayed = [...displayed].sort((a, b) => {\n const pa = parseFloat(a.activeOrders?.[0]?.price?.formatted ?? \"0\");\n const pb = parseFloat(b.activeOrders?.[0]?.price?.formatted ?? \"0\");\n return pb - pa;\n });\n }\n\n const isInitialLoading = isLoading && allTokens.length === 0;\n const isLoadingMore = isLoading && allTokens.length > 0;\n const hasMore = meta?.total != null ? allTokens.length < meta.total : false;\n const listedCount = allTokens.filter((t) => (t.activeOrders?.length ?? 0) > 0).length;\n\n return (\n <PageContainer className=\"box-border max-w-full pt-20 pb-16 space-y-8\">\n\n <div className=\"space-y-4\">\n <div className=\"flex items-center gap-4\">\n {config && Icon && (\n <IconTile size=\"lg\">\n <Icon />\n </IconTile>\n )}\n <div>\n <h1 className=\"text-3xl font-semibold\">{config?.label ? t(config.label) : slug}</h1>\n <p className=\"text-muted-foreground mt-0.5\">\n {meta?.total != null ? (\n <>{t(\"{total} assets · {listedCount} market\", { total: intl.number(meta.total), listedCount })}</>\n ) : (\n t(\"Browsing indexed digital assets on Medialane\")\n )}\n </p>\n </div>\n </div>\n\n <div className=\"flex items-center gap-2 flex-wrap\">\n <button\n onClick={() => setFiltersOpen(true)}\n aria-label={t(\"Filters\")}\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs px-3.5 py-2 rounded-full font-medium transition-colors\",\n hasActiveFilters\n ? \"bg-primary/15 text-primary\"\n : \"text-muted-foreground bg-background/40\"\n )}\n >\n <SlidersHorizontal className=\"h-3.5 w-3.5\" />\n {activeChipCount > 0 && (\n <span className=\"ml-0.5 bg-primary text-primary-foreground rounded-full px-1.5 text-2xs font-bold leading-4\">\n {activeChipCount}\n </span>\n )}\n </button>\n\n {listedOnly && (\n <Badge variant=\"secondary\" className=\"cursor-pointer gap-1 text-xs\" onClick={() => setListedOnly(false)}>\n {t(\"Listed only\")}\n <XIcon className=\"h-3 w-3\" />\n </Badge>\n )}\n {sortOrder !== \"recent\" && (\n <Badge variant=\"secondary\" className=\"cursor-pointer gap-1 text-xs\" onClick={() => setSortOrder(\"recent\")}>\n {sortOrder === \"price_asc\" ? t(\"Price ↑\") : t(\"Price ↓\")}\n <XIcon className=\"h-3 w-3\" />\n </Badge>\n )}\n {licenseFilter !== \"all\" && (\n <Badge variant=\"secondary\" className=\"cursor-pointer gap-1 text-xs\" onClick={() => setLicenseFilter(\"all\")}>\n {licenseFilter}\n <XIcon className=\"h-3 w-3\" />\n </Badge>\n )}\n {creatorSearch && (\n <Badge variant=\"secondary\" className=\"cursor-pointer gap-1 text-xs\" onClick={() => { setCreatorSearch(\"\"); setCreatorSearchInput(\"\"); }}>\n {creatorSearch.length > 10 ? `${creatorSearch.slice(0, 10)}…` : creatorSearch}\n <XIcon className=\"h-3 w-3\" />\n </Badge>\n )}\n </div>\n\n <Dialog open={filtersOpen} onOpenChange={setFiltersOpen}>\n <DialogContent className=\"w-full max-w-sm sm:max-w-md p-0 overflow-hidden gap-0 flex flex-col max-h-[85svh]\">\n <div className=\"flex items-center justify-between px-5 py-4 border-b border-border/60 pr-12\">\n <DialogTitle className=\"text-base font-bold flex items-center gap-2\">\n <SlidersHorizontal className=\"h-4 w-4 text-primary\" />\n {t(\"Filters\")}\n </DialogTitle>\n {hasActiveFilters && (\n <Button variant=\"ghost\" size=\"sm\" className=\"h-7 text-xs text-muted-foreground\" onClick={resetAll}>\n {t(\"Clear all\")}\n </Button>\n )}\n </div>\n\n <div className=\"flex-1 overflow-y-auto px-5 py-4 space-y-5\">\n\n <div className=\"space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"Status\")}</p>\n <div className=\"flex flex-wrap gap-1.5\">\n <FilterChip active={!listedOnly} onClick={() => setListedOnly(false)} label={t(\"All\")} />\n <FilterChip\n active={listedOnly}\n onClick={() => setListedOnly(true)}\n label={`${t(\"Listed only\")}${listedCount > 0 ? ` (${listedCount})` : \"\"}`}\n />\n </div>\n </div>\n\n <div className=\"space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"Sort\")}</p>\n <div className=\"flex flex-wrap gap-1.5\">\n <FilterChip active={sortOrder === \"recent\"} onClick={() => setSortOrder(\"recent\")} label={t(\"Recent\")} />\n <FilterChip active={sortOrder === \"price_asc\"} onClick={() => setSortOrder(\"price_asc\")} label={t(\"Price ↑\")} />\n <FilterChip active={sortOrder === \"price_desc\"} onClick={() => setSortOrder(\"price_desc\")} label={t(\"Price ↓\")} />\n </div>\n </div>\n\n <div className=\"space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"License\")}</p>\n <div className=\"flex flex-wrap gap-1.5\">\n {[\"all\", \"CC0\", \"CC BY\", \"CC BY-SA\", \"CC BY-NC\", \"CC BY-ND\", \"Custom\"].map((lic) => (\n <FilterChip\n key={lic}\n active={licenseFilter === lic}\n onClick={() => setLicenseFilter(lic)}\n label={lic === \"all\" ? t(\"All licenses\") : lic}\n />\n ))}\n </div>\n </div>\n\n <div className=\"space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"Creator\")}</p>\n <div className=\"relative\">\n <Search className=\"absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-muted-foreground\" />\n <Input\n className=\"h-9 text-sm pl-8\"\n placeholder={t(\"Name or wallet address…\")}\n value={creatorSearchInput}\n onChange={(e) => setCreatorSearchInput(e.target.value)}\n />\n </div>\n </div>\n\n <div className=\"space-y-2 pt-1 border-t border-border/60\">\n <p className=\"text-2xs font-semibold text-muted-foreground\">{t(\"IP type\")}</p>\n <div className=\"flex flex-wrap gap-1.5\">\n {IP_TYPE_CONFIG.map((tab) => (\n <Link\n key={tab.slug}\n href={`/${tab.slug}`}\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs px-3 py-1.5 rounded-full transition-colors whitespace-nowrap\",\n tab.slug === slug\n ? \"bg-primary/15 text-primary font-medium\"\n : \"text-muted-foreground bg-background/40\"\n )}\n >\n <tab.icon className={cn(\"h-3 w-3\", tab.slug === slug ? tab.colorClass : \"\")} />\n {t(tab.label)}\n </Link>\n ))}\n </div>\n </div>\n </div>\n\n <div className=\"px-5 py-3 border-t border-border/60\">\n <Button className=\"w-full\" onClick={() => setFiltersOpen(false)}>\n {t(\"Apply filters\")}\n </Button>\n </div>\n </DialogContent>\n </Dialog>\n </div>\n\n {isInitialLoading ? (\n <div className=\"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4\">\n {Array.from({ length: PAGE_SIZE }).map((_, i) => (\n <TokenCardSkeleton key={i} />\n ))}\n </div>\n ) : displayed.length === 0 ? (\n <div className=\"py-24 flex flex-col items-center gap-4 text-center\">\n {config && Icon && (\n <IconTile size=\"lg\">\n <Icon />\n </IconTile>\n )}\n <div>\n <p className=\"font-semibold text-lg\">\n {listedOnly ? t(\"Listed assets appear here\") : t(emptyMessages.assetsOfType.title)}\n </p>\n <p className=\"text-muted-foreground text-sm mt-1\">\n {listedOnly\n ? t(\"Try removing the 'Listed only' filter to see all assets.\")\n : t(emptyMessages.assetsOfType.description)}\n </p>\n </div>\n <Button asChild variant=\"soft\">\n <Link href=\"/launchpad/single-editions\">{t(\"Create asset\")}</Link>\n </Button>\n </div>\n ) : (\n <div className=\"space-y-6\">\n <div className=\"grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4\">\n {displayed.map((token) => {\n const listing = token.activeOrders?.find((o) => o.offer.itemType === \"ERC721\" || o.offer.itemType === \"ERC1155\");\n const isOwner = !!walletAddress && !!token.owner && isSameAddress(token.owner, walletAddress);\n return (\n <TokenCard\n key={`${token.contractAddress}:${token.tokenId}`}\n token={token}\n isOwner={isOwner}\n onBuy={!isOwner && listing ? () => market.buy(listing) : undefined}\n onOffer={isOwner ? undefined : market.offer}\n />\n );\n })}\n </div>\n\n {!listedOnly && (\n <LoadMoreSentinel\n hasMore={hasMore}\n isLoading={isLoadingMore}\n onLoadMore={() => setPage((p) => p + 1)}\n />\n )}\n </div>\n )}\n\n {market.dialogs}\n </PageContainer>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BI;AA1BJ,mBAA4C;AAC5C,0BAAsD;AAEtD,kBAAiB;AACjB,mBAAsB;AACtB,oBAAuB;AACvB,oBAAmD;AACnD,mBAAsB;AACtB,4BAA8B;AAC9B,gCAAiC;AACjC,2BAA4C;AAC5C,wBAA6C;AAC7C,2BAAgC;AAEhC,gBAAmB;AACnB,0BAA8B;AAC9B,mCAAkC;AAClC,4BAA8B;AAC9B,sBAAqB;AACrB,wBAA0B;AAC1B,uBAAyB;AAEzB,MAAM,YAAY;AAElB,SAAS,WAAW,EAAE,QAAQ,SAAS,MAAM,GAA4D;AACvG,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA,SACI,2CACA;AAAA,MACN;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAOO,SAAS,WAAW,EAAE,MAAM,iBAAiB,GAAoB;AACtE,QAAM,WAAO,6BAAU;AACvB,QAAM,QAAI,sBAAK;AACf,QAAM,EAAE,cAAc,QAAI,sCAAgB;AAC1C,QAAM,SAAS,iBAAiB;AAChC,QAAM,SAAS,iCAAY,IAAI;AAC/B,QAAM,OAAO,QAAQ;AACrB,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,CAAC;AAClC,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAS,KAAK;AAClD,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAqB,CAAC,CAA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,GACnF;AAAA,QACA,4CAAC,OAAE,WAAU,sCACV,uBACG,EAAE,0DAA0D,IAC5D,EAAE,oCAAc,aAAa,WAAW,GAC9C;AAAA,SACF;AAAA,MACA,4CAAC,wBAAO,SAAO,MAAC,SAAQ,QACtB,sDAAC,YAAAA,SAAA,EAAK,MAAK,8BAA8B,YAAE,cAAc,GAAE,GAC7D;AAAA,OACF,IAEA,6CAAC,SAAI,WAAU,aACb;AAAA,kDAAC,SAAI,WAAU,uEACZ,oBAAU,IAAI,CAAC,UAAU;AACxB,cAAM,UAAU,MAAM,cAAc,KAAK,CAAC,MAAM,EAAE,MAAM,aAAa,YAAY,EAAE,MAAM,aAAa,SAAS;AAC/G,cAAM,UAAU,CAAC,CAAC,iBAAiB,CAAC,CAAC,MAAM,aAAS,mCAAc,MAAM,OAAO,aAAa;AAC5F,eACE;AAAA,UAAC;AAAA;AAAA,YAEC;AAAA,YACA;AAAA,YACA,OAAO,CAAC,WAAW,UAAU,MAAM,OAAO,IAAI,OAAO,IAAI;AAAA,YACzD,SAAS,UAAU,SAAY,OAAO;AAAA;AAAA,UAJjC,GAAG,MAAM,eAAe,IAAI,MAAM,OAAO;AAAA,QAKhD;AAAA,MAEJ,CAAC,GACH;AAAA,MAEC,CAAC,cACA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAW;AAAA,UACX,YAAY,MAAM,QAAQ,CAAC,MAAM,IAAI,CAAC;AAAA;AAAA,MACxC;AAAA,OAEJ;AAAA,IAGD,OAAO;AAAA,KACV;AAEJ;","names":["t","XIcon","Link"]}
@@ -18,6 +18,7 @@ import { useTokensByIpType } from "../utils/use-tokens-by-ip-type.js";
18
18
  import { emptyMessages } from "../utils/empty-messages.js";
19
19
  import { useT } from "../i18n/provider.js";
20
20
  import { useFormat } from "../i18n/use-format.js";
21
+ import { IconTile } from "./icon-tile.js";
21
22
  const PAGE_SIZE = 24;
22
23
  function FilterChip({ active, onClick, label }) {
23
24
  return /* @__PURE__ */ jsx(
@@ -117,7 +118,7 @@ function IpTypePage({ slug, useMarketActions }) {
117
118
  return /* @__PURE__ */ jsxs(PageContainer, { className: "box-border max-w-full pt-20 pb-16 space-y-8", children: [
118
119
  /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
119
120
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-4", children: [
120
- config && Icon && /* @__PURE__ */ jsx("div", { className: cn("h-14 w-14 rounded-2xl flex items-center justify-center shadow-lg", config.bgClass), children: /* @__PURE__ */ jsx(Icon, { className: cn("h-7 w-7", config.colorClass) }) }),
121
+ config && Icon && /* @__PURE__ */ jsx(IconTile, { size: "lg", children: /* @__PURE__ */ jsx(Icon, {}) }),
121
122
  /* @__PURE__ */ jsxs("div", { children: [
122
123
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold", children: config?.label ? t(config.label) : slug }),
123
124
  /* @__PURE__ */ jsx("p", { className: "text-muted-foreground mt-0.5", children: meta?.total != null ? /* @__PURE__ */ jsx(Fragment, { children: t("{total} assets \xB7 {listedCount} market", { total: intl.number(meta.total), listedCount }) }) : t("Browsing indexed digital assets on Medialane") })
@@ -240,7 +241,7 @@ function IpTypePage({ slug, useMarketActions }) {
240
241
  ] }) })
241
242
  ] }),
242
243
  isInitialLoading ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4", children: Array.from({ length: PAGE_SIZE }).map((_, i) => /* @__PURE__ */ jsx(TokenCardSkeleton, {}, i)) }) : displayed.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "py-24 flex flex-col items-center gap-4 text-center", children: [
243
- config && Icon && /* @__PURE__ */ jsx("div", { className: cn("h-16 w-16 rounded-2xl flex items-center justify-center", config.bgClass), children: /* @__PURE__ */ jsx(Icon, { className: cn("h-8 w-8", config.colorClass) }) }),
244
+ config && Icon && /* @__PURE__ */ jsx(IconTile, { size: "lg", children: /* @__PURE__ */ jsx(Icon, {}) }),
244
245
  /* @__PURE__ */ jsxs("div", { children: [
245
246
  /* @__PURE__ */ jsx("p", { className: "font-semibold text-lg", children: listedOnly ? t("Listed assets appear here") : t(emptyMessages.assetsOfType.title) }),
246
247
  /* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mt-1", children: listedOnly ? t("Try removing the 'Listed only' filter to see all assets.") : t(emptyMessages.assetsOfType.description) })