@medialane/ui 0.104.0 → 0.106.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/components/asset-collection-bar.cjs +1 -1
  2. package/dist/components/asset-collection-bar.cjs.map +1 -1
  3. package/dist/components/asset-collection-bar.js +1 -1
  4. package/dist/components/asset-collection-bar.js.map +1 -1
  5. package/dist/components/asset-lightbox.cjs +66 -0
  6. package/dist/components/asset-lightbox.cjs.map +1 -0
  7. package/dist/components/asset-lightbox.d.cts +11 -0
  8. package/dist/components/asset-lightbox.d.ts +11 -0
  9. package/dist/components/asset-lightbox.js +42 -0
  10. package/dist/components/asset-lightbox.js.map +1 -0
  11. package/dist/components/asset-marketplace-panel.cjs +19 -9
  12. package/dist/components/asset-marketplace-panel.cjs.map +1 -1
  13. package/dist/components/asset-marketplace-panel.js +19 -9
  14. package/dist/components/asset-marketplace-panel.js.map +1 -1
  15. package/dist/components/club-owner-actions.cjs +56 -0
  16. package/dist/components/club-owner-actions.cjs.map +1 -0
  17. package/dist/components/club-owner-actions.d.cts +11 -0
  18. package/dist/components/club-owner-actions.d.ts +11 -0
  19. package/dist/components/club-owner-actions.js +22 -0
  20. package/dist/components/club-owner-actions.js.map +1 -0
  21. package/dist/components/collection-hero-banner.cjs +114 -0
  22. package/dist/components/collection-hero-banner.cjs.map +1 -0
  23. package/dist/components/collection-hero-banner.d.cts +26 -0
  24. package/dist/components/collection-hero-banner.d.ts +26 -0
  25. package/dist/components/collection-hero-banner.js +90 -0
  26. package/dist/components/collection-hero-banner.js.map +1 -0
  27. package/dist/components/create-form-primitives.cjs +61 -0
  28. package/dist/components/create-form-primitives.cjs.map +1 -0
  29. package/dist/components/create-form-primitives.d.cts +16 -0
  30. package/dist/components/create-form-primitives.d.ts +16 -0
  31. package/dist/components/create-form-primitives.js +36 -0
  32. package/dist/components/create-form-primitives.js.map +1 -0
  33. package/dist/components/creation-record.cjs +86 -0
  34. package/dist/components/creation-record.cjs.map +1 -0
  35. package/dist/components/creation-record.d.cts +14 -0
  36. package/dist/components/creation-record.d.ts +14 -0
  37. package/dist/components/creation-record.js +52 -0
  38. package/dist/components/creation-record.js.map +1 -0
  39. package/dist/components/dialog.d.cts +9 -9
  40. package/dist/components/dialog.d.ts +9 -9
  41. package/dist/components/ip-type-fields.cjs +307 -0
  42. package/dist/components/ip-type-fields.cjs.map +1 -0
  43. package/dist/components/ip-type-fields.d.cts +17 -0
  44. package/dist/components/ip-type-fields.d.ts +17 -0
  45. package/dist/components/ip-type-fields.js +293 -0
  46. package/dist/components/ip-type-fields.js.map +1 -0
  47. package/dist/components/json-ld.cjs +39 -0
  48. package/dist/components/json-ld.cjs.map +1 -0
  49. package/dist/components/json-ld.d.cts +8 -0
  50. package/dist/components/json-ld.d.ts +8 -0
  51. package/dist/components/json-ld.js +15 -0
  52. package/dist/components/json-ld.js.map +1 -0
  53. package/dist/components/nav-theme-toggle.cjs +66 -0
  54. package/dist/components/nav-theme-toggle.cjs.map +1 -0
  55. package/dist/components/nav-theme-toggle.d.cts +9 -0
  56. package/dist/components/nav-theme-toggle.d.ts +9 -0
  57. package/dist/components/nav-theme-toggle.js +42 -0
  58. package/dist/components/nav-theme-toggle.js.map +1 -0
  59. package/dist/components/order-sort-control.cjs +58 -0
  60. package/dist/components/order-sort-control.cjs.map +1 -0
  61. package/dist/components/order-sort-control.d.cts +13 -0
  62. package/dist/components/order-sort-control.d.ts +13 -0
  63. package/dist/components/order-sort-control.js +39 -0
  64. package/dist/components/order-sort-control.js.map +1 -0
  65. package/dist/components/price-history-chart.cjs +130 -0
  66. package/dist/components/price-history-chart.cjs.map +1 -0
  67. package/dist/components/price-history-chart.d.cts +9 -0
  68. package/dist/components/price-history-chart.d.ts +9 -0
  69. package/dist/components/price-history-chart.js +114 -0
  70. package/dist/components/price-history-chart.js.map +1 -0
  71. package/dist/components/sheet.cjs +160 -0
  72. package/dist/components/sheet.cjs.map +1 -0
  73. package/dist/components/sheet.d.cts +30 -0
  74. package/dist/components/sheet.d.ts +30 -0
  75. package/dist/components/sheet.js +117 -0
  76. package/dist/components/sheet.js.map +1 -0
  77. package/dist/components/textarea.cjs +57 -0
  78. package/dist/components/textarea.cjs.map +1 -0
  79. package/dist/components/textarea.d.cts +6 -0
  80. package/dist/components/textarea.d.ts +6 -0
  81. package/dist/components/textarea.js +23 -0
  82. package/dist/components/textarea.js.map +1 -0
  83. package/dist/index.cjs +70 -0
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.d.cts +15 -1
  86. package/dist/index.d.ts +15 -1
  87. package/dist/index.js +58 -0
  88. package/dist/index.js.map +1 -1
  89. package/dist/utils/format-activity.cjs +143 -0
  90. package/dist/utils/format-activity.cjs.map +1 -0
  91. package/dist/utils/format-activity.d.cts +14 -0
  92. package/dist/utils/format-activity.d.ts +14 -0
  93. package/dist/utils/format-activity.js +116 -0
  94. package/dist/utils/format-activity.js.map +1 -0
  95. package/dist/utils/proxy-body.cjs +60 -0
  96. package/dist/utils/proxy-body.cjs.map +1 -0
  97. package/dist/utils/proxy-body.d.cts +22 -0
  98. package/dist/utils/proxy-body.d.ts +22 -0
  99. package/dist/utils/proxy-body.js +36 -0
  100. package/dist/utils/proxy-body.js.map +1 -0
  101. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-marketplace-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport {\n ArrowRightLeft, CheckCircle, Clock, GitBranch, HandCoins, Handshake, Loader2,\n ShoppingCart, Tag, X,\n} from \"lucide-react\";\nimport { CurrencyIcon, CurrencyAmount } from \"./currency-icon.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { formatDisplayPrice, parsePriceDisplay } from \"../utils/format.js\";\nimport { timeUntil } from \"../utils/time.js\";\n\n/** Structural subset of `ApiOrder` (both apps' `@medialane/sdk` types satisfy this). */\nexport interface ApiOrderLike {\n orderHash: string;\n offerer: string;\n endTime: string;\n price: { formatted: string | null; currency: string | null };\n}\n\nexport interface AssetMarketplacePanelProps<T extends ApiOrderLike = ApiOrderLike> {\n cheapest?: T;\n isOwner: boolean;\n isSignedIn: boolean;\n isProcessing: boolean;\n isERC1155: boolean;\n isMarketLoading?: boolean;\n myListing: T | null;\n activeBids: T[];\n walletAddress?: string | null;\n remixEnabled?: boolean;\n showDealOption?: boolean;\n /** Raw \"0.07 STRK\"-style strings — already resolved by the caller. `null`/undefined renders \"—\". */\n floorPriceRaw?: string | null;\n lastSaleRaw?: string | null;\n /** Renders the sign-in/connect-wallet CTA for the given label (e.g. \"Sign in to trade\"). */\n renderAuthAction: (label: string) => ReactNode;\n /** Renders an inline help/info affordance for the given tooltip text. */\n renderHelp: (content: string) => ReactNode;\n onCancelClick: (order: T) => void;\n onAcceptBid: (order: T) => void;\n onOpenListing: () => void;\n onOpenTransfer: () => void;\n onOpenPurchase: (order: T) => void;\n onOpenOffer: () => void;\n onOpenRemix?: () => void;\n onProposeDeal?: () => void;\n /** Non-owner: propose a sponsorship deal on this asset. */\n showSponsorOption?: boolean;\n onOpenSponsorProposal?: () => void;\n /** Owner: open this asset for sponsorship bidding. */\n showSponsorSolicitOption?: boolean;\n onOpenSponsorSolicit?: () => void;\n}\n\n/** Floor + last-sale stats — each hides itself when its data is absent\n * (no dangling \"—\" placeholders), and the whole row disappears when\n * neither is available. */\nfunction StatRow({ floorPriceRaw, lastSaleRaw }: { floorPriceRaw?: string | null; lastSaleRaw?: string | null }) {\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n const lastSale = lastSaleRaw ? parsePriceDisplay(lastSaleRaw) : null;\n if (!floor?.symbol && !lastSale?.symbol) return null;\n return (\n <div className=\"flex items-center gap-4 text-sm text-muted-foreground\">\n {floor?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Floor</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n {lastSale?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Last sale</span>\n <CurrencyAmount amount={lastSale.numStr} symbol={lastSale.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n </div>\n );\n}\n\nexport function AssetMarketplacePanel<T extends ApiOrderLike = ApiOrderLike>({\n cheapest,\n isOwner,\n isSignedIn,\n isProcessing,\n isERC1155,\n isMarketLoading = false,\n myListing,\n activeBids,\n walletAddress,\n remixEnabled = false,\n showDealOption = false,\n showSponsorOption = false,\n onOpenSponsorProposal,\n showSponsorSolicitOption = false,\n onOpenSponsorSolicit,\n floorPriceRaw,\n lastSaleRaw,\n renderAuthAction,\n renderHelp,\n onCancelClick,\n onAcceptBid,\n onOpenListing,\n onOpenTransfer,\n onOpenPurchase,\n onOpenOffer,\n onOpenRemix,\n onProposeDeal,\n}: AssetMarketplacePanelProps<T>) {\n const myBid = !isOwner && walletAddress\n ? activeBids.find((bid) => bid.offerer.toLowerCase() === walletAddress.toLowerCase()) ?? null\n : null;\n\n const canBuyMore =\n isERC1155 && isOwner && !!cheapest && !!walletAddress &&\n cheapest.offerer.toLowerCase() !== walletAddress.toLowerCase();\n\n if (isMarketLoading && !cheapest) {\n return (\n <div className=\"space-y-4\">\n <div className=\"h-9 w-32 rounded-md bg-muted animate-pulse\" />\n <div className=\"h-12 w-full rounded-2xl bg-muted animate-pulse\" />\n </div>\n );\n }\n\n return (\n <div className=\"relative\">\n\n <div className=\"relative space-y-4\">\n {cheapest ? (\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap items-baseline gap-x-5 gap-y-1.5\">\n <div className=\"flex items-baseline gap-2\">\n <CurrencyIcon symbol={cheapest.price.currency ?? \"\"} size={26} />\n <span className=\"text-4xl font-bold tracking-tight\">\n {formatDisplayPrice(cheapest.price.formatted)}\n </span>\n {renderHelp(\n `${isOwner && !canBuyMore ? \"Your listing\" : \"Current price\"} · Expires ${timeUntil(cheapest.endTime)}`\n )}\n </div>\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n </div>\n\n {isOwner ? (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-2 gap-2\">\n {myListing ? (\n <ActionButton\n icon={isProcessing ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <X className=\"h-4 w-4\" />}\n onClick={() => onCancelClick(myListing)}\n disabled={isProcessing}\n tone=\"red\"\n renderHelp={renderHelp}\n >\n Cancel Listing\n </ActionButton>\n ) : null}\n {/* ERC-721 has exactly one possible listing — once myListing exists,\n \"List on Marketplace\" is redundant next to \"Cancel Listing\" and\n reads as a broken/confusing pair. An ERC-1155 owner can still hold\n un-listed editions while one listing is active, so it stays for them. */}\n {(!myListing || isERC1155) ? (\n <ActionButton tone=\"blue\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} renderHelp={renderHelp}>List on Marketplace</ActionButton>\n ) : null}\n <ActionButton tone=\"orange\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} renderHelp={renderHelp}>Transfer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n renderHelp={renderHelp}\n >\n Open for Sponsorship\n </ActionButton>\n ) : null}\n </div>\n\n {canBuyMore && (\n <>\n <div className=\"border-t border-border/40 pt-2 mt-1\" />\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton action=\"buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest!)} renderHelp={renderHelp}>Buy</ActionButton>\n <ActionButton action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n </div>\n </>\n )}\n </div>\n ) : isSignedIn ? (\n <>\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton action=\"buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest)} renderHelp={renderHelp}>Buy</ActionButton>\n <ActionButton action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Create your own attributed derivative of this work.\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showDealOption && onProposeDeal ? (\n <ActionButton\n action=\"license\"\n icon={<HandCoins className=\"h-4 w-4\" />}\n onClick={onProposeDeal}\n helpContent=\"Propose a license deal to the creator to use this work.\"\n renderHelp={renderHelp}\n >\n License\n </ActionButton>\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n renderHelp={renderHelp}\n >\n Sponsor this IP\n </ActionButton>\n ) : null}\n </div>\n {!remixEnabled && !showDealOption ? (\n <p className=\"text-xs text-muted-foreground mt-2 leading-relaxed\">\n The creator marked this asset as no-derivatives.\n </p>\n ) : null}\n </>\n ) : (\n renderAuthAction(\"Sign in to trade\")\n )}\n </div>\n ) : (\n <div className=\"space-y-3\">\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n {isOwner ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton tone=\"blue\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} renderHelp={renderHelp}>List on Marketplace</ActionButton>\n <ActionButton tone=\"orange\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} renderHelp={renderHelp}>Transfer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n renderHelp={renderHelp}\n >\n Open for Sponsorship\n </ActionButton>\n ) : null}\n </div>\n ) : isSignedIn ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n renderHelp={renderHelp}\n >\n Sponsor this IP\n </ActionButton>\n ) : null}\n </div>\n ) : (\n renderAuthAction(\"Sign in to make an offer\")\n )}\n </div>\n )}\n\n {myBid ? (\n <div className=\"rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3\">\n <div className=\"min-w-0 flex items-center gap-2.5\">\n <HandCoins className=\"h-4 w-4 text-amber-500 shrink-0\" />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-semibold text-amber-500\">Your active offer</p>\n <p className=\"text-xs text-muted-foreground flex items-center gap-1.5 mt-0.5\">\n <span className=\"font-bold text-foreground inline-flex items-center gap-1\">\n {formatDisplayPrice(myBid.price.formatted)}\n <CurrencyIcon symbol={myBid.price.currency ?? \"\"} size={12} />\n </span>\n <span>·</span>\n <Clock className=\"h-3 w-3\" />\n {timeUntil(myBid.endTime)}\n </p>\n </div>\n </div>\n <button\n className=\"shrink-0 text-xs font-semibold text-red-400 hover:text-red-300 transition-colors flex items-center gap-1\"\n onClick={() => onCancelClick(myBid)}\n >\n <X className=\"h-3.5 w-3.5\" />\n Cancel\n </button>\n </div>\n ) : null}\n\n {isOwner && activeBids.length > 0 ? (\n <div className=\"rounded-xl bg-card/40 p-5 space-y-3\">\n <p className=\"text-xs font-semibold text-muted-foreground\">\n Incoming offers ({activeBids.length})\n </p>\n <div className=\"space-y-2\">\n {activeBids.map((bid) => (\n <div key={bid.orderHash} className=\"flex items-center justify-between gap-3 rounded-lg bg-muted/30 px-3 py-2\">\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold\">\n <span className=\"inline-flex items-center gap-1.5\">\n {formatDisplayPrice(bid.price.formatted)}\n <CurrencyIcon symbol={bid.price.currency ?? \"\"} size={14} />\n </span>\n </p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <AddressDisplay address={bid.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n <span className=\"text-xs text-muted-foreground\">·</span>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(bid.endTime)}\n </div>\n </div>\n </div>\n <button\n disabled={isProcessing}\n onClick={() => onAcceptBid(bid)}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-primary-foreground disabled:opacity-50\"\n >\n <CheckCircle className=\"h-3.5 w-3.5\" />\n Accept\n </button>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";AAkEQ,SA+HU,UA9HR,KADF;AA/DR;AAAA,EACE;AAAA,EAAgB;AAAA,EAAa;AAAA,EAAO;AAAA,EAAW;AAAA,EAAW;AAAA,EAAW;AAAA,EACrE;AAAA,EAAc;AAAA,EAAK;AAAA,OACd;AACP,SAAS,cAAc,sBAAsB;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,iBAAiB;AAgD1B,SAAS,QAAQ,EAAE,eAAe,YAAY,GAAmE;AAC/G,QAAM,QAAQ,gBAAgB,kBAAkB,aAAa,IAAI;AACjE,QAAM,WAAW,cAAc,kBAAkB,WAAW,IAAI;AAChE,MAAI,CAAC,OAAO,UAAU,CAAC,UAAU,OAAQ,QAAO;AAChD,SACE,qBAAC,SAAI,WAAU,yDACZ;AAAA,WAAO,UACN,qBAAC,UAAK,WAAU,6BACd;AAAA,0BAAC,UAAK,mBAAK;AAAA,MACX,oBAAC,kBAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,QAAQ,UAAU,IAAI,iBAAgB,iCAAgC;AAAA,OAC5H;AAAA,IAED,UAAU,UACT,qBAAC,UAAK,WAAU,6BACd;AAAA,0BAAC,UAAK,uBAAS;AAAA,MACf,oBAAC,kBAAe,QAAQ,SAAS,QAAQ,QAAQ,SAAS,QAAQ,UAAU,IAAI,iBAAgB,iCAAgC;AAAA,OAClI;AAAA,KAEJ;AAEJ;AAEO,SAAS,sBAA6D;AAAA,EAC3E;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,kBAAkB;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACp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1
+ {"version":3,"sources":["../../src/components/asset-marketplace-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport {\n ArrowRightLeft, CheckCircle, Clock, GitBranch, HandCoins, Handshake, Loader2,\n ShoppingCart, Tag, X,\n} from \"lucide-react\";\nimport { CurrencyIcon, CurrencyAmount } from \"./currency-icon.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { formatDisplayPrice, parsePriceDisplay } from \"../utils/format.js\";\nimport { timeUntil } from \"../utils/time.js\";\n\n/** Structural subset of `ApiOrder` (both apps' `@medialane/sdk` types satisfy this). */\nexport interface ApiOrderLike {\n orderHash: string;\n offerer: string;\n endTime: string;\n price: { formatted: string | null; currency: string | null };\n}\n\nexport interface AssetMarketplacePanelProps<T extends ApiOrderLike = ApiOrderLike> {\n cheapest?: T;\n isOwner: boolean;\n isSignedIn: boolean;\n isProcessing: boolean;\n isERC1155: boolean;\n isMarketLoading?: boolean;\n myListing: T | null;\n activeBids: T[];\n walletAddress?: string | null;\n remixEnabled?: boolean;\n showDealOption?: boolean;\n /** Raw \"0.07 STRK\"-style strings — already resolved by the caller. `null`/undefined renders \"—\". */\n floorPriceRaw?: string | null;\n lastSaleRaw?: string | null;\n /** Renders the sign-in/connect-wallet CTA for the given label (e.g. \"Sign in to trade\"). */\n renderAuthAction: (label: string) => ReactNode;\n /** Renders an inline help/info affordance for the given tooltip text. */\n renderHelp: (content: string) => ReactNode;\n onCancelClick: (order: T) => void;\n onAcceptBid: (order: T) => void;\n onOpenListing: () => void;\n onOpenTransfer: () => void;\n onOpenPurchase: (order: T) => void;\n onOpenOffer: () => void;\n onOpenRemix?: () => void;\n onProposeDeal?: () => void;\n /** Non-owner: propose a sponsorship deal on this asset. */\n showSponsorOption?: boolean;\n onOpenSponsorProposal?: () => void;\n /** Owner: open this asset for sponsorship bidding. */\n showSponsorSolicitOption?: boolean;\n onOpenSponsorSolicit?: () => void;\n}\n\n/** Floor + last-sale stats — each hides itself when its data is absent\n * (no dangling \"—\" placeholders), and the whole row disappears when\n * neither is available. */\nfunction StatRow({ floorPriceRaw, lastSaleRaw }: { floorPriceRaw?: string | null; lastSaleRaw?: string | null }) {\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n const lastSale = lastSaleRaw ? parsePriceDisplay(lastSaleRaw) : null;\n if (!floor?.symbol && !lastSale?.symbol) return null;\n return (\n <div className=\"flex items-center gap-4 text-sm text-muted-foreground\">\n {floor?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Floor</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n {lastSale?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Last sale</span>\n <CurrencyAmount amount={lastSale.numStr} symbol={lastSale.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n </div>\n );\n}\n\nexport function AssetMarketplacePanel<T extends ApiOrderLike = ApiOrderLike>({\n cheapest,\n isOwner,\n isSignedIn,\n isProcessing,\n isERC1155,\n isMarketLoading = false,\n myListing,\n activeBids,\n walletAddress,\n remixEnabled = false,\n showDealOption = false,\n showSponsorOption = false,\n onOpenSponsorProposal,\n showSponsorSolicitOption = false,\n onOpenSponsorSolicit,\n floorPriceRaw,\n lastSaleRaw,\n renderAuthAction,\n renderHelp,\n onCancelClick,\n onAcceptBid,\n onOpenListing,\n onOpenTransfer,\n onOpenPurchase,\n onOpenOffer,\n onOpenRemix,\n onProposeDeal,\n}: AssetMarketplacePanelProps<T>) {\n const myBid = !isOwner && walletAddress\n ? activeBids.find((bid) => bid.offerer.toLowerCase() === walletAddress.toLowerCase()) ?? null\n : null;\n\n const canBuyMore =\n isERC1155 && isOwner && !!cheapest && !!walletAddress &&\n cheapest.offerer.toLowerCase() !== walletAddress.toLowerCase();\n\n if (isMarketLoading && !cheapest) {\n return (\n <div className=\"space-y-4\">\n <div className=\"h-9 w-32 rounded-md bg-muted animate-pulse\" />\n <div className=\"h-12 w-full rounded-2xl bg-muted animate-pulse\" />\n </div>\n );\n }\n\n return (\n <div className=\"relative\">\n\n <div className=\"relative space-y-4\">\n {cheapest ? (\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap items-baseline gap-x-5 gap-y-1.5\">\n <div className=\"flex items-baseline gap-2\">\n <CurrencyIcon symbol={cheapest.price.currency ?? \"\"} size={26} />\n <span className=\"text-4xl font-bold tracking-tight\">\n {formatDisplayPrice(cheapest.price.formatted)}\n </span>\n {renderHelp(\n `${isOwner && !canBuyMore ? \"Your listing\" : \"Current price\"} · Expires ${timeUntil(cheapest.endTime)}`\n )}\n </div>\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n </div>\n\n {isOwner ? (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-2 gap-2\">\n {myListing ? (\n <ActionButton big\n icon={isProcessing ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <X className=\"h-4 w-4\" />}\n onClick={() => onCancelClick(myListing)}\n disabled={isProcessing}\n tone=\"red\"\n renderHelp={renderHelp}\n >\n Cancel Listing\n </ActionButton>\n ) : null}\n {/* ERC-721 has exactly one possible listing — once myListing exists,\n \"List on Marketplace\" is redundant next to \"Cancel Listing\" and\n reads as a broken/confusing pair. An ERC-1155 owner can still hold\n un-listed editions while one listing is active, so it stays for them. */}\n {(!myListing || isERC1155) ? (\n <ActionButton big tone=\"blue\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} renderHelp={renderHelp}>List on Marketplace</ActionButton>\n ) : null}\n <ActionButton big tone=\"orange\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} renderHelp={renderHelp}>Transfer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton big\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton big\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n renderHelp={renderHelp}\n >\n Open for Sponsorship\n </ActionButton>\n ) : null}\n </div>\n\n {canBuyMore && (\n <>\n <div className=\"border-t border-border/40 pt-2 mt-1\" />\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton big action=\"buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest!)} renderHelp={renderHelp}>Buy</ActionButton>\n <ActionButton big action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n </div>\n </>\n )}\n </div>\n ) : isSignedIn ? (\n <>\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton big action=\"buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest)} renderHelp={renderHelp}>Buy</ActionButton>\n <ActionButton big action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton big\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Create your own attributed derivative of this work.\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showDealOption && onProposeDeal ? (\n <ActionButton big\n action=\"license\"\n icon={<HandCoins className=\"h-4 w-4\" />}\n onClick={onProposeDeal}\n helpContent=\"Propose a license deal to the creator to use this work.\"\n renderHelp={renderHelp}\n >\n License\n </ActionButton>\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton big\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n renderHelp={renderHelp}\n >\n Sponsor this IP\n </ActionButton>\n ) : null}\n </div>\n {!remixEnabled && !showDealOption ? (\n <p className=\"text-xs text-muted-foreground mt-2 leading-relaxed\">\n The creator marked this asset as no-derivatives.\n </p>\n ) : null}\n </>\n ) : (\n renderAuthAction(\"Sign in to trade\")\n )}\n </div>\n ) : (\n <div className=\"space-y-3\">\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n {isOwner ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton big tone=\"blue\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} renderHelp={renderHelp}>List on Marketplace</ActionButton>\n <ActionButton big tone=\"orange\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} renderHelp={renderHelp}>Transfer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton big\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton big\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n renderHelp={renderHelp}\n >\n Open for Sponsorship\n </ActionButton>\n ) : null}\n </div>\n ) : isSignedIn ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton big action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton big\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton big\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n renderHelp={renderHelp}\n >\n Sponsor this IP\n </ActionButton>\n ) : null}\n </div>\n ) : (\n renderAuthAction(\"Sign in to make an offer\")\n )}\n </div>\n )}\n\n {myBid ? (\n <div className=\"rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3\">\n <div className=\"min-w-0 flex items-center gap-2.5\">\n <HandCoins className=\"h-4 w-4 text-amber-500 shrink-0\" />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-semibold text-amber-500\">Your active offer</p>\n <p className=\"text-xs text-muted-foreground flex items-center gap-1.5 mt-0.5\">\n <span className=\"font-bold text-foreground inline-flex items-center gap-1\">\n {formatDisplayPrice(myBid.price.formatted)}\n <CurrencyIcon symbol={myBid.price.currency ?? \"\"} size={12} />\n </span>\n <span>·</span>\n <Clock className=\"h-3 w-3\" />\n {timeUntil(myBid.endTime)}\n </p>\n </div>\n </div>\n <button\n className=\"shrink-0 text-xs font-semibold text-red-400 hover:text-red-300 transition-colors flex items-center gap-1\"\n onClick={() => onCancelClick(myBid)}\n >\n <X className=\"h-3.5 w-3.5\" />\n Cancel\n </button>\n </div>\n ) : null}\n\n {isOwner && activeBids.length > 0 ? (\n <div className=\"rounded-xl bg-card/40 p-5 space-y-3\">\n <p className=\"text-xs font-semibold text-muted-foreground\">\n Incoming offers ({activeBids.length})\n </p>\n <div className=\"space-y-2\">\n {activeBids.map((bid) => (\n <div key={bid.orderHash} className=\"flex items-center justify-between gap-3 rounded-lg bg-muted/30 px-3 py-2\">\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold\">\n <span className=\"inline-flex items-center gap-1.5\">\n {formatDisplayPrice(bid.price.formatted)}\n <CurrencyIcon symbol={bid.price.currency ?? \"\"} size={14} />\n </span>\n </p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <AddressDisplay address={bid.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n <span className=\"text-xs text-muted-foreground\">·</span>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(bid.endTime)}\n </div>\n </div>\n </div>\n <button\n disabled={isProcessing}\n onClick={() => onAcceptBid(bid)}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-primary-foreground disabled:opacity-50\"\n >\n <CheckCircle className=\"h-3.5 w-3.5\" />\n Accept\n </button>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";AAkEQ,SA+HU,UA9HR,KADF;AA/DR;AAAA,EACE;AAAA,EAAgB;AAAA,EAAa;AAAA,EAAO;AAAA,EAAW;AAAA,EAAW;AAAA,EAAW;AAAA,EACrE;AAAA,EAAc;AAAA,EAAK;AAAA,OACd;AACP,SAAS,cAAc,sBAAsB;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,iBAAiB;AAgD1B,SAAS,QAAQ,EAAE,eAAe,YAAY,GAAmE;AAC/G,QAAM,QAAQ,gBAAgB,kBAAkB,aAAa,IAAI;AACjE,QAAM,WAAW,cAAc,kBAAkB,WAAW,IAAI;AAChE,MAAI,CAAC,OAAO,UAAU,CAAC,UAAU,OAAQ,QAAO;AAChD,SACE,qBAAC,SAAI,WAAU,yDACZ;AAAA,WAAO,UACN,qBAAC,UAAK,WAAU,6BACd;AAAA,0BAAC,UAAK,mBAAK;AAAA,MACX,oBAAC,kBAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,QAA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AAC,OAAE,WAAU,qBACX,+BAAC,UAAK,WAAU,oCACb;AAAA,+BAAmB,IAAI,MAAM,SAAS;AAAA,YACvC,oBAAC,gBAAa,QAAQ,IAAI,MAAM,YAAY,IAAI,MAAM,IAAI;AAAA,aAC5D,GACF;AAAA,UACA,qBAAC,SAAI,WAAU,kCACb;AAAA,gCAAC,kBAAe,SAAS,IAAI,SAAS,OAAO,GAAG,UAAU,OAAO,WAAU,iCAAgC;AAAA,YAC3G,oBAAC,UAAK,WAAU,iCAAgC,kBAAC;AAAA,YACjD,qBAAC,SAAI,WAAU,yDACb;AAAA,kCAAC,SAAM,WAAU,WAAU;AAAA,cAC1B,UAAU,IAAI,OAAO;AAAA,eACxB;AAAA,aACF;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,SAAS,MAAM,YAAY,GAAG;AAAA,YAC9B,WAAU;AAAA,YAEV;AAAA,kCAAC,eAAY,WAAU,eAAc;AAAA,cAAE;AAAA;AAAA;AAAA,QAEzC;AAAA,WAxBQ,IAAI,SAyBd,CACD,GACH;AAAA,OACF,IACE;AAAA,KACN,GACF;AAEJ;","names":[]}
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var club_owner_actions_exports = {};
31
+ __export(club_owner_actions_exports, {
32
+ ClubOwnerActions: () => ClubOwnerActions
33
+ });
34
+ module.exports = __toCommonJS(club_owner_actions_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_link = __toESM(require("next/link"), 1);
37
+ var import_lucide_react = require("lucide-react");
38
+ function ClubOwnerActions({ contractAddress, isOwner }) {
39
+ if (!isOwner) return null;
40
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "btn-border-animated p-[1px] rounded-xl", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
41
+ import_link.default,
42
+ {
43
+ href: `/launchpad/club/${contractAddress}/mint`,
44
+ className: "flex items-center gap-2 h-10 px-5 rounded-[11px] text-sm font-semibold text-white bg-transparent hover:brightness-110 active:scale-[0.98] transition",
45
+ children: [
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Users, { className: "h-4 w-4" }),
47
+ "Create membership"
48
+ ]
49
+ }
50
+ ) });
51
+ }
52
+ // Annotate the CommonJS export names for ESM import in node:
53
+ 0 && (module.exports = {
54
+ ClubOwnerActions
55
+ });
56
+ //# sourceMappingURL=club-owner-actions.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/club-owner-actions.tsx"],"sourcesContent":["\"use client\";\n\n// The ip-club service action on the collection page — one featured button,\n// visible only to the collection owner, in the right owner cluster (the same\n// slot erc1155 collections use for \"Mint editions\"). Links to the dedicated\n// mint page (create a membership tier + mint its supply, same shape as the\n// IP Tickets mint page).\n\nimport Link from \"next/link\";\nimport { Users } from \"lucide-react\";\n\nexport interface ClubOwnerActionsProps {\n contractAddress: string;\n /** Caller computes this from its own wallet session — the wallet model\n * differs per app, so this component stays purely presentational. */\n isOwner: boolean;\n}\n\nexport function ClubOwnerActions({ contractAddress, isOwner }: ClubOwnerActionsProps) {\n if (!isOwner) return null;\n\n return (\n <div className=\"btn-border-animated p-[1px] rounded-xl\">\n <Link\n href={`/launchpad/club/${contractAddress}/mint`}\n className=\"flex items-center gap-2 h-10 px-5 rounded-[11px] text-sm font-semibold text-white bg-transparent hover:brightness-110 active:scale-[0.98] transition\"\n >\n <Users className=\"h-4 w-4\" />\n Create membership\n </Link>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuBM;AAfN,kBAAiB;AACjB,0BAAsB;AASf,SAAS,iBAAiB,EAAE,iBAAiB,QAAQ,GAA0B;AACpF,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,4CAAC,SAAI,WAAU,0CACb;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC,MAAM,mBAAmB,eAAe;AAAA,MACxC,WAAU;AAAA,MAEV;AAAA,oDAAC,6BAAM,WAAU,WAAU;AAAA,QAAE;AAAA;AAAA;AAAA,EAE/B,GACF;AAEJ;","names":["Link"]}
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface ClubOwnerActionsProps {
4
+ contractAddress: string;
5
+ /** Caller computes this from its own wallet session — the wallet model
6
+ * differs per app, so this component stays purely presentational. */
7
+ isOwner: boolean;
8
+ }
9
+ declare function ClubOwnerActions({ contractAddress, isOwner }: ClubOwnerActionsProps): react_jsx_runtime.JSX.Element | null;
10
+
11
+ export { ClubOwnerActions, type ClubOwnerActionsProps };
@@ -0,0 +1,11 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface ClubOwnerActionsProps {
4
+ contractAddress: string;
5
+ /** Caller computes this from its own wallet session — the wallet model
6
+ * differs per app, so this component stays purely presentational. */
7
+ isOwner: boolean;
8
+ }
9
+ declare function ClubOwnerActions({ contractAddress, isOwner }: ClubOwnerActionsProps): react_jsx_runtime.JSX.Element | null;
10
+
11
+ export { ClubOwnerActions, type ClubOwnerActionsProps };
@@ -0,0 +1,22 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import Link from "next/link";
4
+ import { Users } from "lucide-react";
5
+ function ClubOwnerActions({ contractAddress, isOwner }) {
6
+ if (!isOwner) return null;
7
+ return /* @__PURE__ */ jsx("div", { className: "btn-border-animated p-[1px] rounded-xl", children: /* @__PURE__ */ jsxs(
8
+ Link,
9
+ {
10
+ href: `/launchpad/club/${contractAddress}/mint`,
11
+ className: "flex items-center gap-2 h-10 px-5 rounded-[11px] text-sm font-semibold text-white bg-transparent hover:brightness-110 active:scale-[0.98] transition",
12
+ children: [
13
+ /* @__PURE__ */ jsx(Users, { className: "h-4 w-4" }),
14
+ "Create membership"
15
+ ]
16
+ }
17
+ ) });
18
+ }
19
+ export {
20
+ ClubOwnerActions
21
+ };
22
+ //# sourceMappingURL=club-owner-actions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/club-owner-actions.tsx"],"sourcesContent":["\"use client\";\n\n// The ip-club service action on the collection page — one featured button,\n// visible only to the collection owner, in the right owner cluster (the same\n// slot erc1155 collections use for \"Mint editions\"). Links to the dedicated\n// mint page (create a membership tier + mint its supply, same shape as the\n// IP Tickets mint page).\n\nimport Link from \"next/link\";\nimport { Users } from \"lucide-react\";\n\nexport interface ClubOwnerActionsProps {\n contractAddress: string;\n /** Caller computes this from its own wallet session — the wallet model\n * differs per app, so this component stays purely presentational. */\n isOwner: boolean;\n}\n\nexport function ClubOwnerActions({ contractAddress, isOwner }: ClubOwnerActionsProps) {\n if (!isOwner) return null;\n\n return (\n <div className=\"btn-border-animated p-[1px] rounded-xl\">\n <Link\n href={`/launchpad/club/${contractAddress}/mint`}\n className=\"flex items-center gap-2 h-10 px-5 rounded-[11px] text-sm font-semibold text-white bg-transparent hover:brightness-110 active:scale-[0.98] transition\"\n >\n <Users className=\"h-4 w-4\" />\n Create membership\n </Link>\n </div>\n );\n}\n"],"mappings":";AAuBM,SAIE,KAJF;AAfN,OAAO,UAAU;AACjB,SAAS,aAAa;AASf,SAAS,iBAAiB,EAAE,iBAAiB,QAAQ,GAA0B;AACpF,MAAI,CAAC,QAAS,QAAO;AAErB,SACE,oBAAC,SAAI,WAAU,0CACb;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,mBAAmB,eAAe;AAAA,MACxC,WAAU;AAAA,MAEV;AAAA,4BAAC,SAAM,WAAU,WAAU;AAAA,QAAE;AAAA;AAAA;AAAA,EAE/B,GACF;AAEJ;","names":[]}
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ "use client";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+ var collection_hero_banner_exports = {};
21
+ __export(collection_hero_banner_exports, {
22
+ CollectionHeroBanner: () => CollectionHeroBanner
23
+ });
24
+ module.exports = __toCommonJS(collection_hero_banner_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_framer_motion = require("framer-motion");
27
+ var import_cn = require("../utils/cn.js");
28
+ var import_currency_icon = require("./currency-icon.js");
29
+ var import_skeleton = require("./skeleton.js");
30
+ function CollectionHeroBanner({
31
+ bannerUrl,
32
+ loading = false,
33
+ standard,
34
+ symbol,
35
+ name,
36
+ stats,
37
+ className
38
+ }) {
39
+ const { scrollY } = (0, import_framer_motion.useScroll)();
40
+ const shouldReduce = (0, import_framer_motion.useReducedMotion)();
41
+ const y = (0, import_framer_motion.useTransform)(scrollY, [0, 500], [0, shouldReduce ? 0 : 150]);
42
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "fixed inset-0 -z-10 overflow-hidden pointer-events-none", children: bannerUrl && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
44
+ "img",
45
+ {
46
+ src: bannerUrl,
47
+ alt: "",
48
+ "aria-hidden": true,
49
+ className: "absolute inset-0 w-full h-full object-cover opacity-20 scale-110",
50
+ style: { filter: "blur(60px) saturate(1.5)" }
51
+ }
52
+ ) }),
53
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_skeleton.Skeleton, { className: (0, import_cn.cn)("w-full h-[50svh]", className) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("relative w-full overflow-hidden h-[50svh]", className), children: [
54
+ bannerUrl ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
55
+ import_framer_motion.motion.img,
56
+ {
57
+ src: bannerUrl,
58
+ alt: "",
59
+ "aria-hidden": true,
60
+ style: { y },
61
+ className: "absolute inset-0 w-full h-full object-cover scale-110"
62
+ }
63
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-0 w-full h-full bg-muted" }),
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "absolute bottom-0 left-0 right-0 px-4 sm:px-6 pb-4 sm:pb-6 space-y-3 z-10", children: [
65
+ (standard || symbol) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
66
+ standard === "ERC1155" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Eyebrow, { children: "Multi-edition NFT" }) : standard === "ERC721" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Eyebrow, { children: "Single NFT" }) : null,
67
+ symbol && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Eyebrow, { className: "tabular-nums", children: symbol })
68
+ ] }),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
70
+ "h1",
71
+ {
72
+ className: "text-3xl sm:text-5xl lg:text-7xl font-bold text-white leading-tight",
73
+ style: { textShadow: "0 1px 12px rgba(0,0,0,0.4)" },
74
+ children: name
75
+ }
76
+ ),
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex gap-2 flex-wrap", children: stats.map(({ label, display, symbol: statSymbol }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
78
+ "div",
79
+ {
80
+ className: (0, import_cn.cn)(
81
+ "bg-white/15 backdrop-blur-md rounded-xl px-3 py-2 flex flex-col justify-center shrink-0",
82
+ statSymbol ? "min-w-[80px]" : "min-w-[60px] items-center text-center"
83
+ ),
84
+ children: [
85
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-[9px] text-white/70 mb-1", children: label }),
86
+ statSymbol ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1.5", children: [
87
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: statSymbol, size: 15 }),
88
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm sm:text-base font-bold text-white tabular-nums leading-tight truncate", children: display })
89
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-base sm:text-lg font-bold text-white tabular-nums leading-tight", children: display })
90
+ ]
91
+ },
92
+ label
93
+ )) })
94
+ ] })
95
+ ] })
96
+ ] });
97
+ }
98
+ function Eyebrow({ children, className }) {
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
100
+ "span",
101
+ {
102
+ className: (0, import_cn.cn)(
103
+ "text-[11px] font-semibold text-white/90 bg-white/15 backdrop-blur-md rounded-full px-2.5 py-0.5",
104
+ className
105
+ ),
106
+ children
107
+ }
108
+ );
109
+ }
110
+ // Annotate the CommonJS export names for ESM import in node:
111
+ 0 && (module.exports = {
112
+ CollectionHeroBanner
113
+ });
114
+ //# sourceMappingURL=collection-hero-banner.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/collection-hero-banner.tsx"],"sourcesContent":["\"use client\";\n\nimport { motion, useScroll, useTransform, useReducedMotion } from \"framer-motion\";\nimport { cn } from \"../utils/cn.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface CollectionHeroStat {\n label: string;\n display: string;\n /** Currency symbol (STRK, ETH, ...) — renders CurrencyIcon next to the value. Omit for plain counts. */\n symbol?: string | null;\n}\n\nexport interface CollectionHeroBannerProps {\n bannerUrl: string | null;\n loading?: boolean;\n standard?: string | null;\n symbol?: string | null;\n name: string;\n stats: CollectionHeroStat[];\n className?: string;\n}\n\n/**\n * Full-bleed collection hero: page-wide atmospheric blur, a parallax banner\n * image, and a bottom overlay (type/symbol eyebrows, title, stat chips).\n * Deduplicated from io + starknet, which had drifted into two independent\n * copies of the same block.\n */\nexport function CollectionHeroBanner({\n bannerUrl,\n loading = false,\n standard,\n symbol,\n name,\n stats,\n className,\n}: CollectionHeroBannerProps) {\n const { scrollY } = useScroll();\n const shouldReduce = useReducedMotion();\n const y = useTransform(scrollY, [0, 500], [0, shouldReduce ? 0 : 150]);\n\n return (\n <>\n {/* Atmospheric blur background, fixed behind the whole page */}\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n {bannerUrl && (\n <img\n src={bannerUrl}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n )}\n </div>\n\n {loading ? (\n <Skeleton className={cn(\"w-full h-[50svh]\", className)} />\n ) : (\n <div className={cn(\"relative w-full overflow-hidden h-[50svh]\", className)}>\n {bannerUrl ? (\n <motion.img\n src={bannerUrl}\n alt=\"\"\n aria-hidden\n style={{ y }}\n className=\"absolute inset-0 w-full h-full object-cover scale-110\"\n />\n ) : (\n <div className=\"absolute inset-0 w-full h-full bg-muted\" />\n )}\n\n {/* Bottom overlay: eyebrows + title + stat chips — frosted glass so\n they hold up over any artwork, regardless of site theme. */}\n <div className=\"absolute bottom-0 left-0 right-0 px-4 sm:px-6 pb-4 sm:pb-6 space-y-3 z-10\">\n {(standard || symbol) && (\n <div className=\"flex items-center gap-2 flex-wrap\">\n {standard === \"ERC1155\" ? (\n <Eyebrow>Multi-edition NFT</Eyebrow>\n ) : standard === \"ERC721\" ? (\n <Eyebrow>Single NFT</Eyebrow>\n ) : null}\n {symbol && <Eyebrow className=\"tabular-nums\">{symbol}</Eyebrow>}\n </div>\n )}\n\n <h1\n className=\"text-3xl sm:text-5xl lg:text-7xl font-bold text-white leading-tight\"\n style={{ textShadow: \"0 1px 12px rgba(0,0,0,0.4)\" }}\n >\n {name}\n </h1>\n\n <div className=\"flex gap-2 flex-wrap\">\n {stats.map(({ label, display, symbol: statSymbol }) => (\n <div\n key={label}\n className={cn(\n \"bg-white/15 backdrop-blur-md rounded-xl px-3 py-2 flex flex-col justify-center shrink-0\",\n statSymbol ? \"min-w-[80px]\" : \"min-w-[60px] items-center text-center\"\n )}\n >\n <p className=\"text-[9px] text-white/70 mb-1\">{label}</p>\n {statSymbol ? (\n <div className=\"flex items-center gap-1.5\">\n <CurrencyIcon symbol={statSymbol} size={15} />\n <p className=\"text-sm sm:text-base font-bold text-white tabular-nums leading-tight truncate\">\n {display}\n </p>\n </div>\n ) : (\n <p className=\"text-base sm:text-lg font-bold text-white tabular-nums leading-tight\">{display}</p>\n )}\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n </>\n );\n}\n\nfunction Eyebrow({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <span\n className={cn(\n \"text-[11px] font-semibold text-white/90 bg-white/15 backdrop-blur-md rounded-full px-2.5 py-0.5\",\n className\n )}\n >\n {children}\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA4CI;AA1CJ,2BAAkE;AAClE,gBAAmB;AACnB,2BAA6B;AAC7B,sBAAyB;AAyBlB,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA8B;AAC5B,QAAM,EAAE,QAAQ,QAAI,gCAAU;AAC9B,QAAM,mBAAe,uCAAiB;AACtC,QAAM,QAAI,mCAAa,SAAS,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,eAAe,IAAI,GAAG,CAAC;AAErE,SACE,4EAEE;AAAA,gDAAC,SAAI,WAAU,2DACZ,uBACC;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,KAAI;AAAA,QACJ,eAAW;AAAA,QACX,WAAU;AAAA,QACV,OAAO,EAAE,QAAQ,2BAA2B;AAAA;AAAA,IAC9C,GAEJ;AAAA,IAEC,UACC,4CAAC,4BAAS,eAAW,cAAG,oBAAoB,SAAS,GAAG,IAExD,6CAAC,SAAI,eAAW,cAAG,6CAA6C,SAAS,GACtE;AAAA,kBACC;AAAA,QAAC,4BAAO;AAAA,QAAP;AAAA,UACC,KAAK;AAAA,UACL,KAAI;AAAA,UACJ,eAA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6
+ /** Currency symbol (STRK, ETH, ...) — renders CurrencyIcon next to the value. Omit for plain counts. */
7
+ symbol?: string | null;
8
+ }
9
+ interface CollectionHeroBannerProps {
10
+ bannerUrl: string | null;
11
+ loading?: boolean;
12
+ standard?: string | null;
13
+ symbol?: string | null;
14
+ name: string;
15
+ stats: CollectionHeroStat[];
16
+ className?: string;
17
+ }
18
+ /**
19
+ * Full-bleed collection hero: page-wide atmospheric blur, a parallax banner
20
+ * image, and a bottom overlay (type/symbol eyebrows, title, stat chips).
21
+ * Deduplicated from io + starknet, which had drifted into two independent
22
+ * copies of the same block.
23
+ */
24
+ declare function CollectionHeroBanner({ bannerUrl, loading, standard, symbol, name, stats, className, }: CollectionHeroBannerProps): react_jsx_runtime.JSX.Element;
25
+
26
+ export { CollectionHeroBanner, type CollectionHeroBannerProps, type CollectionHeroStat };
@@ -0,0 +1,26 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface CollectionHeroStat {
4
+ label: string;
5
+ display: string;
6
+ /** Currency symbol (STRK, ETH, ...) — renders CurrencyIcon next to the value. Omit for plain counts. */
7
+ symbol?: string | null;
8
+ }
9
+ interface CollectionHeroBannerProps {
10
+ bannerUrl: string | null;
11
+ loading?: boolean;
12
+ standard?: string | null;
13
+ symbol?: string | null;
14
+ name: string;
15
+ stats: CollectionHeroStat[];
16
+ className?: string;
17
+ }
18
+ /**
19
+ * Full-bleed collection hero: page-wide atmospheric blur, a parallax banner
20
+ * image, and a bottom overlay (type/symbol eyebrows, title, stat chips).
21
+ * Deduplicated from io + starknet, which had drifted into two independent
22
+ * copies of the same block.
23
+ */
24
+ declare function CollectionHeroBanner({ bannerUrl, loading, standard, symbol, name, stats, className, }: CollectionHeroBannerProps): react_jsx_runtime.JSX.Element;
25
+
26
+ export { CollectionHeroBanner, type CollectionHeroBannerProps, type CollectionHeroStat };
@@ -0,0 +1,90 @@
1
+ "use client";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { motion, useScroll, useTransform, useReducedMotion } from "framer-motion";
4
+ import { cn } from "../utils/cn.js";
5
+ import { CurrencyIcon } from "./currency-icon.js";
6
+ import { Skeleton } from "./skeleton.js";
7
+ function CollectionHeroBanner({
8
+ bannerUrl,
9
+ loading = false,
10
+ standard,
11
+ symbol,
12
+ name,
13
+ stats,
14
+ className
15
+ }) {
16
+ const { scrollY } = useScroll();
17
+ const shouldReduce = useReducedMotion();
18
+ const y = useTransform(scrollY, [0, 500], [0, shouldReduce ? 0 : 150]);
19
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
20
+ /* @__PURE__ */ jsx("div", { className: "fixed inset-0 -z-10 overflow-hidden pointer-events-none", children: bannerUrl && /* @__PURE__ */ jsx(
21
+ "img",
22
+ {
23
+ src: bannerUrl,
24
+ alt: "",
25
+ "aria-hidden": true,
26
+ className: "absolute inset-0 w-full h-full object-cover opacity-20 scale-110",
27
+ style: { filter: "blur(60px) saturate(1.5)" }
28
+ }
29
+ ) }),
30
+ loading ? /* @__PURE__ */ jsx(Skeleton, { className: cn("w-full h-[50svh]", className) }) : /* @__PURE__ */ jsxs("div", { className: cn("relative w-full overflow-hidden h-[50svh]", className), children: [
31
+ bannerUrl ? /* @__PURE__ */ jsx(
32
+ motion.img,
33
+ {
34
+ src: bannerUrl,
35
+ alt: "",
36
+ "aria-hidden": true,
37
+ style: { y },
38
+ className: "absolute inset-0 w-full h-full object-cover scale-110"
39
+ }
40
+ ) : /* @__PURE__ */ jsx("div", { className: "absolute inset-0 w-full h-full bg-muted" }),
41
+ /* @__PURE__ */ jsxs("div", { className: "absolute bottom-0 left-0 right-0 px-4 sm:px-6 pb-4 sm:pb-6 space-y-3 z-10", children: [
42
+ (standard || symbol) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
43
+ standard === "ERC1155" ? /* @__PURE__ */ jsx(Eyebrow, { children: "Multi-edition NFT" }) : standard === "ERC721" ? /* @__PURE__ */ jsx(Eyebrow, { children: "Single NFT" }) : null,
44
+ symbol && /* @__PURE__ */ jsx(Eyebrow, { className: "tabular-nums", children: symbol })
45
+ ] }),
46
+ /* @__PURE__ */ jsx(
47
+ "h1",
48
+ {
49
+ className: "text-3xl sm:text-5xl lg:text-7xl font-bold text-white leading-tight",
50
+ style: { textShadow: "0 1px 12px rgba(0,0,0,0.4)" },
51
+ children: name
52
+ }
53
+ ),
54
+ /* @__PURE__ */ jsx("div", { className: "flex gap-2 flex-wrap", children: stats.map(({ label, display, symbol: statSymbol }) => /* @__PURE__ */ jsxs(
55
+ "div",
56
+ {
57
+ className: cn(
58
+ "bg-white/15 backdrop-blur-md rounded-xl px-3 py-2 flex flex-col justify-center shrink-0",
59
+ statSymbol ? "min-w-[80px]" : "min-w-[60px] items-center text-center"
60
+ ),
61
+ children: [
62
+ /* @__PURE__ */ jsx("p", { className: "text-[9px] text-white/70 mb-1", children: label }),
63
+ statSymbol ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
64
+ /* @__PURE__ */ jsx(CurrencyIcon, { symbol: statSymbol, size: 15 }),
65
+ /* @__PURE__ */ jsx("p", { className: "text-sm sm:text-base font-bold text-white tabular-nums leading-tight truncate", children: display })
66
+ ] }) : /* @__PURE__ */ jsx("p", { className: "text-base sm:text-lg font-bold text-white tabular-nums leading-tight", children: display })
67
+ ]
68
+ },
69
+ label
70
+ )) })
71
+ ] })
72
+ ] })
73
+ ] });
74
+ }
75
+ function Eyebrow({ children, className }) {
76
+ return /* @__PURE__ */ jsx(
77
+ "span",
78
+ {
79
+ className: cn(
80
+ "text-[11px] font-semibold text-white/90 bg-white/15 backdrop-blur-md rounded-full px-2.5 py-0.5",
81
+ className
82
+ ),
83
+ children
84
+ }
85
+ );
86
+ }
87
+ export {
88
+ CollectionHeroBanner
89
+ };
90
+ //# sourceMappingURL=collection-hero-banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/collection-hero-banner.tsx"],"sourcesContent":["\"use client\";\n\nimport { motion, useScroll, useTransform, useReducedMotion } from \"framer-motion\";\nimport { cn } from \"../utils/cn.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { Skeleton } from \"./skeleton.js\";\n\nexport interface CollectionHeroStat {\n label: string;\n display: string;\n /** Currency symbol (STRK, ETH, ...) — renders CurrencyIcon next to the value. Omit for plain counts. */\n symbol?: string | null;\n}\n\nexport interface CollectionHeroBannerProps {\n bannerUrl: string | null;\n loading?: boolean;\n standard?: string | null;\n symbol?: string | null;\n name: string;\n stats: CollectionHeroStat[];\n className?: string;\n}\n\n/**\n * Full-bleed collection hero: page-wide atmospheric blur, a parallax banner\n * image, and a bottom overlay (type/symbol eyebrows, title, stat chips).\n * Deduplicated from io + starknet, which had drifted into two independent\n * copies of the same block.\n */\nexport function CollectionHeroBanner({\n bannerUrl,\n loading = false,\n standard,\n symbol,\n name,\n stats,\n className,\n}: CollectionHeroBannerProps) {\n const { scrollY } = useScroll();\n const shouldReduce = useReducedMotion();\n const y = useTransform(scrollY, [0, 500], [0, shouldReduce ? 0 : 150]);\n\n return (\n <>\n {/* Atmospheric blur background, fixed behind the whole page */}\n <div className=\"fixed inset-0 -z-10 overflow-hidden pointer-events-none\">\n {bannerUrl && (\n <img\n src={bannerUrl}\n alt=\"\"\n aria-hidden\n className=\"absolute inset-0 w-full h-full object-cover opacity-20 scale-110\"\n style={{ filter: \"blur(60px) saturate(1.5)\" }}\n />\n )}\n </div>\n\n {loading ? (\n <Skeleton className={cn(\"w-full h-[50svh]\", className)} />\n ) : (\n <div className={cn(\"relative w-full overflow-hidden h-[50svh]\", className)}>\n {bannerUrl ? (\n <motion.img\n src={bannerUrl}\n alt=\"\"\n aria-hidden\n style={{ y }}\n className=\"absolute inset-0 w-full h-full object-cover scale-110\"\n />\n ) : (\n <div className=\"absolute inset-0 w-full h-full bg-muted\" />\n )}\n\n {/* Bottom overlay: eyebrows + title + stat chips — frosted glass so\n they hold up over any artwork, regardless of site theme. */}\n <div className=\"absolute bottom-0 left-0 right-0 px-4 sm:px-6 pb-4 sm:pb-6 space-y-3 z-10\">\n {(standard || symbol) && (\n <div className=\"flex items-center gap-2 flex-wrap\">\n {standard === \"ERC1155\" ? (\n <Eyebrow>Multi-edition NFT</Eyebrow>\n ) : standard === \"ERC721\" ? (\n <Eyebrow>Single NFT</Eyebrow>\n ) : null}\n {symbol && <Eyebrow className=\"tabular-nums\">{symbol}</Eyebrow>}\n </div>\n )}\n\n <h1\n className=\"text-3xl sm:text-5xl lg:text-7xl font-bold text-white leading-tight\"\n style={{ textShadow: \"0 1px 12px rgba(0,0,0,0.4)\" }}\n >\n {name}\n </h1>\n\n <div className=\"flex gap-2 flex-wrap\">\n {stats.map(({ label, display, symbol: statSymbol }) => (\n <div\n key={label}\n className={cn(\n \"bg-white/15 backdrop-blur-md rounded-xl px-3 py-2 flex flex-col justify-center shrink-0\",\n statSymbol ? \"min-w-[80px]\" : \"min-w-[60px] items-center text-center\"\n )}\n >\n <p className=\"text-[9px] text-white/70 mb-1\">{label}</p>\n {statSymbol ? (\n <div className=\"flex items-center gap-1.5\">\n <CurrencyIcon symbol={statSymbol} size={15} />\n <p className=\"text-sm sm:text-base font-bold text-white tabular-nums leading-tight truncate\">\n {display}\n </p>\n </div>\n ) : (\n <p className=\"text-base sm:text-lg font-bold text-white tabular-nums leading-tight\">{display}</p>\n )}\n </div>\n ))}\n </div>\n </div>\n </div>\n )}\n </>\n );\n}\n\nfunction Eyebrow({ children, className }: { children: React.ReactNode; className?: string }) {\n return (\n <span\n className={cn(\n \"text-[11px] font-semibold text-white/90 bg-white/15 backdrop-blur-md rounded-full px-2.5 py-0.5\",\n className\n )}\n >\n {children}\n </span>\n );\n}\n"],"mappings":";AA4CI,mBAIM,KA8BI,YAlCV;AA1CJ,SAAS,QAAQ,WAAW,cAAc,wBAAwB;AAClE,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;AAyBlB,SAAS,qBAAqB;AAAA,EACnC;AAAA,EACA,U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T;AAAA,cACA,aAAa,iBAAiB;AAAA,YAChC;AAAA,YAEA;AAAA,kCAAC,OAAE,WAAU,iCAAiC,iBAAM;AAAA,cACnD,aACC,qBAAC,SAAI,WAAU,6BACb;AAAA,oCAAC,gBAAa,QAAQ,YAAY,MAAM,IAAI;AAAA,gBAC5C,oBAAC,OAAE,WAAU,iFACV,mBACH;AAAA,iBACF,IAEA,oBAAC,OAAE,WAAU,wEAAwE,mBAAQ;AAAA;AAAA;AAAA,UAf1F;AAAA,QAiBP,CACD,GACH;AAAA,SACF;AAAA,OACF;AAAA,KAEJ;AAEJ;AAEA,SAAS,QAAQ,EAAE,UAAU,UAAU,GAAsD;AAC3F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;","names":[]}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var create_form_primitives_exports = {};
20
+ __export(create_form_primitives_exports, {
21
+ Section: () => Section,
22
+ ToggleGroup: () => ToggleGroup
23
+ });
24
+ module.exports = __toCommonJS(create_form_primitives_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_cn = require("../utils/cn.js");
27
+ function ToggleGroup({
28
+ value,
29
+ options,
30
+ onChange
31
+ }) {
32
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex rounded-lg border border-border overflow-hidden w-full", children: options.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
33
+ "button",
34
+ {
35
+ type: "button",
36
+ onClick: () => onChange(opt),
37
+ className: (0, import_cn.cn)(
38
+ "flex-1 px-3 py-2 text-sm transition-colors",
39
+ i > 0 && "border-l border-border",
40
+ value === opt ? "bg-primary text-primary-foreground font-medium" : "bg-background hover:bg-muted text-muted-foreground"
41
+ ),
42
+ children: opt
43
+ },
44
+ opt
45
+ )) });
46
+ }
47
+ function Section({ title, icon, children }) {
48
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl border border-border bg-card p-5 space-y-4", children: [
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 text-sm font-semibold", children: [
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-primary", children: icon }),
51
+ title
52
+ ] }),
53
+ children
54
+ ] });
55
+ }
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ Section,
59
+ ToggleGroup
60
+ });
61
+ //# sourceMappingURL=create-form-primitives.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/create-form-primitives.tsx"],"sourcesContent":["import { cn } from \"../utils/cn.js\";\n\n/** Segmented two/three-option toggle used across the create flows. */\nexport function ToggleGroup({\n value, options, onChange,\n}: { value: string; options: readonly string[]; onChange: (v: string) => void }) {\n return (\n <div className=\"flex rounded-lg border border-border overflow-hidden w-full\">\n {options.map((opt, i) => (\n <button\n key={opt}\n type=\"button\"\n onClick={() => onChange(opt)}\n className={cn(\n \"flex-1 px-3 py-2 text-sm transition-colors\",\n i > 0 && \"border-l border-border\",\n value === opt\n ? \"bg-primary text-primary-foreground font-medium\"\n : \"bg-background hover:bg-muted text-muted-foreground\",\n )}\n >\n {opt}\n </button>\n ))}\n </div>\n );\n}\n\n/** Titled card section wrapper for the create forms. */\nexport function Section({ title, icon, children }: {\n title: string; icon: React.ReactNode; children: React.ReactNode;\n}) {\n return (\n <div className=\"rounded-xl border border-border bg-card p-5 space-y-4\">\n <div className=\"flex items-center gap-2 text-sm font-semibold\">\n <span className=\"text-primary\">{icon}</span>\n {title}\n </div>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASQ;AATR,gBAAmB;AAGZ,SAAS,YAAY;AAAA,EAC1B;AAAA,EAAO;AAAA,EAAS;AAClB,GAAiF;AAC/E,SACE,4CAAC,SAAI,WAAU,+DACZ,kBAAQ,IAAI,CAAC,KAAK,MACjB;AAAA,IAAC;AAAA;AAAA,MAEC,MAAK;AAAA,MACL,SAAS,MAAM,SAAS,GAAG;AAAA,MAC3B,eAAW;AAAA,QACT;AAAA,QACA,IAAI,KAAK;AAAA,QACT,UAAU,MACN,mDACA;AAAA,MACN;AAAA,MAEC;AAAA;AAAA,IAXI;AAAA,EAYP,CACD,GACH;AAEJ;AAGO,SAAS,QAAQ,EAAE,OAAO,MAAM,SAAS,GAE7C;AACD,SACE,6CAAC,SAAI,WAAU,yDACb;AAAA,iDAAC,SAAI,WAAU,iDACb;AAAA,kDAAC,UAAK,WAAU,gBAAgB,gBAAK;AAAA,MACpC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ /** Segmented two/three-option toggle used across the create flows. */
4
+ declare function ToggleGroup({ value, options, onChange, }: {
5
+ value: string;
6
+ options: readonly string[];
7
+ onChange: (v: string) => void;
8
+ }): react_jsx_runtime.JSX.Element;
9
+ /** Titled card section wrapper for the create forms. */
10
+ declare function Section({ title, icon, children }: {
11
+ title: string;
12
+ icon: React.ReactNode;
13
+ children: React.ReactNode;
14
+ }): react_jsx_runtime.JSX.Element;
15
+
16
+ export { Section, ToggleGroup };