@medialane/ui 0.38.0 → 0.40.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/activity-row.cjs +1 -1
- package/dist/components/activity-row.cjs.map +1 -1
- package/dist/components/activity-row.js +1 -1
- package/dist/components/activity-row.js.map +1 -1
- package/dist/components/discover-feed-section.cjs +38 -18
- package/dist/components/discover-feed-section.cjs.map +1 -1
- package/dist/components/discover-feed-section.d.cts +18 -3
- package/dist/components/discover-feed-section.d.ts +18 -3
- package/dist/components/discover-feed-section.js +37 -18
- package/dist/components/discover-feed-section.js.map +1 -1
- package/dist/components/rewards/leaderboard-table.cjs +3 -26
- package/dist/components/rewards/leaderboard-table.cjs.map +1 -1
- package/dist/components/rewards/leaderboard-table.d.cts +7 -3
- package/dist/components/rewards/leaderboard-table.d.ts +7 -3
- package/dist/components/rewards/leaderboard-table.js +3 -26
- package/dist/components/rewards/leaderboard-table.js.map +1 -1
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -84,7 +84,7 @@ function ActivityRow({
|
|
|
84
84
|
] })
|
|
85
85
|
] }),
|
|
86
86
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-[10px] text-muted-foreground tabular-nums hidden sm:block w-12 text-right", title: new Date(activity.timestamp).toLocaleString(), children: (0, import_time.timeAgo)(activity.timestamp) }),
|
|
87
|
-
showExplorer && txLink && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: txLink, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center justify-center h-6 w-6 rounded-md hover:bg-muted transition-colors opacity-0 group-hover:opacity-100 shrink-0", "aria-label": "View on explorer", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, { className: "h-3 w-3 text-muted-foreground" }) })
|
|
87
|
+
showExplorer && txLink && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: txLink, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center justify-center h-6 w-6 rounded-md hover:bg-muted transition-colors opacity-50 sm:opacity-0 sm:group-hover:opacity-100 shrink-0", "aria-label": "View on explorer", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, { className: "h-3 w-3 text-muted-foreground" }) })
|
|
88
88
|
] })
|
|
89
89
|
] });
|
|
90
90
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/activity-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { ExternalLink } from \"lucide-react\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { ACTIVITY_TYPE_CONFIG } from \"../data/activity.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiActivity } from \"@medialane/sdk\";\n\nexport interface ActivityRowProps {\n activity: ApiActivity;\n /** Optional token enrichment — if absent shows #tokenId fallback. No internal useToken call. */\n token?: { name?: string; image?: string };\n showActor?: boolean;\n showExplorer?: boolean;\n compact?: boolean;\n explorerUrl?: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n}\n\nexport function ActivityRow({\n activity,\n token,\n showActor = true,\n showExplorer = true,\n compact = false,\n explorerUrl = \"https://voyager.online\",\n getAssetHref = (c, t) => `/asset/${c}/${t}`,\n getActorHref = (a) => `/creator/${a}`,\n}: ActivityRowProps) {\n const config = ACTIVITY_TYPE_CONFIG[activity.type] ?? {\n label: activity.type,\n variant: \"outline\" as const,\n icon: ExternalLink,\n colorClass: \"text-muted-foreground\",\n bgClass: \"bg-muted\",\n };\n const Icon = config.icon;\n\n const contract = activity.nftContract ?? activity.contractAddress ?? null;\n const tokenId = activity.nftTokenId ?? activity.tokenId ?? null;\n const actor =\n activity.offerer ??\n activity.fulfiller ??\n ((activity.type as string) === \"mint\" ? activity.to : activity.from) ??\n null;\n const txLink = activity.txHash ? `${explorerUrl}/tx/${activity.txHash}` : null;\n\n const tokenName = token?.name ?? (tokenId ? `#${tokenId}` : \"—\");\n const tokenImage = token?.image ? ipfsToHttp(token.image) : null;\n\n return (\n <div className={cn(\"flex items-center gap-3 hover:bg-muted/30 transition-colors group\", compact ? \"pl-4 pr-5 py-2.5\" : \"pl-4 pr-5 py-3.5\")}>\n {/* Type icon */}\n <div className={cn(\"rounded-lg flex items-center justify-center shrink-0\", config.bgClass, compact ? \"h-7 w-7\" : \"h-8 w-8\")}>\n <Icon className={cn(\"shrink-0\", config.colorClass, compact ? \"h-3.5 w-3.5\" : \"h-4 w-4\")} />\n </div>\n\n {/* Token thumbnail */}\n <div className={cn(\"rounded-md overflow-hidden shrink-0 bg-muted\", compact ? \"h-7 w-7\" : \"h-9 w-9\")}>\n {tokenImage ? (\n <Image src={tokenImage} alt={tokenName} width={compact ? 28 : 36} height={compact ? 28 : 36} className=\"object-cover w-full h-full\" unoptimized />\n ) : (\n <div className=\"w-full h-full bg-gradient-to-br from-muted-foreground/10 to-muted-foreground/5\" />\n )}\n </div>\n\n {/* Asset name + actor */}\n <div className=\"flex-1 min-w-0\">\n {contract && tokenId ? (\n <Link href={getAssetHref(contract, tokenId)} className=\"text-sm font-semibold hover:text-primary transition-colors truncate block leading-tight\">\n {tokenName}\n </Link>\n ) : (\n <span className=\"text-sm font-semibold text-muted-foreground\">—</span>\n )}\n {showActor && actor && (\n <Link href={getActorHref(actor)} className=\"text-xs text-muted-foreground hover:text-primary transition-colors font-mono leading-tight\">\n <AddressDisplay address={actor} chars={4} showCopy={false} />\n </Link>\n )}\n </div>\n\n {/* Right: badge + price + time + explorer */}\n <div className=\"flex items-center gap-2.5 shrink-0\">\n {!compact && (\n <span className={cn(\"text-[10px] font-medium px-1.5 py-0.5 rounded hidden sm:inline-flex\", config.bgClass, config.colorClass)}>\n {config.label}\n </span>\n )}\n\n {activity.price?.formatted && (\n <div className=\"text-right\">\n <p className=\"text-sm font-bold tabular-nums leading-tight\">{formatDisplayPrice(activity.price.formatted)}</p>\n <p className=\"text-[10px] text-muted-foreground leading-tight flex items-center justify-end gap-0.5\">\n {activity.price.currency && <CurrencyIcon symbol={activity.price.currency} size={10} />}\n {activity.price.currency}\n </p>\n </div>\n )}\n\n <span className=\"text-[10px] text-muted-foreground tabular-nums hidden sm:block w-12 text-right\" title={new Date(activity.timestamp).toLocaleString()}>\n {timeAgo(activity.timestamp)}\n </span>\n\n {showExplorer && txLink && (\n <a href={txLink} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex items-center justify-center h-6 w-6 rounded-md hover:bg-muted transition-colors opacity-0 group-hover:opacity-100 shrink-0\" aria-label=\"View on explorer\">\n <ExternalLink className=\"h-3 w-3 text-muted-foreground\" />\n </a>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6DQ;AA3DR,mBAAkB;AAClB,kBAAiB;AACjB,0BAA6B;AAC7B,6BAA+B;AAC/B,2BAA6B;AAC7B,sBAAqC;AACrC,kBAA2B;AAC3B,kBAAwB;AACxB,oBAAmC;AACnC,gBAAmB;AAeZ,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe,CAAC,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC;AAAA,EACzC,eAAe,CAAC,MAAM,YAAY,CAAC;AACrC,GAAqB;AACnB,QAAM,SAAS,qCAAqB,SAAS,IAAI,KAAK;AAAA,IACpD,OAAO,SAAS;AAAA,IAChB,S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C7D;AAAA,OAEJ;AAAA,IAGA,6CAAC,SAAI,WAAU,sCACZ;AAAA,OAAC,WACA,4CAAC,UAAK,eAAW,cAAG,uEAAuE,OAAO,SAAS,OAAO,UAAU,GACzH,iBAAO,OACV;AAAA,MAGD,SAAS,OAAO,aACf,6CAAC,SAAI,WAAU,cACb;AAAA,oDAAC,OAAE,WAAU,gDAAgD,gDAAmB,SAAS,MAAM,SAAS,GAAE;AAAA,QAC1G,6CAAC,OAAE,WAAU,yFACV;AAAA,mBAAS,MAAM,YAAY,4CAAC,qCAAa,QAAQ,SAAS,MAAM,UAAU,MAAM,IAAI;AAAA,UACpF,SAAS,MAAM;AAAA,WAClB;AAAA,SACF;AAAA,MAGF,4CAAC,UAAK,WAAU,kFAAiF,OAAO,IAAI,KAAK,SAAS,SAAS,EAAE,eAAe,GACjJ,mCAAQ,SAAS,SAAS,GAC7B;AAAA,MAEC,gBAAgB,UACf,4CAAC,OAAE,MAAM,QAAQ,QAAO,UAAS,KAAI,uBAAsB,WAAU,
|
|
1
|
+
{"version":3,"sources":["../../src/components/activity-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { ExternalLink } from \"lucide-react\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { ACTIVITY_TYPE_CONFIG } from \"../data/activity.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiActivity } from \"@medialane/sdk\";\n\nexport interface ActivityRowProps {\n activity: ApiActivity;\n /** Optional token enrichment — if absent shows #tokenId fallback. No internal useToken call. */\n token?: { name?: string; image?: string };\n showActor?: boolean;\n showExplorer?: boolean;\n compact?: boolean;\n explorerUrl?: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n}\n\nexport function ActivityRow({\n activity,\n token,\n showActor = true,\n showExplorer = true,\n compact = false,\n explorerUrl = \"https://voyager.online\",\n getAssetHref = (c, t) => `/asset/${c}/${t}`,\n getActorHref = (a) => `/creator/${a}`,\n}: ActivityRowProps) {\n const config = ACTIVITY_TYPE_CONFIG[activity.type] ?? {\n label: activity.type,\n variant: \"outline\" as const,\n icon: ExternalLink,\n colorClass: \"text-muted-foreground\",\n bgClass: \"bg-muted\",\n };\n const Icon = config.icon;\n\n const contract = activity.nftContract ?? activity.contractAddress ?? null;\n const tokenId = activity.nftTokenId ?? activity.tokenId ?? null;\n const actor =\n activity.offerer ??\n activity.fulfiller ??\n ((activity.type as string) === \"mint\" ? activity.to : activity.from) ??\n null;\n const txLink = activity.txHash ? `${explorerUrl}/tx/${activity.txHash}` : null;\n\n const tokenName = token?.name ?? (tokenId ? `#${tokenId}` : \"—\");\n const tokenImage = token?.image ? ipfsToHttp(token.image) : null;\n\n return (\n <div className={cn(\"flex items-center gap-3 hover:bg-muted/30 transition-colors group\", compact ? \"pl-4 pr-5 py-2.5\" : \"pl-4 pr-5 py-3.5\")}>\n {/* Type icon */}\n <div className={cn(\"rounded-lg flex items-center justify-center shrink-0\", config.bgClass, compact ? \"h-7 w-7\" : \"h-8 w-8\")}>\n <Icon className={cn(\"shrink-0\", config.colorClass, compact ? \"h-3.5 w-3.5\" : \"h-4 w-4\")} />\n </div>\n\n {/* Token thumbnail */}\n <div className={cn(\"rounded-md overflow-hidden shrink-0 bg-muted\", compact ? \"h-7 w-7\" : \"h-9 w-9\")}>\n {tokenImage ? (\n <Image src={tokenImage} alt={tokenName} width={compact ? 28 : 36} height={compact ? 28 : 36} className=\"object-cover w-full h-full\" unoptimized />\n ) : (\n <div className=\"w-full h-full bg-gradient-to-br from-muted-foreground/10 to-muted-foreground/5\" />\n )}\n </div>\n\n {/* Asset name + actor */}\n <div className=\"flex-1 min-w-0\">\n {contract && tokenId ? (\n <Link href={getAssetHref(contract, tokenId)} className=\"text-sm font-semibold hover:text-primary transition-colors truncate block leading-tight\">\n {tokenName}\n </Link>\n ) : (\n <span className=\"text-sm font-semibold text-muted-foreground\">—</span>\n )}\n {showActor && actor && (\n <Link href={getActorHref(actor)} className=\"text-xs text-muted-foreground hover:text-primary transition-colors font-mono leading-tight\">\n <AddressDisplay address={actor} chars={4} showCopy={false} />\n </Link>\n )}\n </div>\n\n {/* Right: badge + price + time + explorer */}\n <div className=\"flex items-center gap-2.5 shrink-0\">\n {!compact && (\n <span className={cn(\"text-[10px] font-medium px-1.5 py-0.5 rounded hidden sm:inline-flex\", config.bgClass, config.colorClass)}>\n {config.label}\n </span>\n )}\n\n {activity.price?.formatted && (\n <div className=\"text-right\">\n <p className=\"text-sm font-bold tabular-nums leading-tight\">{formatDisplayPrice(activity.price.formatted)}</p>\n <p className=\"text-[10px] text-muted-foreground leading-tight flex items-center justify-end gap-0.5\">\n {activity.price.currency && <CurrencyIcon symbol={activity.price.currency} size={10} />}\n {activity.price.currency}\n </p>\n </div>\n )}\n\n <span className=\"text-[10px] text-muted-foreground tabular-nums hidden sm:block w-12 text-right\" title={new Date(activity.timestamp).toLocaleString()}>\n {timeAgo(activity.timestamp)}\n </span>\n\n {showExplorer && txLink && (\n <a href={txLink} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex items-center justify-center h-6 w-6 rounded-md hover:bg-muted transition-colors opacity-50 sm:opacity-0 sm:group-hover:opacity-100 shrink-0\" aria-label=\"View on explorer\">\n <ExternalLink className=\"h-3 w-3 text-muted-foreground\" />\n </a>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6DQ;AA3DR,mBAAkB;AAClB,kBAAiB;AACjB,0BAA6B;AAC7B,6BAA+B;AAC/B,2BAA6B;AAC7B,sBAAqC;AACrC,kBAA2B;AAC3B,kBAAwB;AACxB,oBAAmC;AACnC,gBAAmB;AAeZ,SAAS,YAAY;AAAA,E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ACZ;AAAA,kBAAY,UACX,4CAAC,YAAAC,SAAA,EAAK,MAAM,aAAa,UAAU,OAAO,GAAG,WAAU,2FACpD,qBACH,IAEA,4CAAC,UAAK,WAAU,+CAA8C,oBAAC;AAAA,MAEhE,aAAa,SACZ,4CAAC,YAAAA,SAAA,EAAK,MAAM,aAAa,KAAK,GAAG,WAAU,8FACzC,sDAAC,yCAAe,SAAS,OAAO,OAAO,GAAG,UAAU,OAAO,GAC7D;AAAA,OAEJ;AAAA,IAGA,6CAAC,SAAI,WAAU,sCACZ;AAAA,OAAC,WACA,4CAAC,UAAK,eAAW,cAAG,uEAAuE,OAAO,SAAS,OAAO,UAAU,GACzH,iBAAO,OACV;AAAA,MAGD,SAAS,OAAO,aACf,6CAAC,SAAI,WAAU,cACb;AAAA,oDAAC,OAAE,WAAU,gDAAgD,gDAAmB,SAAS,MAAM,SAAS,GAAE;AAAA,QAC1G,6CAAC,OAAE,WAAU,yFACV;AAAA,mBAAS,MAAM,YAAY,4CAAC,qCAAa,QAAQ,SAAS,MAAM,UAAU,MAAM,IAAI;AAAA,UACpF,SAAS,MAAM;AAAA,WAClB;AAAA,SACF;AAAA,MAGF,4CAAC,UAAK,WAAU,kFAAiF,OAAO,IAAI,KAAK,SAAS,SAAS,EAAE,eAAe,GACjJ,mCAAQ,SAAS,SAAS,GAC7B;AAAA,MAEC,gBAAgB,UACf,4CAAC,OAAE,MAAM,QAAQ,QAAO,UAAS,KAAI,uBAAsB,WAAU,2JAA0J,cAAW,oBACxO,sDAAC,oCAAa,WAAU,iCAAgC,GAC1D;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":["Image","Link"]}
|
|
@@ -51,7 +51,7 @@ function ActivityRow({
|
|
|
51
51
|
] })
|
|
52
52
|
] }),
|
|
53
53
|
/* @__PURE__ */ jsx("span", { className: "text-[10px] text-muted-foreground tabular-nums hidden sm:block w-12 text-right", title: new Date(activity.timestamp).toLocaleString(), children: timeAgo(activity.timestamp) }),
|
|
54
|
-
showExplorer && txLink && /* @__PURE__ */ jsx("a", { href: txLink, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center justify-center h-6 w-6 rounded-md hover:bg-muted transition-colors opacity-0 group-hover:opacity-100 shrink-0", "aria-label": "View on explorer", children: /* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 text-muted-foreground" }) })
|
|
54
|
+
showExplorer && txLink && /* @__PURE__ */ jsx("a", { href: txLink, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center justify-center h-6 w-6 rounded-md hover:bg-muted transition-colors opacity-50 sm:opacity-0 sm:group-hover:opacity-100 shrink-0", "aria-label": "View on explorer", children: /* @__PURE__ */ jsx(ExternalLink, { className: "h-3 w-3 text-muted-foreground" }) })
|
|
55
55
|
] })
|
|
56
56
|
] });
|
|
57
57
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/activity-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { ExternalLink } from \"lucide-react\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { ACTIVITY_TYPE_CONFIG } from \"../data/activity.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiActivity } from \"@medialane/sdk\";\n\nexport interface ActivityRowProps {\n activity: ApiActivity;\n /** Optional token enrichment — if absent shows #tokenId fallback. No internal useToken call. */\n token?: { name?: string; image?: string };\n showActor?: boolean;\n showExplorer?: boolean;\n compact?: boolean;\n explorerUrl?: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n}\n\nexport function ActivityRow({\n activity,\n token,\n showActor = true,\n showExplorer = true,\n compact = false,\n explorerUrl = \"https://voyager.online\",\n getAssetHref = (c, t) => `/asset/${c}/${t}`,\n getActorHref = (a) => `/creator/${a}`,\n}: ActivityRowProps) {\n const config = ACTIVITY_TYPE_CONFIG[activity.type] ?? {\n label: activity.type,\n variant: \"outline\" as const,\n icon: ExternalLink,\n colorClass: \"text-muted-foreground\",\n bgClass: \"bg-muted\",\n };\n const Icon = config.icon;\n\n const contract = activity.nftContract ?? activity.contractAddress ?? null;\n const tokenId = activity.nftTokenId ?? activity.tokenId ?? null;\n const actor =\n activity.offerer ??\n activity.fulfiller ??\n ((activity.type as string) === \"mint\" ? activity.to : activity.from) ??\n null;\n const txLink = activity.txHash ? `${explorerUrl}/tx/${activity.txHash}` : null;\n\n const tokenName = token?.name ?? (tokenId ? `#${tokenId}` : \"—\");\n const tokenImage = token?.image ? ipfsToHttp(token.image) : null;\n\n return (\n <div className={cn(\"flex items-center gap-3 hover:bg-muted/30 transition-colors group\", compact ? \"pl-4 pr-5 py-2.5\" : \"pl-4 pr-5 py-3.5\")}>\n {/* Type icon */}\n <div className={cn(\"rounded-lg flex items-center justify-center shrink-0\", config.bgClass, compact ? \"h-7 w-7\" : \"h-8 w-8\")}>\n <Icon className={cn(\"shrink-0\", config.colorClass, compact ? \"h-3.5 w-3.5\" : \"h-4 w-4\")} />\n </div>\n\n {/* Token thumbnail */}\n <div className={cn(\"rounded-md overflow-hidden shrink-0 bg-muted\", compact ? \"h-7 w-7\" : \"h-9 w-9\")}>\n {tokenImage ? (\n <Image src={tokenImage} alt={tokenName} width={compact ? 28 : 36} height={compact ? 28 : 36} className=\"object-cover w-full h-full\" unoptimized />\n ) : (\n <div className=\"w-full h-full bg-gradient-to-br from-muted-foreground/10 to-muted-foreground/5\" />\n )}\n </div>\n\n {/* Asset name + actor */}\n <div className=\"flex-1 min-w-0\">\n {contract && tokenId ? (\n <Link href={getAssetHref(contract, tokenId)} className=\"text-sm font-semibold hover:text-primary transition-colors truncate block leading-tight\">\n {tokenName}\n </Link>\n ) : (\n <span className=\"text-sm font-semibold text-muted-foreground\">—</span>\n )}\n {showActor && actor && (\n <Link href={getActorHref(actor)} className=\"text-xs text-muted-foreground hover:text-primary transition-colors font-mono leading-tight\">\n <AddressDisplay address={actor} chars={4} showCopy={false} />\n </Link>\n )}\n </div>\n\n {/* Right: badge + price + time + explorer */}\n <div className=\"flex items-center gap-2.5 shrink-0\">\n {!compact && (\n <span className={cn(\"text-[10px] font-medium px-1.5 py-0.5 rounded hidden sm:inline-flex\", config.bgClass, config.colorClass)}>\n {config.label}\n </span>\n )}\n\n {activity.price?.formatted && (\n <div className=\"text-right\">\n <p className=\"text-sm font-bold tabular-nums leading-tight\">{formatDisplayPrice(activity.price.formatted)}</p>\n <p className=\"text-[10px] text-muted-foreground leading-tight flex items-center justify-end gap-0.5\">\n {activity.price.currency && <CurrencyIcon symbol={activity.price.currency} size={10} />}\n {activity.price.currency}\n </p>\n </div>\n )}\n\n <span className=\"text-[10px] text-muted-foreground tabular-nums hidden sm:block w-12 text-right\" title={new Date(activity.timestamp).toLocaleString()}>\n {timeAgo(activity.timestamp)}\n </span>\n\n {showExplorer && txLink && (\n <a href={txLink} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex items-center justify-center h-6 w-6 rounded-md hover:bg-muted transition-colors opacity-0 group-hover:opacity-100 shrink-0\" aria-label=\"View on explorer\">\n <ExternalLink className=\"h-3 w-3 text-muted-foreground\" />\n </a>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";AA6DQ,cAaF,YAbE;AA3DR,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,4BAA4B;AACrC,SAAS,kBAAkB;AAC3B,SAAS,eAAe;AACxB,SAAS,0BAA0B;AACnC,SAAS,UAAU;AAeZ,SAAS,YAAY;AAAA,EAC1B;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe,CAAC,GAAG,MAAM,UAAU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aAAa,SACZ,oBAAC,QAAK,MAAM,aAAa,KAAK,GAAG,WAAU,8FACzC,8BAAC,kBAAe,SAAS,OAAO,OAAO,GAAG,UAAU,OAAO,GAC7D;AAAA,OAEJ;AAAA,IAGA,qBAAC,SAAI,WAAU,sCACZ;AAAA,OAAC,WACA,oBAAC,UAAK,WAAW,GAAG,uEAAuE,OAAO,SAAS,OAAO,UAAU,GACzH,iBAAO,OACV;AAAA,MAGD,SAAS,OAAO,aACf,qBAAC,SAAI,WAAU,cACb;AAAA,4BAAC,OAAE,WAAU,gDAAgD,6BAAmB,SAAS,MAAM,SAAS,GAAE;AAAA,QAC1G,qBAAC,OAAE,WAAU,yFACV;AAAA,mBAAS,MAAM,YAAY,oBAAC,gBAAa,QAAQ,SAAS,MAAM,UAAU,MAAM,IAAI;AAAA,UACpF,SAAS,MAAM;AAAA,WAClB;AAAA,SACF;AAAA,MAGF,oBAAC,UAAK,WAAU,kFAAiF,OAAO,IAAI,KAAK,SAAS,SAAS,EAAE,eAAe,GACjJ,kBAAQ,SAAS,SAAS,GAC7B;AAAA,MAEC,gBAAgB,UACf,oBAAC,OAAE,MAAM,QAAQ,QAAO,UAAS,KAAI,uBAAsB,WAAU,
|
|
1
|
+
{"version":3,"sources":["../../src/components/activity-row.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"next/image\";\nimport Link from \"next/link\";\nimport { ExternalLink } from \"lucide-react\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { ACTIVITY_TYPE_CONFIG } from \"../data/activity.js\";\nimport { ipfsToHttp } from \"../utils/ipfs.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiActivity } from \"@medialane/sdk\";\n\nexport interface ActivityRowProps {\n activity: ApiActivity;\n /** Optional token enrichment — if absent shows #tokenId fallback. No internal useToken call. */\n token?: { name?: string; image?: string };\n showActor?: boolean;\n showExplorer?: boolean;\n compact?: boolean;\n explorerUrl?: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n}\n\nexport function ActivityRow({\n activity,\n token,\n showActor = true,\n showExplorer = true,\n compact = false,\n explorerUrl = \"https://voyager.online\",\n getAssetHref = (c, t) => `/asset/${c}/${t}`,\n getActorHref = (a) => `/creator/${a}`,\n}: ActivityRowProps) {\n const config = ACTIVITY_TYPE_CONFIG[activity.type] ?? {\n label: activity.type,\n variant: \"outline\" as const,\n icon: ExternalLink,\n colorClass: \"text-muted-foreground\",\n bgClass: \"bg-muted\",\n };\n const Icon = config.icon;\n\n const contract = activity.nftContract ?? activity.contractAddress ?? null;\n const tokenId = activity.nftTokenId ?? activity.tokenId ?? null;\n const actor =\n activity.offerer ??\n activity.fulfiller ??\n ((activity.type as string) === \"mint\" ? activity.to : activity.from) ??\n null;\n const txLink = activity.txHash ? `${explorerUrl}/tx/${activity.txHash}` : null;\n\n const tokenName = token?.name ?? (tokenId ? `#${tokenId}` : \"—\");\n const tokenImage = token?.image ? ipfsToHttp(token.image) : null;\n\n return (\n <div className={cn(\"flex items-center gap-3 hover:bg-muted/30 transition-colors group\", compact ? \"pl-4 pr-5 py-2.5\" : \"pl-4 pr-5 py-3.5\")}>\n {/* Type icon */}\n <div className={cn(\"rounded-lg flex items-center justify-center shrink-0\", config.bgClass, compact ? \"h-7 w-7\" : \"h-8 w-8\")}>\n <Icon className={cn(\"shrink-0\", config.colorClass, compact ? \"h-3.5 w-3.5\" : \"h-4 w-4\")} />\n </div>\n\n {/* Token thumbnail */}\n <div className={cn(\"rounded-md overflow-hidden shrink-0 bg-muted\", compact ? \"h-7 w-7\" : \"h-9 w-9\")}>\n {tokenImage ? (\n <Image src={tokenImage} alt={tokenName} width={compact ? 28 : 36} height={compact ? 28 : 36} className=\"object-cover w-full h-full\" unoptimized />\n ) : (\n <div className=\"w-full h-full bg-gradient-to-br from-muted-foreground/10 to-muted-foreground/5\" />\n )}\n </div>\n\n {/* Asset name + actor */}\n <div className=\"flex-1 min-w-0\">\n {contract && tokenId ? (\n <Link href={getAssetHref(contract, tokenId)} className=\"text-sm font-semibold hover:text-primary transition-colors truncate block leading-tight\">\n {tokenName}\n </Link>\n ) : (\n <span className=\"text-sm font-semibold text-muted-foreground\">—</span>\n )}\n {showActor && actor && (\n <Link href={getActorHref(actor)} className=\"text-xs text-muted-foreground hover:text-primary transition-colors font-mono leading-tight\">\n <AddressDisplay address={actor} chars={4} showCopy={false} />\n </Link>\n )}\n </div>\n\n {/* Right: badge + price + time + explorer */}\n <div className=\"flex items-center gap-2.5 shrink-0\">\n {!compact && (\n <span className={cn(\"text-[10px] font-medium px-1.5 py-0.5 rounded hidden sm:inline-flex\", config.bgClass, config.colorClass)}>\n {config.label}\n </span>\n )}\n\n {activity.price?.formatted && (\n <div className=\"text-right\">\n <p className=\"text-sm font-bold tabular-nums leading-tight\">{formatDisplayPrice(activity.price.formatted)}</p>\n <p className=\"text-[10px] text-muted-foreground leading-tight flex items-center justify-end gap-0.5\">\n {activity.price.currency && <CurrencyIcon symbol={activity.price.currency} size={10} />}\n {activity.price.currency}\n </p>\n </div>\n )}\n\n <span className=\"text-[10px] text-muted-foreground tabular-nums hidden sm:block w-12 text-right\" title={new Date(activity.timestamp).toLocaleString()}>\n {timeAgo(activity.timestamp)}\n </span>\n\n {showExplorer && txLink && (\n <a href={txLink} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex items-center justify-center h-6 w-6 rounded-md hover:bg-muted transition-colors opacity-50 sm:opacity-0 sm:group-hover:opacity-100 shrink-0\" aria-label=\"View on explorer\">\n <ExternalLink className=\"h-3 w-3 text-muted-foreground\" />\n </a>\n )}\n </div>\n </div>\n );\n}\n"],"mappings":";AA6DQ,cAaF,YAbE;AA3DR,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS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U,8BAA6B,aAAW,MAAC,IAEhJ,oBAAC,SAAI,WAAU,kFAAiF,GAEpG;AAAA,IAGA,qBAAC,SAAI,WAAU,kBACZ;AAAA,kBAAY,UACX,oBAAC,QAAK,MAAM,aAAa,UAAU,OAAO,GAAG,WAAU,2FACpD,qBACH,IAEA,oBAAC,UAAK,WAAU,+CAA8C,oBAAC;AAAA,MAEhE,aAAa,SACZ,oBAAC,QAAK,MAAM,aAAa,KAAK,GAAG,WAAU,8FACzC,8BAAC,kBAAe,SAAS,OAAO,OAAO,GAAG,UAAU,OAAO,GAC7D;AAAA,OAEJ;AAAA,IAGA,qBAAC,SAAI,WAAU,sCACZ;AAAA,OAAC,WACA,oBAAC,UAAK,WAAW,GAAG,uEAAuE,OAAO,SAAS,OAAO,UAAU,GACzH,iBAAO,OACV;AAAA,MAGD,SAAS,OAAO,aACf,qBAAC,SAAI,WAAU,cACb;AAAA,4BAAC,OAAE,WAAU,gDAAgD,6BAAmB,SAAS,MAAM,SAAS,GAAE;AAAA,QAC1G,qBAAC,OAAE,WAAU,yFACV;AAAA,mBAAS,MAAM,YAAY,oBAAC,gBAAa,QAAQ,SAAS,MAAM,UAAU,MAAM,IAAI;AAAA,UACpF,SAAS,MAAM;AAAA,WAClB;AAAA,SACF;AAAA,MAGF,oBAAC,UAAK,WAAU,kFAAiF,OAAO,IAAI,KAAK,SAAS,SAAS,EAAE,eAAe,GACjJ,kBAAQ,SAAS,SAAS,GAC7B;AAAA,MAEC,gBAAgB,UACf,oBAAC,OAAE,MAAM,QAAQ,QAAO,UAAS,KAAI,uBAAsB,WAAU,2JAA0J,cAAW,oBACxO,8BAAC,gBAAa,WAAU,iCAAgC,GAC1D;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -19,6 +19,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
20
|
var discover_feed_section_exports = {};
|
|
21
21
|
__export(discover_feed_section_exports, {
|
|
22
|
+
DiscoverActivityStrip: () => DiscoverActivityStrip,
|
|
22
23
|
DiscoverFeedSection: () => DiscoverFeedSection
|
|
23
24
|
});
|
|
24
25
|
module.exports = __toCommonJS(discover_feed_section_exports);
|
|
@@ -63,6 +64,34 @@ function StripShell({
|
|
|
63
64
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-full overflow-x-auto scrollbar-hide", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex gap-5 sm:gap-6 snap-x snap-mandatory pb-2", style: { width: "max-content" }, children }) })
|
|
64
65
|
] });
|
|
65
66
|
}
|
|
67
|
+
function DiscoverActivityStrip({
|
|
68
|
+
orders,
|
|
69
|
+
isLoading,
|
|
70
|
+
marketplaceHref = "/marketplace",
|
|
71
|
+
onBuyOrder,
|
|
72
|
+
isOwnOrder
|
|
73
|
+
}) {
|
|
74
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
75
|
+
StripShell,
|
|
76
|
+
{
|
|
77
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-3.5 w-3.5 text-white" }),
|
|
78
|
+
iconBg: "bg-gradient-to-br from-rose-500 to-pink-600 shadow-md shadow-rose-500/20",
|
|
79
|
+
title: "Activity",
|
|
80
|
+
href: marketplaceHref,
|
|
81
|
+
linkLabel: "View all",
|
|
82
|
+
children: isLoading ? Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-72 snap-start shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_listing_card.ListingCardSkeleton, {}) }, i)) : orders.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground py-4", children: "No active listings yet." }) : orders.map((order) => {
|
|
83
|
+
const own = isOwnOrder?.(order) ?? false;
|
|
84
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-72 snap-start shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
85
|
+
import_listing_card.ListingCard,
|
|
86
|
+
{
|
|
87
|
+
order,
|
|
88
|
+
onBuy: onBuyOrder && !own ? () => onBuyOrder(order) : void 0
|
|
89
|
+
}
|
|
90
|
+
) }, order.orderHash);
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
) });
|
|
94
|
+
}
|
|
66
95
|
function DiscoverFeedSection({
|
|
67
96
|
orders,
|
|
68
97
|
isLoading,
|
|
@@ -76,26 +105,16 @@ function DiscoverFeedSection({
|
|
|
76
105
|
isOwnOrder
|
|
77
106
|
}) {
|
|
78
107
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-14 sm:space-y-20", children: [
|
|
79
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
|
-
|
|
108
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
109
|
+
DiscoverActivityStrip,
|
|
81
110
|
{
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
children: isLoading ? Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-72 snap-start shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_listing_card.ListingCardSkeleton, {}) }, i)) : orders.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground py-4", children: "No active listings yet." }) : orders.map((order) => {
|
|
88
|
-
const own = isOwnOrder?.(order) ?? false;
|
|
89
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "w-72 snap-start shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
|
-
import_listing_card.ListingCard,
|
|
91
|
-
{
|
|
92
|
-
order,
|
|
93
|
-
onBuy: onBuyOrder && !own ? () => onBuyOrder(order) : void 0
|
|
94
|
-
}
|
|
95
|
-
) }, order.orderHash);
|
|
96
|
-
})
|
|
111
|
+
orders,
|
|
112
|
+
isLoading,
|
|
113
|
+
marketplaceHref,
|
|
114
|
+
onBuyOrder,
|
|
115
|
+
isOwnOrder
|
|
97
116
|
}
|
|
98
|
-
)
|
|
117
|
+
),
|
|
99
118
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { delay: 0.08, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
100
119
|
StripShell,
|
|
101
120
|
{
|
|
@@ -119,6 +138,7 @@ function DiscoverFeedSection({
|
|
|
119
138
|
}
|
|
120
139
|
// Annotate the CommonJS export names for ESM import in node:
|
|
121
140
|
0 && (module.exports = {
|
|
141
|
+
DiscoverActivityStrip,
|
|
122
142
|
DiscoverFeedSection
|
|
123
143
|
});
|
|
124
144
|
//# sourceMappingURL=discover-feed-section.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-feed-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { Tag, Activity, RefreshCw, ArrowRight } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ListingCard, ListingCardSkeleton } from \"./listing-card.js\";\nimport { ActivityCard, ActivityCardSkeleton } from \"./activity-card.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiOrder, ApiActivity } from \"@medialane/sdk\";\n\nexport interface DiscoverFeedSectionProps {\n orders: ApiOrder[];\n isLoading: boolean;\n activities: ApiActivity[];\n activitiesLoading: boolean;\n lastUpdated: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n explorerUrl?: string;\n marketplaceHref?: string;\n activitiesHref?: string;\n /** Optional buy hook — when provided, listing cards show their Buy action */\n onBuyOrder?: (order: ApiOrder) => void;\n /** Hide the buy action for orders the viewer owns */\n isOwnOrder?: (order: ApiOrder) => boolean;\n}\n\n// ── Shared strip shell: icon-badge header + snap-scroll row ─────────────────\nfunction StripShell({\n icon,\n iconBg,\n title,\n subtitle,\n href,\n linkLabel,\n children,\n}: {\n icon: React.ReactNode;\n iconBg: string;\n title: string;\n subtitle?: React.ReactNode;\n href: string;\n linkLabel: string;\n children: React.ReactNode;\n}) {\n return (\n <section className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2.5\">\n <div className={cn(\"h-7 w-7 rounded-lg flex items-center justify-center\", iconBg)}>\n {icon}\n </div>\n <div>\n <h2 className=\"text-lg sm:text-xl font-semibold leading-none\">{title}</h2>\n {subtitle && <p className=\"text-[10px] text-muted-foreground mt-1\">{subtitle}</p>}\n </div>\n </div>\n <a\n href={href}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n {linkLabel} <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n\n <div className=\"w-full overflow-x-auto scrollbar-hide\">\n <div className=\"flex gap-5 sm:gap-6 snap-x snap-mandatory pb-2\" style={{ width: \"max-content\" }}>\n {children}\n </div>\n </div>\n </section>\n );\n}\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-feed-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { Tag, Activity, RefreshCw, ArrowRight } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ListingCard, ListingCardSkeleton } from \"./listing-card.js\";\nimport { ActivityCard, ActivityCardSkeleton } from \"./activity-card.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiOrder, ApiActivity } from \"@medialane/sdk\";\n\nexport interface DiscoverFeedSectionProps {\n orders: ApiOrder[];\n isLoading: boolean;\n activities: ApiActivity[];\n activitiesLoading: boolean;\n lastUpdated: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n explorerUrl?: string;\n marketplaceHref?: string;\n activitiesHref?: string;\n /** Optional buy hook — when provided, listing cards show their Buy action */\n onBuyOrder?: (order: ApiOrder) => void;\n /** Hide the buy action for orders the viewer owns */\n isOwnOrder?: (order: ApiOrder) => boolean;\n}\n\n// ── Shared strip shell: icon-badge header + snap-scroll row ─────────────────\nfunction StripShell({\n icon,\n iconBg,\n title,\n subtitle,\n href,\n linkLabel,\n children,\n}: {\n icon: React.ReactNode;\n iconBg: string;\n title: string;\n subtitle?: React.ReactNode;\n href: string;\n linkLabel: string;\n children: React.ReactNode;\n}) {\n return (\n <section className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2.5\">\n <div className={cn(\"h-7 w-7 rounded-lg flex items-center justify-center\", iconBg)}>\n {icon}\n </div>\n <div>\n <h2 className=\"text-lg sm:text-xl font-semibold leading-none\">{title}</h2>\n {subtitle && <p className=\"text-[10px] text-muted-foreground mt-1\">{subtitle}</p>}\n </div>\n </div>\n <a\n href={href}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n {linkLabel} <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n\n <div className=\"w-full overflow-x-auto scrollbar-hide\">\n <div className=\"flex gap-5 sm:gap-6 snap-x snap-mandatory pb-2\" style={{ width: \"max-content\" }}>\n {children}\n </div>\n </div>\n </section>\n );\n}\n\nexport interface DiscoverActivityStripProps {\n orders: ApiOrder[];\n isLoading: boolean;\n marketplaceHref?: string;\n onBuyOrder?: (order: ApiOrder) => void;\n isOwnOrder?: (order: ApiOrder) => boolean;\n}\n\n/** Markets — recent listings carousel. Standalone (2026-07-05) so a page can\n * place other sections (e.g. Browse by Type) between this and Community. */\nexport function DiscoverActivityStrip({\n orders,\n isLoading,\n marketplaceHref = \"/marketplace\",\n onBuyOrder,\n isOwnOrder,\n}: DiscoverActivityStripProps) {\n return (\n <FadeIn>\n <StripShell\n icon={<Tag className=\"h-3.5 w-3.5 text-white\" />}\n iconBg=\"bg-gradient-to-br from-rose-500 to-pink-600 shadow-md shadow-rose-500/20\"\n title=\"Activity\"\n href={marketplaceHref}\n linkLabel=\"View all\"\n >\n {isLoading\n ? Array.from({ length: 8 }).map((_, i) => (\n <div key={i} className=\"w-72 snap-start shrink-0\">\n <ListingCardSkeleton />\n </div>\n ))\n : orders.length === 0\n ? (\n <p className=\"text-sm text-muted-foreground py-4\">No active listings yet.</p>\n )\n : orders.map((order) => {\n const own = isOwnOrder?.(order) ?? false;\n return (\n <div key={order.orderHash} className=\"w-72 snap-start shrink-0\">\n <ListingCard\n order={order}\n onBuy={onBuyOrder && !own ? () => onBuyOrder(order) : undefined}\n />\n </div>\n );\n })}\n </StripShell>\n </FadeIn>\n );\n}\n\n/**\n * @deprecated Kept for apps still on the combined layout (e.g. medialane-io,\n * pending its own migration). New pages should use `DiscoverActivityStrip`\n * directly and build their own Community section — see medialane-starknet's\n * discover community-section.tsx for the 2-column activities+leaderboard\n * replacement of the old carousel below.\n */\nexport function DiscoverFeedSection({\n orders,\n isLoading,\n activities,\n activitiesLoading,\n lastUpdated,\n getAssetHref = (c, t) => `/asset/${c}/${t}`,\n marketplaceHref = \"/marketplace\",\n activitiesHref = \"/activities\",\n onBuyOrder,\n isOwnOrder,\n}: DiscoverFeedSectionProps) {\n return (\n <div className=\"space-y-14 sm:space-y-20\">\n <DiscoverActivityStrip\n orders={orders}\n isLoading={isLoading}\n marketplaceHref={marketplaceHref}\n onBuyOrder={onBuyOrder}\n isOwnOrder={isOwnOrder}\n />\n\n {/* Community — recent on-chain activity carousel */}\n <FadeIn delay={0.08}>\n <StripShell\n icon={<Activity className=\"h-3.5 w-3.5 text-white\" />}\n iconBg=\"bg-gradient-to-br from-indigo-500 to-blue-600 shadow-md shadow-indigo-500/20\"\n title=\"Community\"\n subtitle={\n <span className=\"flex items-center gap-1\">\n <RefreshCw className=\"h-2.5 w-2.5\" />\n Updated {timeAgo(lastUpdated)}\n </span>\n }\n href={activitiesHref}\n linkLabel=\"Activities\"\n >\n {activitiesLoading\n ? Array.from({ length: 8 }).map((_, i) => (\n <div key={i} className=\"w-56 sm:w-64 snap-start shrink-0\">\n <ActivityCardSkeleton />\n </div>\n ))\n : activities.length === 0\n ? (\n <p className=\"text-sm text-muted-foreground py-4\">\n No activity yet. Be the first to trade on Medialane!\n </p>\n )\n : activities.map((act, i) => {\n const key = act.txHash\n ? `${act.txHash}-${act.type}-${act.nftTokenId ?? \"\"}`\n : `activity-${i}`;\n return (\n <div key={key} className=\"w-56 sm:w-64 snap-start shrink-0\">\n <ActivityCard activity={act} getAssetHref={getAssetHref} />\n </div>\n );\n })}\n </StripShell>\n </FadeIn>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiDU;AA/CV,0BAAqD;AACrD,+BAAuB;AACvB,0BAAiD;AACjD,2BAAmD;AACnD,kBAAwB;AACxB,gBAAmB;AAqBnB,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAQG;AACD,SACE,6CAAC,aAAQ,WAAU,aACjB;AAAA,iDAAC,SAAI,WAAU,qCACb;AAAA,mDAAC,SAAI,WAAU,6BACb;AAAA,oDAAC,SAAI,eAAW,cAAG,uDAAuD,MAAM,GAC7E,gBACH;AAAA,QACA,6CAAC,SACC;AAAA,sDAAC,QAAG,WAAU,iDAAiD,iBAAM;AAAA,UACpE,YAAY,4CAAC,OAAE,WAAU,0CAA0C,oBAAS;AAAA,WAC/E;AAAA,SACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAU;AAAA,UAET;AAAA;AAAA,YAAU;AAAA,YAAC,4CAAC,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AAA,QACA;AAAA;AAAA,IACF;AAAA,IAGA,4CAAC,mCAAO,OAAO,MACb;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,4CAAC,gCAAS,WAAU,0BAAyB;AAAA,QACnD,QAAO;AAAA,QACP,OAAM;AAAA,QACN,UACE,6CAAC,UAAK,WAAU,2BACd;AAAA,sDAAC,iCAAU,WAAU,eAAc;AAAA,UAAE;AAAA,cAC5B,qBAAQ,WAAW;AAAA,WAC9B;AAAA,QAEF,MAAM;AAAA,QACN,WAAU;AAAA,QAET,8BACG,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAChC,4CAAC,SAAY,WAAU,oCACrB,sDAAC,6CAAqB,KADd,CAEV,CACD,IACD,WAAW,WAAW,IAEpB,4CAAC,OAAE,WAAU,sCAAqC,kEAElD,IAEF,WAAW,IAAI,CAAC,KAAK,MAAM;AACzB,gBAAM,MAAM,IAAI,SACZ,GAAG,IAAI,MAAM,IAAI,IAAI,IAAI,IAAI,IAAI,cAAc,EAAE,KACjD,YAAY,CAAC;AACjB,iBACE,4CAAC,SAAc,WAAU,oCACvB,sDAAC,qCAAa,UAAU,KAAK,cAA4B,KADjD,GAEV;AAAA,QAEJ,CAAC;AAAA;AAAA,IACP,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -17,8 +17,23 @@ interface DiscoverFeedSectionProps {
|
|
|
17
17
|
/** Hide the buy action for orders the viewer owns */
|
|
18
18
|
isOwnOrder?: (order: ApiOrder) => boolean;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
interface DiscoverActivityStripProps {
|
|
21
|
+
orders: ApiOrder[];
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
marketplaceHref?: string;
|
|
24
|
+
onBuyOrder?: (order: ApiOrder) => void;
|
|
25
|
+
isOwnOrder?: (order: ApiOrder) => boolean;
|
|
26
|
+
}
|
|
27
|
+
/** Markets — recent listings carousel. Standalone (2026-07-05) so a page can
|
|
28
|
+
* place other sections (e.g. Browse by Type) between this and Community. */
|
|
29
|
+
declare function DiscoverActivityStrip({ orders, isLoading, marketplaceHref, onBuyOrder, isOwnOrder, }: DiscoverActivityStripProps): react_jsx_runtime.JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Kept for apps still on the combined layout (e.g. medialane-io,
|
|
32
|
+
* pending its own migration). New pages should use `DiscoverActivityStrip`
|
|
33
|
+
* directly and build their own Community section — see medialane-starknet's
|
|
34
|
+
* discover community-section.tsx for the 2-column activities+leaderboard
|
|
35
|
+
* replacement of the old carousel below.
|
|
36
|
+
*/
|
|
22
37
|
declare function DiscoverFeedSection({ orders, isLoading, activities, activitiesLoading, lastUpdated, getAssetHref, marketplaceHref, activitiesHref, onBuyOrder, isOwnOrder, }: DiscoverFeedSectionProps): react_jsx_runtime.JSX.Element;
|
|
23
38
|
|
|
24
|
-
export { DiscoverFeedSection, type DiscoverFeedSectionProps };
|
|
39
|
+
export { DiscoverActivityStrip, type DiscoverActivityStripProps, DiscoverFeedSection, type DiscoverFeedSectionProps };
|
|
@@ -17,8 +17,23 @@ interface DiscoverFeedSectionProps {
|
|
|
17
17
|
/** Hide the buy action for orders the viewer owns */
|
|
18
18
|
isOwnOrder?: (order: ApiOrder) => boolean;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
interface DiscoverActivityStripProps {
|
|
21
|
+
orders: ApiOrder[];
|
|
22
|
+
isLoading: boolean;
|
|
23
|
+
marketplaceHref?: string;
|
|
24
|
+
onBuyOrder?: (order: ApiOrder) => void;
|
|
25
|
+
isOwnOrder?: (order: ApiOrder) => boolean;
|
|
26
|
+
}
|
|
27
|
+
/** Markets — recent listings carousel. Standalone (2026-07-05) so a page can
|
|
28
|
+
* place other sections (e.g. Browse by Type) between this and Community. */
|
|
29
|
+
declare function DiscoverActivityStrip({ orders, isLoading, marketplaceHref, onBuyOrder, isOwnOrder, }: DiscoverActivityStripProps): react_jsx_runtime.JSX.Element;
|
|
30
|
+
/**
|
|
31
|
+
* @deprecated Kept for apps still on the combined layout (e.g. medialane-io,
|
|
32
|
+
* pending its own migration). New pages should use `DiscoverActivityStrip`
|
|
33
|
+
* directly and build their own Community section — see medialane-starknet's
|
|
34
|
+
* discover community-section.tsx for the 2-column activities+leaderboard
|
|
35
|
+
* replacement of the old carousel below.
|
|
36
|
+
*/
|
|
22
37
|
declare function DiscoverFeedSection({ orders, isLoading, activities, activitiesLoading, lastUpdated, getAssetHref, marketplaceHref, activitiesHref, onBuyOrder, isOwnOrder, }: DiscoverFeedSectionProps): react_jsx_runtime.JSX.Element;
|
|
23
38
|
|
|
24
|
-
export { DiscoverFeedSection, type DiscoverFeedSectionProps };
|
|
39
|
+
export { DiscoverActivityStrip, type DiscoverActivityStripProps, DiscoverFeedSection, type DiscoverFeedSectionProps };
|
|
@@ -40,6 +40,34 @@ function StripShell({
|
|
|
40
40
|
/* @__PURE__ */ jsx("div", { className: "w-full overflow-x-auto scrollbar-hide", children: /* @__PURE__ */ jsx("div", { className: "flex gap-5 sm:gap-6 snap-x snap-mandatory pb-2", style: { width: "max-content" }, children }) })
|
|
41
41
|
] });
|
|
42
42
|
}
|
|
43
|
+
function DiscoverActivityStrip({
|
|
44
|
+
orders,
|
|
45
|
+
isLoading,
|
|
46
|
+
marketplaceHref = "/marketplace",
|
|
47
|
+
onBuyOrder,
|
|
48
|
+
isOwnOrder
|
|
49
|
+
}) {
|
|
50
|
+
return /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsx(
|
|
51
|
+
StripShell,
|
|
52
|
+
{
|
|
53
|
+
icon: /* @__PURE__ */ jsx(Tag, { className: "h-3.5 w-3.5 text-white" }),
|
|
54
|
+
iconBg: "bg-gradient-to-br from-rose-500 to-pink-600 shadow-md shadow-rose-500/20",
|
|
55
|
+
title: "Activity",
|
|
56
|
+
href: marketplaceHref,
|
|
57
|
+
linkLabel: "View all",
|
|
58
|
+
children: isLoading ? Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "w-72 snap-start shrink-0", children: /* @__PURE__ */ jsx(ListingCardSkeleton, {}) }, i)) : orders.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground py-4", children: "No active listings yet." }) : orders.map((order) => {
|
|
59
|
+
const own = isOwnOrder?.(order) ?? false;
|
|
60
|
+
return /* @__PURE__ */ jsx("div", { className: "w-72 snap-start shrink-0", children: /* @__PURE__ */ jsx(
|
|
61
|
+
ListingCard,
|
|
62
|
+
{
|
|
63
|
+
order,
|
|
64
|
+
onBuy: onBuyOrder && !own ? () => onBuyOrder(order) : void 0
|
|
65
|
+
}
|
|
66
|
+
) }, order.orderHash);
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
) });
|
|
70
|
+
}
|
|
43
71
|
function DiscoverFeedSection({
|
|
44
72
|
orders,
|
|
45
73
|
isLoading,
|
|
@@ -53,26 +81,16 @@ function DiscoverFeedSection({
|
|
|
53
81
|
isOwnOrder
|
|
54
82
|
}) {
|
|
55
83
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-14 sm:space-y-20", children: [
|
|
56
|
-
/* @__PURE__ */ jsx(
|
|
57
|
-
|
|
84
|
+
/* @__PURE__ */ jsx(
|
|
85
|
+
DiscoverActivityStrip,
|
|
58
86
|
{
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
children: isLoading ? Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "w-72 snap-start shrink-0", children: /* @__PURE__ */ jsx(ListingCardSkeleton, {}) }, i)) : orders.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground py-4", children: "No active listings yet." }) : orders.map((order) => {
|
|
65
|
-
const own = isOwnOrder?.(order) ?? false;
|
|
66
|
-
return /* @__PURE__ */ jsx("div", { className: "w-72 snap-start shrink-0", children: /* @__PURE__ */ jsx(
|
|
67
|
-
ListingCard,
|
|
68
|
-
{
|
|
69
|
-
order,
|
|
70
|
-
onBuy: onBuyOrder && !own ? () => onBuyOrder(order) : void 0
|
|
71
|
-
}
|
|
72
|
-
) }, order.orderHash);
|
|
73
|
-
})
|
|
87
|
+
orders,
|
|
88
|
+
isLoading,
|
|
89
|
+
marketplaceHref,
|
|
90
|
+
onBuyOrder,
|
|
91
|
+
isOwnOrder
|
|
74
92
|
}
|
|
75
|
-
)
|
|
93
|
+
),
|
|
76
94
|
/* @__PURE__ */ jsx(FadeIn, { delay: 0.08, children: /* @__PURE__ */ jsx(
|
|
77
95
|
StripShell,
|
|
78
96
|
{
|
|
@@ -95,6 +113,7 @@ function DiscoverFeedSection({
|
|
|
95
113
|
] });
|
|
96
114
|
}
|
|
97
115
|
export {
|
|
116
|
+
DiscoverActivityStrip,
|
|
98
117
|
DiscoverFeedSection
|
|
99
118
|
};
|
|
100
119
|
//# sourceMappingURL=discover-feed-section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/discover-feed-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { Tag, Activity, RefreshCw, ArrowRight } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ListingCard, ListingCardSkeleton } from \"./listing-card.js\";\nimport { ActivityCard, ActivityCardSkeleton } from \"./activity-card.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiOrder, ApiActivity } from \"@medialane/sdk\";\n\nexport interface DiscoverFeedSectionProps {\n orders: ApiOrder[];\n isLoading: boolean;\n activities: ApiActivity[];\n activitiesLoading: boolean;\n lastUpdated: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n explorerUrl?: string;\n marketplaceHref?: string;\n activitiesHref?: string;\n /** Optional buy hook — when provided, listing cards show their Buy action */\n onBuyOrder?: (order: ApiOrder) => void;\n /** Hide the buy action for orders the viewer owns */\n isOwnOrder?: (order: ApiOrder) => boolean;\n}\n\n// ── Shared strip shell: icon-badge header + snap-scroll row ─────────────────\nfunction StripShell({\n icon,\n iconBg,\n title,\n subtitle,\n href,\n linkLabel,\n children,\n}: {\n icon: React.ReactNode;\n iconBg: string;\n title: string;\n subtitle?: React.ReactNode;\n href: string;\n linkLabel: string;\n children: React.ReactNode;\n}) {\n return (\n <section className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2.5\">\n <div className={cn(\"h-7 w-7 rounded-lg flex items-center justify-center\", iconBg)}>\n {icon}\n </div>\n <div>\n <h2 className=\"text-lg sm:text-xl font-semibold leading-none\">{title}</h2>\n {subtitle && <p className=\"text-[10px] text-muted-foreground mt-1\">{subtitle}</p>}\n </div>\n </div>\n <a\n href={href}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n {linkLabel} <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n\n <div className=\"w-full overflow-x-auto scrollbar-hide\">\n <div className=\"flex gap-5 sm:gap-6 snap-x snap-mandatory pb-2\" style={{ width: \"max-content\" }}>\n {children}\n </div>\n </div>\n </section>\n );\n}\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/components/discover-feed-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { Tag, Activity, RefreshCw, ArrowRight } from \"lucide-react\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { ListingCard, ListingCardSkeleton } from \"./listing-card.js\";\nimport { ActivityCard, ActivityCardSkeleton } from \"./activity-card.js\";\nimport { timeAgo } from \"../utils/time.js\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiOrder, ApiActivity } from \"@medialane/sdk\";\n\nexport interface DiscoverFeedSectionProps {\n orders: ApiOrder[];\n isLoading: boolean;\n activities: ApiActivity[];\n activitiesLoading: boolean;\n lastUpdated: string;\n getAssetHref?: (contract: string, tokenId: string) => string;\n getActorHref?: (address: string) => string;\n explorerUrl?: string;\n marketplaceHref?: string;\n activitiesHref?: string;\n /** Optional buy hook — when provided, listing cards show their Buy action */\n onBuyOrder?: (order: ApiOrder) => void;\n /** Hide the buy action for orders the viewer owns */\n isOwnOrder?: (order: ApiOrder) => boolean;\n}\n\n// ── Shared strip shell: icon-badge header + snap-scroll row ─────────────────\nfunction StripShell({\n icon,\n iconBg,\n title,\n subtitle,\n href,\n linkLabel,\n children,\n}: {\n icon: React.ReactNode;\n iconBg: string;\n title: string;\n subtitle?: React.ReactNode;\n href: string;\n linkLabel: string;\n children: React.ReactNode;\n}) {\n return (\n <section className=\"space-y-4\">\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center gap-2.5\">\n <div className={cn(\"h-7 w-7 rounded-lg flex items-center justify-center\", iconBg)}>\n {icon}\n </div>\n <div>\n <h2 className=\"text-lg sm:text-xl font-semibold leading-none\">{title}</h2>\n {subtitle && <p className=\"text-[10px] text-muted-foreground mt-1\">{subtitle}</p>}\n </div>\n </div>\n <a\n href={href}\n className=\"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-accent transition-colors\"\n >\n {linkLabel} <ArrowRight className=\"h-3.5 w-3.5\" />\n </a>\n </div>\n\n <div className=\"w-full overflow-x-auto scrollbar-hide\">\n <div className=\"flex gap-5 sm:gap-6 snap-x snap-mandatory pb-2\" style={{ width: \"max-content\" }}>\n {children}\n </div>\n </div>\n </section>\n );\n}\n\nexport interface DiscoverActivityStripProps {\n orders: ApiOrder[];\n isLoading: boolean;\n marketplaceHref?: string;\n onBuyOrder?: (order: ApiOrder) => void;\n isOwnOrder?: (order: ApiOrder) => boolean;\n}\n\n/** Markets — recent listings carousel. Standalone (2026-07-05) so a page can\n * place other sections (e.g. Browse by Type) between this and Community. */\nexport function DiscoverActivityStrip({\n orders,\n isLoading,\n marketplaceHref = \"/marketplace\",\n onBuyOrder,\n isOwnOrder,\n}: DiscoverActivityStripProps) {\n return (\n <FadeIn>\n <StripShell\n icon={<Tag className=\"h-3.5 w-3.5 text-white\" />}\n iconBg=\"bg-gradient-to-br from-rose-500 to-pink-600 shadow-md shadow-rose-500/20\"\n title=\"Activity\"\n href={marketplaceHref}\n linkLabel=\"View all\"\n >\n {isLoading\n ? Array.from({ length: 8 }).map((_, i) => (\n <div key={i} className=\"w-72 snap-start shrink-0\">\n <ListingCardSkeleton />\n </div>\n ))\n : orders.length === 0\n ? (\n <p className=\"text-sm text-muted-foreground py-4\">No active listings yet.</p>\n )\n : orders.map((order) => {\n const own = isOwnOrder?.(order) ?? false;\n return (\n <div key={order.orderHash} className=\"w-72 snap-start shrink-0\">\n <ListingCard\n order={order}\n onBuy={onBuyOrder && !own ? () => onBuyOrder(order) : undefined}\n />\n </div>\n );\n })}\n </StripShell>\n </FadeIn>\n );\n}\n\n/**\n * @deprecated Kept for apps still on the combined layout (e.g. medialane-io,\n * pending its own migration). New pages should use `DiscoverActivityStrip`\n * directly and build their own Community section — see medialane-starknet's\n * discover community-section.tsx for the 2-column activities+leaderboard\n * replacement of the old carousel below.\n */\nexport function DiscoverFeedSection({\n orders,\n isLoading,\n activities,\n activitiesLoading,\n lastUpdated,\n getAssetHref = (c, t) => `/asset/${c}/${t}`,\n marketplaceHref = \"/marketplace\",\n activitiesHref = \"/activities\",\n onBuyOrder,\n isOwnOrder,\n}: DiscoverFeedSectionProps) {\n return (\n <div className=\"space-y-14 sm:space-y-20\">\n <DiscoverActivityStrip\n orders={orders}\n isLoading={isLoading}\n marketplaceHref={marketplaceHref}\n onBuyOrder={onBuyOrder}\n isOwnOrder={isOwnOrder}\n />\n\n {/* Community — recent on-chain activity carousel */}\n <FadeIn delay={0.08}>\n <StripShell\n icon={<Activity className=\"h-3.5 w-3.5 text-white\" />}\n iconBg=\"bg-gradient-to-br from-indigo-500 to-blue-600 shadow-md shadow-indigo-500/20\"\n title=\"Community\"\n subtitle={\n <span className=\"flex items-center gap-1\">\n <RefreshCw className=\"h-2.5 w-2.5\" />\n Updated {timeAgo(lastUpdated)}\n </span>\n }\n href={activitiesHref}\n linkLabel=\"Activities\"\n >\n {activitiesLoading\n ? Array.from({ length: 8 }).map((_, i) => (\n <div key={i} className=\"w-56 sm:w-64 snap-start shrink-0\">\n <ActivityCardSkeleton />\n </div>\n ))\n : activities.length === 0\n ? (\n <p className=\"text-sm text-muted-foreground py-4\">\n No activity yet. Be the first to trade on Medialane!\n </p>\n )\n : activities.map((act, i) => {\n const key = act.txHash\n ? `${act.txHash}-${act.type}-${act.nftTokenId ?? \"\"}`\n : `activity-${i}`;\n return (\n <div key={key} className=\"w-56 sm:w-64 snap-start shrink-0\">\n <ActivityCard activity={act} getAssetHref={getAssetHref} />\n </div>\n );\n })}\n </StripShell>\n </FadeIn>\n </div>\n );\n}\n"],"mappings":";AAiDU,cAGA,YAHA;AA/CV,SAAS,KAAK,UAAU,WAAW,kBAAkB;AACrD,SAAS,cAAc;AACvB,SAAS,aAAa,2BAA2B;AACjD,SAAS,cAAc,4BAA4B;AACnD,SAAS,eAAe;AACxB,SAAS,UAAU;AAqBnB,SAAS,WAAW;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAQG;AACD,SACE,qBAAC,aAAQ,WAAU,aACjB;AAAA,yBAAC,SAAI,WAAU,qCACb;AAAA,2BAAC,SAAI,WAAU,6BACb;AAAA,4BAAC,SAAI,WAAW,GAAG,uDAAuD,MAAM,GAC7E,gBACH;AAAA,QACA,qBAAC,SACC;AAAA,8BAAC,QAAG,WAAU,iDAAiD,iBAAM;AAAA,UACpE,YAAY,oBAAC,OAAE,WAAU,0CAA0C,oBAAS;AAAA,WAC/E;AAAA,SACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,WAAU;AAAA,UAET;AAAA;AAAA,YAAU;AAAA,YAAC,oBAAC,cAAW,WAAU,eAAc;AAAA;AAAA;AAAA,MAClD;AAAA,OACF;AAAA,IAE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A,MAAC;AAAA;AAAA,QACC,MAAM,oBAAC,YAAS,WAAU,0BAAyB;AAAA,QACnD,QAAO;AAAA,QACP,OAAM;AAAA,QACN,UACE,qBAAC,UAAK,WAAU,2BACd;AAAA,8BAAC,aAAU,WAAU,eAAc;AAAA,UAAE;AAAA,UAC5B,QAAQ,WAAW;AAAA,WAC9B;AAAA,QAEF,MAAM;AAAA,QACN,WAAU;AAAA,QAET,8BACG,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAChC,oBAAC,SAAY,WAAU,oCACrB,8BAAC,wBAAqB,KADd,CAEV,CACD,IACD,WAAW,WAAW,IAEpB,oBAAC,OAAE,WAAU,sCAAqC,kEAElD,IAEF,WAAW,IAAI,CAAC,KAAK,MAAM;AACzB,gBAAM,MAAM,IAAI,SACZ,GAAG,IAAI,MAAM,IAAI,IAAI,IAAI,IAAI,IAAI,cAAc,EAAE,KACjD,YAAY,CAAC;AACjB,iBACE,oBAAC,SAAc,WAAU,oCACvB,8BAAC,gBAAa,UAAU,KAAK,cAA4B,KADjD,GAEV;AAAA,QAEJ,CAAC;AAAA;AAAA,IACP,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -26,15 +26,8 @@ var import_jsx_runtime = require("react/jsx-runtime");
|
|
|
26
26
|
var import_cn = require("../../utils/cn.js");
|
|
27
27
|
var import_address = require("../../utils/address.js");
|
|
28
28
|
var import_level_badge = require("./level-badge.js");
|
|
29
|
-
function rankAccent(rank) {
|
|
30
|
-
if (rank === 1) return "#f59e0b";
|
|
31
|
-
if (rank === 2) return "#94a3b8";
|
|
32
|
-
if (rank === 3) return "#b45309";
|
|
33
|
-
return null;
|
|
34
|
-
}
|
|
35
29
|
function LeaderboardTable({ entries, highlightAddress, renderAddress, className }) {
|
|
36
30
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("overflow-hidden rounded-xl border border-border", className), children: entries.map((e) => {
|
|
37
|
-
const accent = rankAccent(e.rank);
|
|
38
31
|
const isViewer = highlightAddress != null && e.address === highlightAddress;
|
|
39
32
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
40
33
|
"div",
|
|
@@ -44,14 +37,6 @@ function LeaderboardTable({ entries, highlightAddress, renderAddress, className
|
|
|
44
37
|
isViewer && "bg-primary/10"
|
|
45
38
|
),
|
|
46
39
|
children: [
|
|
47
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
48
|
-
"span",
|
|
49
|
-
{
|
|
50
|
-
className: "w-8 shrink-0 text-center text-sm font-black tabular-nums",
|
|
51
|
-
style: accent ? { color: accent } : void 0,
|
|
52
|
-
children: e.rank
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
40
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", children: [
|
|
56
41
|
renderAddress ? renderAddress(e.address) : (0, import_address.shortenAddress)(e.address),
|
|
57
42
|
isViewer && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-1.5 text-xs text-muted-foreground", children: "(you)" })
|
|
@@ -59,7 +44,7 @@ function LeaderboardTable({ entries, highlightAddress, renderAddress, className
|
|
|
59
44
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_level_badge.LevelBadge, { level: e.currentLevel, name: e.currentLevelName, badgeColor: e.badgeColor, size: "sm", className: "hidden sm:inline-flex" }),
|
|
60
45
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "shrink-0 text-sm font-semibold tabular-nums", children: [
|
|
61
46
|
e.totalXp.toLocaleString(),
|
|
62
|
-
"
|
|
47
|
+
" pts"
|
|
63
48
|
] })
|
|
64
49
|
]
|
|
65
50
|
},
|
|
@@ -67,22 +52,14 @@ function LeaderboardTable({ entries, highlightAddress, renderAddress, className
|
|
|
67
52
|
);
|
|
68
53
|
}) });
|
|
69
54
|
}
|
|
70
|
-
function LeaderboardWidget({ entries, title = "
|
|
55
|
+
function LeaderboardWidget({ entries, title = "Community Rewards", href, renderAddress, className }) {
|
|
71
56
|
if (entries.length === 0) return null;
|
|
72
57
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: (0, import_cn.cn)("rounded-xl border border-border bg-card p-4 sm:p-5", className), children: [
|
|
73
58
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
74
59
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { className: "text-base font-black", children: title }),
|
|
75
|
-
href && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href, className: "text-xs font-semibold text-muted-foreground active:opacity-70", children: "View
|
|
60
|
+
href && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href, className: "text-xs font-semibold text-muted-foreground active:opacity-70", children: "View scoreboard \u2192" })
|
|
76
61
|
] }),
|
|
77
62
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("ol", { className: "space-y-2.5", children: entries.map((e) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { className: "flex items-center gap-2.5", children: [
|
|
78
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
79
|
-
"span",
|
|
80
|
-
{
|
|
81
|
-
className: "w-5 shrink-0 text-center text-sm font-black tabular-nums",
|
|
82
|
-
style: rankAccent(e.rank) ? { color: rankAccent(e.rank) } : void 0,
|
|
83
|
-
children: e.rank
|
|
84
|
-
}
|
|
85
|
-
),
|
|
86
63
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", children: renderAddress ? renderAddress(e.address) : (0, import_address.shortenAddress)(e.address) }),
|
|
87
64
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_level_badge.LevelBadge, { level: e.currentLevel, name: e.currentLevelName, badgeColor: e.badgeColor, size: "sm" })
|
|
88
65
|
] }, e.address)) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/leaderboard-table.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { shortenAddress } from \"../../utils/address.js\";\nimport { LevelBadge } from \"./level-badge.js\";\n\nexport interface LeaderboardEntryLike {\n rank: number;\n address: string;\n publicId?: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface LeaderboardTableProps {\n entries: LeaderboardEntryLike[];\n /** The viewer's address — its row gets highlighted. */\n highlightAddress?: string | null;\n /** Render the address cell (e.g. a profile link). Defaults to a shortened address. */\n renderAddress?: (address: string) => ReactNode;\n className?: string;\n}\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/leaderboard-table.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { shortenAddress } from \"../../utils/address.js\";\nimport { LevelBadge } from \"./level-badge.js\";\n\nexport interface LeaderboardEntryLike {\n /** Kept for API compatibility with the backend's ordered response — not\n * rendered. This is a scoreboard, not a ranking: no \"#1/#2/#3\", no podium\n * colors. Order in the array is still the sort order the caller gets. */\n rank: number;\n address: string;\n publicId?: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface LeaderboardTableProps {\n entries: LeaderboardEntryLike[];\n /** The viewer's address — its row gets highlighted. */\n highlightAddress?: string | null;\n /** Render the address cell (e.g. a profile link). Defaults to a shortened address. */\n renderAddress?: (address: string) => ReactNode;\n className?: string;\n}\n\n/** Scoreboard rows: address, level chip, points. No position number or\n * podium coloring — this celebrates participation, not competition. */\nexport function LeaderboardTable({ entries, highlightAddress, renderAddress, className }: LeaderboardTableProps) {\n return (\n <div className={cn(\"overflow-hidden rounded-xl border border-border\", className)}>\n {entries.map((e) => {\n const isViewer = highlightAddress != null && e.address === highlightAddress;\n return (\n <div\n key={e.address}\n className={cn(\n \"flex items-center gap-3 border-b border-border/60 bg-card px-3 py-2.5 last:border-b-0 sm:px-4\",\n isViewer && \"bg-primary/10\"\n )}\n >\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n {isViewer && <span className=\"ml-1.5 text-xs text-muted-foreground\">(you)</span>}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" className=\"hidden sm:inline-flex\" />\n <span className=\"shrink-0 text-sm font-semibold tabular-nums\">{e.totalXp.toLocaleString()} pts</span>\n </div>\n );\n })}\n </div>\n );\n}\n\nexport interface LeaderboardWidgetProps {\n entries: LeaderboardEntryLike[];\n title?: string;\n /** Link to the full scoreboard (\"/rewards\"). */\n href?: string;\n renderAddress?: (address: string) => ReactNode;\n className?: string;\n}\n\n/** Compact card for homepage/discover rails — same no-ranking scoreboard rows. */\nexport function LeaderboardWidget({ entries, title = \"Community Rewards\", href, renderAddress, className }: LeaderboardWidgetProps) {\n if (entries.length === 0) return null;\n return (\n <section className={cn(\"rounded-xl border border-border bg-card p-4 sm:p-5\", className)}>\n <div className=\"mb-3 flex items-center justify-between\">\n <h2 className=\"text-base font-black\">{title}</h2>\n {href && (\n <a href={href} className=\"text-xs font-semibold text-muted-foreground active:opacity-70\">\n View scoreboard →\n </a>\n )}\n </div>\n <ol className=\"space-y-2.5\">\n {entries.map((e) => (\n <li key={e.address} className=\"flex items-center gap-2.5\">\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" />\n </li>\n ))}\n </ol>\n </section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA0CY;AAzCZ,gBAAmB;AACnB,qBAA+B;AAC/B,yBAA2B;AA0BpB,SAA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EAAE,cAAc,MAAM,EAAE,kBAAkB,YAAY,EAAE,YAAY,MAAK,MAAK;AAAA,SAJ1F,EAAE,OAKX,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -2,6 +2,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
interface LeaderboardEntryLike {
|
|
5
|
+
/** Kept for API compatibility with the backend's ordered response — not
|
|
6
|
+
* rendered. This is a scoreboard, not a ranking: no "#1/#2/#3", no podium
|
|
7
|
+
* colors. Order in the array is still the sort order the caller gets. */
|
|
5
8
|
rank: number;
|
|
6
9
|
address: string;
|
|
7
10
|
publicId?: string | null;
|
|
@@ -18,17 +21,18 @@ interface LeaderboardTableProps {
|
|
|
18
21
|
renderAddress?: (address: string) => ReactNode;
|
|
19
22
|
className?: string;
|
|
20
23
|
}
|
|
21
|
-
/**
|
|
24
|
+
/** Scoreboard rows: address, level chip, points. No position number or
|
|
25
|
+
* podium coloring — this celebrates participation, not competition. */
|
|
22
26
|
declare function LeaderboardTable({ entries, highlightAddress, renderAddress, className }: LeaderboardTableProps): react_jsx_runtime.JSX.Element;
|
|
23
27
|
interface LeaderboardWidgetProps {
|
|
24
28
|
entries: LeaderboardEntryLike[];
|
|
25
29
|
title?: string;
|
|
26
|
-
/** Link to the full
|
|
30
|
+
/** Link to the full scoreboard ("/rewards"). */
|
|
27
31
|
href?: string;
|
|
28
32
|
renderAddress?: (address: string) => ReactNode;
|
|
29
33
|
className?: string;
|
|
30
34
|
}
|
|
31
|
-
/** Compact
|
|
35
|
+
/** Compact card for homepage/discover rails — same no-ranking scoreboard rows. */
|
|
32
36
|
declare function LeaderboardWidget({ entries, title, href, renderAddress, className }: LeaderboardWidgetProps): react_jsx_runtime.JSX.Element | null;
|
|
33
37
|
|
|
34
38
|
export { type LeaderboardEntryLike, LeaderboardTable, type LeaderboardTableProps, LeaderboardWidget, type LeaderboardWidgetProps };
|
|
@@ -2,6 +2,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
|
|
4
4
|
interface LeaderboardEntryLike {
|
|
5
|
+
/** Kept for API compatibility with the backend's ordered response — not
|
|
6
|
+
* rendered. This is a scoreboard, not a ranking: no "#1/#2/#3", no podium
|
|
7
|
+
* colors. Order in the array is still the sort order the caller gets. */
|
|
5
8
|
rank: number;
|
|
6
9
|
address: string;
|
|
7
10
|
publicId?: string | null;
|
|
@@ -18,17 +21,18 @@ interface LeaderboardTableProps {
|
|
|
18
21
|
renderAddress?: (address: string) => ReactNode;
|
|
19
22
|
className?: string;
|
|
20
23
|
}
|
|
21
|
-
/**
|
|
24
|
+
/** Scoreboard rows: address, level chip, points. No position number or
|
|
25
|
+
* podium coloring — this celebrates participation, not competition. */
|
|
22
26
|
declare function LeaderboardTable({ entries, highlightAddress, renderAddress, className }: LeaderboardTableProps): react_jsx_runtime.JSX.Element;
|
|
23
27
|
interface LeaderboardWidgetProps {
|
|
24
28
|
entries: LeaderboardEntryLike[];
|
|
25
29
|
title?: string;
|
|
26
|
-
/** Link to the full
|
|
30
|
+
/** Link to the full scoreboard ("/rewards"). */
|
|
27
31
|
href?: string;
|
|
28
32
|
renderAddress?: (address: string) => ReactNode;
|
|
29
33
|
className?: string;
|
|
30
34
|
}
|
|
31
|
-
/** Compact
|
|
35
|
+
/** Compact card for homepage/discover rails — same no-ranking scoreboard rows. */
|
|
32
36
|
declare function LeaderboardWidget({ entries, title, href, renderAddress, className }: LeaderboardWidgetProps): react_jsx_runtime.JSX.Element | null;
|
|
33
37
|
|
|
34
38
|
export { type LeaderboardEntryLike, LeaderboardTable, type LeaderboardTableProps, LeaderboardWidget, type LeaderboardWidgetProps };
|
|
@@ -2,15 +2,8 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
3
|
import { shortenAddress } from "../../utils/address.js";
|
|
4
4
|
import { LevelBadge } from "./level-badge.js";
|
|
5
|
-
function rankAccent(rank) {
|
|
6
|
-
if (rank === 1) return "#f59e0b";
|
|
7
|
-
if (rank === 2) return "#94a3b8";
|
|
8
|
-
if (rank === 3) return "#b45309";
|
|
9
|
-
return null;
|
|
10
|
-
}
|
|
11
5
|
function LeaderboardTable({ entries, highlightAddress, renderAddress, className }) {
|
|
12
6
|
return /* @__PURE__ */ jsx("div", { className: cn("overflow-hidden rounded-xl border border-border", className), children: entries.map((e) => {
|
|
13
|
-
const accent = rankAccent(e.rank);
|
|
14
7
|
const isViewer = highlightAddress != null && e.address === highlightAddress;
|
|
15
8
|
return /* @__PURE__ */ jsxs(
|
|
16
9
|
"div",
|
|
@@ -20,14 +13,6 @@ function LeaderboardTable({ entries, highlightAddress, renderAddress, className
|
|
|
20
13
|
isViewer && "bg-primary/10"
|
|
21
14
|
),
|
|
22
15
|
children: [
|
|
23
|
-
/* @__PURE__ */ jsx(
|
|
24
|
-
"span",
|
|
25
|
-
{
|
|
26
|
-
className: "w-8 shrink-0 text-center text-sm font-black tabular-nums",
|
|
27
|
-
style: accent ? { color: accent } : void 0,
|
|
28
|
-
children: e.rank
|
|
29
|
-
}
|
|
30
|
-
),
|
|
31
16
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", children: [
|
|
32
17
|
renderAddress ? renderAddress(e.address) : shortenAddress(e.address),
|
|
33
18
|
isViewer && /* @__PURE__ */ jsx("span", { className: "ml-1.5 text-xs text-muted-foreground", children: "(you)" })
|
|
@@ -35,7 +20,7 @@ function LeaderboardTable({ entries, highlightAddress, renderAddress, className
|
|
|
35
20
|
/* @__PURE__ */ jsx(LevelBadge, { level: e.currentLevel, name: e.currentLevelName, badgeColor: e.badgeColor, size: "sm", className: "hidden sm:inline-flex" }),
|
|
36
21
|
/* @__PURE__ */ jsxs("span", { className: "shrink-0 text-sm font-semibold tabular-nums", children: [
|
|
37
22
|
e.totalXp.toLocaleString(),
|
|
38
|
-
"
|
|
23
|
+
" pts"
|
|
39
24
|
] })
|
|
40
25
|
]
|
|
41
26
|
},
|
|
@@ -43,22 +28,14 @@ function LeaderboardTable({ entries, highlightAddress, renderAddress, className
|
|
|
43
28
|
);
|
|
44
29
|
}) });
|
|
45
30
|
}
|
|
46
|
-
function LeaderboardWidget({ entries, title = "
|
|
31
|
+
function LeaderboardWidget({ entries, title = "Community Rewards", href, renderAddress, className }) {
|
|
47
32
|
if (entries.length === 0) return null;
|
|
48
33
|
return /* @__PURE__ */ jsxs("section", { className: cn("rounded-xl border border-border bg-card p-4 sm:p-5", className), children: [
|
|
49
34
|
/* @__PURE__ */ jsxs("div", { className: "mb-3 flex items-center justify-between", children: [
|
|
50
35
|
/* @__PURE__ */ jsx("h2", { className: "text-base font-black", children: title }),
|
|
51
|
-
href && /* @__PURE__ */ jsx("a", { href, className: "text-xs font-semibold text-muted-foreground active:opacity-70", children: "View
|
|
36
|
+
href && /* @__PURE__ */ jsx("a", { href, className: "text-xs font-semibold text-muted-foreground active:opacity-70", children: "View scoreboard \u2192" })
|
|
52
37
|
] }),
|
|
53
38
|
/* @__PURE__ */ jsx("ol", { className: "space-y-2.5", children: entries.map((e) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2.5", children: [
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
55
|
-
"span",
|
|
56
|
-
{
|
|
57
|
-
className: "w-5 shrink-0 text-center text-sm font-black tabular-nums",
|
|
58
|
-
style: rankAccent(e.rank) ? { color: rankAccent(e.rank) } : void 0,
|
|
59
|
-
children: e.rank
|
|
60
|
-
}
|
|
61
|
-
),
|
|
62
39
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1 truncate text-sm font-medium", children: renderAddress ? renderAddress(e.address) : shortenAddress(e.address) }),
|
|
63
40
|
/* @__PURE__ */ jsx(LevelBadge, { level: e.currentLevel, name: e.currentLevelName, badgeColor: e.badgeColor, size: "sm" })
|
|
64
41
|
] }, e.address)) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/rewards/leaderboard-table.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { shortenAddress } from \"../../utils/address.js\";\nimport { LevelBadge } from \"./level-badge.js\";\n\nexport interface LeaderboardEntryLike {\n rank: number;\n address: string;\n publicId?: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface LeaderboardTableProps {\n entries: LeaderboardEntryLike[];\n /** The viewer's address — its row gets highlighted. */\n highlightAddress?: string | null;\n /** Render the address cell (e.g. a profile link). Defaults to a shortened address. */\n renderAddress?: (address: string) => ReactNode;\n className?: string;\n}\n\
|
|
1
|
+
{"version":3,"sources":["../../../src/components/rewards/leaderboard-table.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../../utils/cn.js\";\nimport { shortenAddress } from \"../../utils/address.js\";\nimport { LevelBadge } from \"./level-badge.js\";\n\nexport interface LeaderboardEntryLike {\n /** Kept for API compatibility with the backend's ordered response — not\n * rendered. This is a scoreboard, not a ranking: no \"#1/#2/#3\", no podium\n * colors. Order in the array is still the sort order the caller gets. */\n rank: number;\n address: string;\n publicId?: string | null;\n totalXp: number;\n currentLevel: number;\n currentLevelName: string;\n badgeColor: string;\n}\n\nexport interface LeaderboardTableProps {\n entries: LeaderboardEntryLike[];\n /** The viewer's address — its row gets highlighted. */\n highlightAddress?: string | null;\n /** Render the address cell (e.g. a profile link). Defaults to a shortened address. */\n renderAddress?: (address: string) => ReactNode;\n className?: string;\n}\n\n/** Scoreboard rows: address, level chip, points. No position number or\n * podium coloring — this celebrates participation, not competition. */\nexport function LeaderboardTable({ entries, highlightAddress, renderAddress, className }: LeaderboardTableProps) {\n return (\n <div className={cn(\"overflow-hidden rounded-xl border border-border\", className)}>\n {entries.map((e) => {\n const isViewer = highlightAddress != null && e.address === highlightAddress;\n return (\n <div\n key={e.address}\n className={cn(\n \"flex items-center gap-3 border-b border-border/60 bg-card px-3 py-2.5 last:border-b-0 sm:px-4\",\n isViewer && \"bg-primary/10\"\n )}\n >\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n {isViewer && <span className=\"ml-1.5 text-xs text-muted-foreground\">(you)</span>}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" className=\"hidden sm:inline-flex\" />\n <span className=\"shrink-0 text-sm font-semibold tabular-nums\">{e.totalXp.toLocaleString()} pts</span>\n </div>\n );\n })}\n </div>\n );\n}\n\nexport interface LeaderboardWidgetProps {\n entries: LeaderboardEntryLike[];\n title?: string;\n /** Link to the full scoreboard (\"/rewards\"). */\n href?: string;\n renderAddress?: (address: string) => ReactNode;\n className?: string;\n}\n\n/** Compact card for homepage/discover rails — same no-ranking scoreboard rows. */\nexport function LeaderboardWidget({ entries, title = \"Community Rewards\", href, renderAddress, className }: LeaderboardWidgetProps) {\n if (entries.length === 0) return null;\n return (\n <section className={cn(\"rounded-xl border border-border bg-card p-4 sm:p-5\", className)}>\n <div className=\"mb-3 flex items-center justify-between\">\n <h2 className=\"text-base font-black\">{title}</h2>\n {href && (\n <a href={href} className=\"text-xs font-semibold text-muted-foreground active:opacity-70\">\n View scoreboard →\n </a>\n )}\n </div>\n <ol className=\"space-y-2.5\">\n {entries.map((e) => (\n <li key={e.address} className=\"flex items-center gap-2.5\">\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium\">\n {renderAddress ? renderAddress(e.address) : shortenAddress(e.address)}\n </span>\n <LevelBadge level={e.currentLevel} name={e.currentLevelName} badgeColor={e.badgeColor} size=\"sm\" />\n </li>\n ))}\n </ol>\n </section>\n );\n}\n"],"mappings":"AA0CY,SAEe,KAFf;AAzCZ,SAAS,UAAU;AACnB,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AA0BpB,SAAS,iBAAiB,EAAE,SA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kBAAkB,YAAY,EAAE,YAAY,MAAK,MAAK;AAAA,SAJ1F,EAAE,OAKX,CACD,GACH;AAAA,KACF;AAEJ;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -51,6 +51,7 @@ __export(index_exports, {
|
|
|
51
51
|
CurrencyIcon: () => import_currency_icon.CurrencyIcon,
|
|
52
52
|
DERIVATIVES_OPTIONS: () => import_ip.DERIVATIVES_OPTIONS,
|
|
53
53
|
DOC_UPLOAD: () => import_ip_templates.DOC_UPLOAD,
|
|
54
|
+
DiscoverActivityStrip: () => import_discover_feed_section.DiscoverActivityStrip,
|
|
54
55
|
DiscoverCollectionsStrip: () => import_discover_collections_strip.DiscoverCollectionsStrip,
|
|
55
56
|
DiscoverCreatorsStrip: () => import_discover_creators_strip.DiscoverCreatorsStrip,
|
|
56
57
|
DiscoverFeedSection: () => import_discover_feed_section.DiscoverFeedSection,
|
|
@@ -229,6 +230,7 @@ var import_load_more_sentinel = require("./components/load-more-sentinel.js");
|
|
|
229
230
|
CurrencyIcon,
|
|
230
231
|
DERIVATIVES_OPTIONS,
|
|
231
232
|
DOC_UPLOAD,
|
|
233
|
+
DiscoverActivityStrip,
|
|
232
234
|
DiscoverCollectionsStrip,
|
|
233
235
|
DiscoverCreatorsStrip,
|
|
234
236
|
DiscoverFeedSection,
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\nexport { CurrencyIcon, CurrencyAmount } from \"./components/currency-icon.js\";\nexport type { CurrencyIconProps, CurrencyAmountProps } from \"./components/currency-icon.js\";\n\nexport { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./components/ip-type-badge.js\";\nexport type { IpTypeBadgeProps, IpTypeConfig } from \"./components/ip-type-badge.js\";\n\nexport { AddressDisplay } from \"./components/address-display.js\";\nexport type { AddressDisplayProps } from \"./components/address-display.js\";\n\nexport { MedialaneIcon } from \"./components/brand-icon.js\";\nexport type { MedialaneIconProps } from \"./components/brand-icon.js\";\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES, useLaunchpadFilter } from \"./components/launchpad-services.js\";\nexport { LaunchpadFilterBar } from \"./components/launchpad-filter-bar.js\";\nexport type { LaunchpadFilterBarProps } from \"./components/launchpad-filter-bar.js\";\nexport { LaunchpadStrip } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadStripProps } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceCategory, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.6.0 additions — portfolio subnav + counts ────────────────────────────\nexport { PortfolioSubnav } from \"./components/portfolio-subnav.js\";\nexport type {\n PortfolioSubnavProps,\n PortfolioNavItem,\n PortfolioNavGroup,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-subnav.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n\n// Rewards score kit (v0.36.0)\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelLadder } from \"./components/rewards/level-ladder.js\";\nexport type { LevelLadderProps } from \"./components/rewards/level-ladder.js\";\nexport { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\n\n// ── v0.37.0 additions — infinite-scroll trigger ──────────────────────────────\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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2B;AAE3B,gCAAiC;AAEjC,+BAAoD;AAEpD,0BAA4B;AAE5B,8BAA+B;AAI/B,gCAAiC;","names":["import_launchpad_services"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\nexport { CurrencyIcon, CurrencyAmount } from \"./components/currency-icon.js\";\nexport type { CurrencyIconProps, CurrencyAmountProps } from \"./components/currency-icon.js\";\n\nexport { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./components/ip-type-badge.js\";\nexport type { IpTypeBadgeProps, IpTypeConfig } from \"./components/ip-type-badge.js\";\n\nexport { AddressDisplay } from \"./components/address-display.js\";\nexport type { AddressDisplayProps } from \"./components/address-display.js\";\n\nexport { MedialaneIcon } from \"./components/brand-icon.js\";\nexport type { MedialaneIconProps } from \"./components/brand-icon.js\";\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection, DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps, DiscoverActivityStripProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES, useLaunchpadFilter } from \"./components/launchpad-services.js\";\nexport { LaunchpadFilterBar } from \"./components/launchpad-filter-bar.js\";\nexport type { LaunchpadFilterBarProps } from \"./components/launchpad-filter-bar.js\";\nexport { LaunchpadStrip } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadStripProps } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceCategory, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.6.0 additions — portfolio subnav + counts ────────────────────────────\nexport { PortfolioSubnav } from \"./components/portfolio-subnav.js\";\nexport type {\n PortfolioSubnavProps,\n PortfolioNavItem,\n PortfolioNavGroup,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-subnav.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n\n// Rewards score kit (v0.36.0)\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelLadder } from \"./components/rewards/level-ladder.js\";\nexport type { LevelLadderProps } from \"./components/rewards/level-ladder.js\";\nexport { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\n\n// ── v0.37.0 additions — infinite-scroll trigger ──────────────────────────────\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,gBAAmB;AACnB,oBAAsD;AACtD,qBAA+B;AAC/B,kBAA2B;AAC3B,6BAA+B;AAG/B,sBAA+C;AAE/C,gBAGO;AAEP,0BAEO;AAEP,6BAA8B;AAC9B,oCAAqC;AACrC,mCAAoC;AACpC,+BAAgC;AAChC,uCAAwC;AAExC,gCAAsE;AACtE,kCAAmC;AAEnC,iCAAkC;AAElC,qCAAsC;AAEtC,mBAAsB;AAGtB,2BAA6C;AAG7C,2BAAyD;AAGzD,6BAA+B;AAG/B,wBAA8B;AAE9B,wBAAkC;AAIlC,+BAAyF;AACzF,4BAA8B;AAE9B,4BAA8B;AAE9B,0BAA4B;AAE5B,6BAAuD;AAEvD,wBAA6C;AAE7C,wBAA6C;AAG7C,mBAGO;AACP,uBAA2F;AAC3F,4BAGO;AAGP,kBAAmC;AACnC,sBAAmD;AAEnD,yBAA+C;AAE/C,6BAA+B;AAE/B,0BAAiD;AAEjD,0BAA4B;AAE5B,iCAAkC;AAElC,2BAA4B;AAI5B,2BAA6B;AAE7B,+BAA2D;AAE3D,wCAAyC;AAEzC,qCAAsC;AAEtC,mCAA2D;AAE3D,2BAAsE;AAItE,gCAAiG;AACjG,kCAAmC;AAEnC,6BAA+B;AAG/B,IAAAA,6BAAwE;AAIxE,8BAAkD;AAIlD,8BAAgC;AAOhC,8BAAsC;AAOtC,4BAA8B;AAE9B,wBAA0B;AAM1B,gCAAiC;AAEjC,sBAAwB;AAIxB,yBAA2B;AAE3B,yBAA2B;AAE3B,yBAA2B;AAE3B,gCAAiC;AAEjC,+BAAoD;AAEpD,0BAA4B;AAE5B,8BAA+B;AAI/B,gCAAiC;","names":["import_launchpad_services"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -43,7 +43,7 @@ export { DiscoverHero, DiscoverHeroProps } from './components/discover-hero.cjs'
|
|
|
43
43
|
export { FeaturedCarousel, FeaturedCarouselProps, FeaturedCarouselSkeleton } from './components/featured-carousel.cjs';
|
|
44
44
|
export { DiscoverCollectionsStrip, DiscoverCollectionsStripProps } from './components/discover-collections-strip.cjs';
|
|
45
45
|
export { DiscoverCreatorsStrip, DiscoverCreatorsStripProps } from './components/discover-creators-strip.cjs';
|
|
46
|
-
export { DiscoverFeedSection, DiscoverFeedSectionProps } from './components/discover-feed-section.cjs';
|
|
46
|
+
export { DiscoverActivityStrip, DiscoverActivityStripProps, DiscoverFeedSection, DiscoverFeedSectionProps } from './components/discover-feed-section.cjs';
|
|
47
47
|
export { ACTIVITY_MESSAGES, ActivityCard, ActivityCardProps, ActivityCardSkeleton } from './components/activity-card.cjs';
|
|
48
48
|
export { LaunchpadGroupedSections, LaunchpadGroupedSectionsProps, LaunchpadServiceCard, LaunchpadServiceCardProps, SERVICE_HUES, ServiceOverride, ServiceOverrides, useLaunchpadFilter } from './components/launchpad-services.cjs';
|
|
49
49
|
export { LaunchpadFilterBar, LaunchpadFilterBarProps } from './components/launchpad-filter-bar.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ export { DiscoverHero, DiscoverHeroProps } from './components/discover-hero.js';
|
|
|
43
43
|
export { FeaturedCarousel, FeaturedCarouselProps, FeaturedCarouselSkeleton } from './components/featured-carousel.js';
|
|
44
44
|
export { DiscoverCollectionsStrip, DiscoverCollectionsStripProps } from './components/discover-collections-strip.js';
|
|
45
45
|
export { DiscoverCreatorsStrip, DiscoverCreatorsStripProps } from './components/discover-creators-strip.js';
|
|
46
|
-
export { DiscoverFeedSection, DiscoverFeedSectionProps } from './components/discover-feed-section.js';
|
|
46
|
+
export { DiscoverActivityStrip, DiscoverActivityStripProps, DiscoverFeedSection, DiscoverFeedSectionProps } from './components/discover-feed-section.js';
|
|
47
47
|
export { ACTIVITY_MESSAGES, ActivityCard, ActivityCardProps, ActivityCardSkeleton } from './components/activity-card.js';
|
|
48
48
|
export { LaunchpadGroupedSections, LaunchpadGroupedSectionsProps, LaunchpadServiceCard, LaunchpadServiceCardProps, SERVICE_HUES, ServiceOverride, ServiceOverrides, useLaunchpadFilter } from './components/launchpad-services.js';
|
|
49
49
|
export { LaunchpadFilterBar, LaunchpadFilterBarProps } from './components/launchpad-filter-bar.js';
|
package/dist/index.js
CHANGED
|
@@ -62,7 +62,7 @@ import { DiscoverHero } from "./components/discover-hero.js";
|
|
|
62
62
|
import { FeaturedCarousel, FeaturedCarouselSkeleton } from "./components/featured-carousel.js";
|
|
63
63
|
import { DiscoverCollectionsStrip } from "./components/discover-collections-strip.js";
|
|
64
64
|
import { DiscoverCreatorsStrip } from "./components/discover-creators-strip.js";
|
|
65
|
-
import { DiscoverFeedSection } from "./components/discover-feed-section.js";
|
|
65
|
+
import { DiscoverFeedSection, DiscoverActivityStrip } from "./components/discover-feed-section.js";
|
|
66
66
|
import { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from "./components/activity-card.js";
|
|
67
67
|
import { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES, useLaunchpadFilter } from "./components/launchpad-services.js";
|
|
68
68
|
import { LaunchpadFilterBar } from "./components/launchpad-filter-bar.js";
|
|
@@ -117,6 +117,7 @@ export {
|
|
|
117
117
|
CurrencyIcon,
|
|
118
118
|
DERIVATIVES_OPTIONS,
|
|
119
119
|
DOC_UPLOAD,
|
|
120
|
+
DiscoverActivityStrip,
|
|
120
121
|
DiscoverCollectionsStrip,
|
|
121
122
|
DiscoverCreatorsStrip,
|
|
122
123
|
DiscoverFeedSection,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\nexport { CurrencyIcon, CurrencyAmount } from \"./components/currency-icon.js\";\nexport type { CurrencyIconProps, CurrencyAmountProps } from \"./components/currency-icon.js\";\n\nexport { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./components/ip-type-badge.js\";\nexport type { IpTypeBadgeProps, IpTypeConfig } from \"./components/ip-type-badge.js\";\n\nexport { AddressDisplay } from \"./components/address-display.js\";\nexport type { AddressDisplayProps } from \"./components/address-display.js\";\n\nexport { MedialaneIcon } from \"./components/brand-icon.js\";\nexport type { MedialaneIconProps } from \"./components/brand-icon.js\";\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES, useLaunchpadFilter } from \"./components/launchpad-services.js\";\nexport { LaunchpadFilterBar } from \"./components/launchpad-filter-bar.js\";\nexport type { LaunchpadFilterBarProps } from \"./components/launchpad-filter-bar.js\";\nexport { LaunchpadStrip } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadStripProps } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceCategory, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.6.0 additions — portfolio subnav + counts ────────────────────────────\nexport { PortfolioSubnav } from \"./components/portfolio-subnav.js\";\nexport type {\n PortfolioSubnavProps,\n PortfolioNavItem,\n PortfolioNavGroup,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-subnav.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n\n// Rewards score kit (v0.36.0)\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelLadder } from \"./components/rewards/level-ladder.js\";\nexport type { LevelLadderProps } from \"./components/rewards/level-ladder.js\";\nexport { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\n\n// ── v0.37.0 additions — infinite-scroll trigger ──────────────────────────────\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAG/B,SAAS,cAAc,wBAAwB;AAE/C;AAAA,EACE;AAAA,EAAU;AAAA,EAAe;AAAA,EAAmB;AAAA,EAC5C;AAAA,EAAqB;AAAA,OAChB;AAEP;AAAA,EACE;AAAA,EAAc;AAAA,EAAqB;AAAA,EAAsB;AAAA,EAAsB;AAAA,OAC1E;AAEP,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC,SAAS,kBAAkB,kBAAkB,yBAAyB;AACtE,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,aAAa;AAGtB,SAAS,cAAc,sBAAsB;AAG7C,SAAS,aAAa,gBAAgB,mBAAmB;AAGzD,SAAS,sBAAsB;AAG/B,SAAS,qBAAqB;AAE9B,SAAS,yBAAyB;AAIlC,SAAS,YAAY,QAAQ,SAAS,aAAa,cAAc,QAAQ,gBAAgB;AACzF,SAAS,qBAAqB;AAE9B,SAAS,qBAAqB;AAE9B,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB,8BAA8B;AAEvD,SAAS,WAAW,yBAAyB;AAE7C,SAAS,WAAW,yBAAyB;AAG7C;AAAA,EACE;AAAA,EAAU;AAAA,EAAiB;AAAA,OAEtB;AACP,SAAS,UAAU,SAAS,wBAA+D;AAC3F;AAAA,EACE;AAAA,OAEK;AAGP,SAAS,SAAS,iBAAiB;AACnC,SAAS,sBAAsB,oBAAoB;AAEnD,SAAS,YAAY,0BAA0B;AAE/C,SAAS,sBAAsB;AAE/B,SAAS,aAAa,2BAA2B;AAEjD,SAAS,mBAAmB;AAE5B,SAAS,yBAAyB;AAElC,SAAS,mBAAmB;AAI5B,SAAS,oBAAoB;AAE7B,SAAS,kBAAkB,gCAAgC;AAE3D,SAAS,gCAAgC;AAEzC,SAAS,6BAA6B;AAEtC,SAAS,2BAA2B;AAEpC,SAAS,cAAc,sBAAsB,yBAAyB;AAItE,SAAS,0BAA0B,sBAAsB,cAAc,0BAA0B;AACjG,SAAS,0BAA0B;AAEnC,SAAS,sBAAsB;AAG/B,SAAS,+BAA+B,gCAAgC;AAIxE,SAAS,gBAAgB,yBAAyB;AAIlD,SAAS,uBAAuB;AAOhC,SAAS,6BAA6B;AAOtC,SAAS,qBAAqB;AAE9B,SAAS,iBAAiB;AAM1B,SAAS,wBAAwB;AAEjC,SAAS,eAAe;AAIxB,SAAS,kBAAkB;AAE3B,SAAS,kBAAkB;AAE3B,SAAS,kBAAkB;AAE3B,SAAS,wBAAwB;AAEjC,SAAS,kBAAkB,yBAAyB;AAEpD,SAAS,mBAAmB;AAE5B,SAAS,sBAAsB;AAI/B,SAAS,wBAAwB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\nexport { CurrencyIcon, CurrencyAmount } from \"./components/currency-icon.js\";\nexport type { CurrencyIconProps, CurrencyAmountProps } from \"./components/currency-icon.js\";\n\nexport { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./components/ip-type-badge.js\";\nexport type { IpTypeBadgeProps, IpTypeConfig } from \"./components/ip-type-badge.js\";\n\nexport { AddressDisplay } from \"./components/address-display.js\";\nexport type { AddressDisplayProps } from \"./components/address-display.js\";\n\nexport { MedialaneIcon } from \"./components/brand-icon.js\";\nexport type { MedialaneIconProps } from \"./components/brand-icon.js\";\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection, DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps, DiscoverActivityStripProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES, useLaunchpadFilter } from \"./components/launchpad-services.js\";\nexport { LaunchpadFilterBar } from \"./components/launchpad-filter-bar.js\";\nexport type { LaunchpadFilterBarProps } from \"./components/launchpad-filter-bar.js\";\nexport { LaunchpadStrip } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadStripProps } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceCategory, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.6.0 additions — portfolio subnav + counts ────────────────────────────\nexport { PortfolioSubnav } from \"./components/portfolio-subnav.js\";\nexport type {\n PortfolioSubnavProps,\n PortfolioNavItem,\n PortfolioNavGroup,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-subnav.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n\n// Rewards score kit (v0.36.0)\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelLadder } from \"./components/rewards/level-ladder.js\";\nexport type { LevelLadderProps } from \"./components/rewards/level-ladder.js\";\nexport { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\n\n// ── v0.37.0 additions — infinite-scroll trigger ──────────────────────────────\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n"],"mappings":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAG/B,SAAS,cAAc,wBAAwB;AAE/C;AAAA,EACE;AAAA,EAAU;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