@medialane/ui 0.50.0 → 0.50.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -98,94 +98,32 @@ function AssetMarketplacePanel({
98
98
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-12 w-full rounded-2xl bg-muted animate-pulse" })
99
99
  ] });
100
100
  }
101
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
102
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
103
- "div",
104
- {
105
- "aria-hidden": true,
106
- className: "aurora-purple pointer-events-none",
107
- style: { position: "absolute", width: 280, height: 280, top: -60, left: "20%" }
108
- }
109
- ),
110
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative space-y-4", children: [
111
- cheapest ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4", children: [
112
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-baseline gap-x-5 gap-y-1.5", children: [
113
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-baseline gap-2", children: [
114
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: cheapest.price.currency ?? "", size: 26 }),
115
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-4xl font-bold tracking-tight", children: (0, import_format.formatDisplayPrice)(cheapest.price.formatted) }),
116
- renderHelp(
117
- `${isOwner && !canBuyMore ? "Your listing" : "Current price"} \xB7 Expires ${(0, import_time.timeUntil)(cheapest.endTime)}`
118
- )
119
- ] }),
120
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatRow, { floorPriceRaw, lastSaleRaw })
101
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative space-y-4", children: [
102
+ cheapest ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4", children: [
103
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-baseline gap-x-5 gap-y-1.5", children: [
104
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-baseline gap-2", children: [
105
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: cheapest.price.currency ?? "", size: 26 }),
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-4xl font-bold tracking-tight", children: (0, import_format.formatDisplayPrice)(cheapest.price.formatted) }),
107
+ renderHelp(
108
+ `${isOwner && !canBuyMore ? "Your listing" : "Current price"} \xB7 Expires ${(0, import_time.timeUntil)(cheapest.endTime)}`
109
+ )
121
110
  ] }),
122
- isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
123
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
124
- myListing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
125
- ActionButton,
126
- {
127
- label: "Cancel",
128
- icon: isProcessing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-4 w-4" }),
129
- onClick: () => onCancelClick(myListing),
130
- disabled: isProcessing,
131
- tone: "destructive",
132
- renderHelp
133
- }
134
- ) : null,
135
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "List on Marketplace", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "blue", renderHelp }),
136
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Transfer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, tone: "orange", renderHelp }),
137
- remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
138
- ActionButton,
139
- {
140
- label: "Remix",
141
- icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
142
- onClick: onOpenRemix,
143
- helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
144
- tone: "purple",
145
- renderHelp
146
- }
147
- ) : null
148
- ] }),
149
- canBuyMore && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
150
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "border-t border-border/40 pt-2 mt-1" }),
151
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
152
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
153
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp })
154
- ] })
155
- ] })
156
- ] }) : isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
157
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
158
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
159
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp }),
160
- remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
161
- ActionButton,
162
- {
163
- label: "Remix",
164
- icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
165
- onClick: onOpenRemix,
166
- helpContent: "Create your own attributed derivative of this work.",
167
- tone: "purple",
168
- renderHelp
169
- }
170
- ) : null,
171
- showDealOption && onProposeDeal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
172
- ActionButton,
173
- {
174
- label: "License",
175
- icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }),
176
- onClick: onProposeDeal,
177
- helpContent: "Propose a license deal to the creator to use this work.",
178
- tone: "blue",
179
- renderHelp
180
- }
181
- ) : null
182
- ] }),
183
- !remixEnabled && !showDealOption ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground mt-2 leading-relaxed", children: "The creator marked this asset as no-derivatives." }) : null
184
- ] }) : renderAuthAction("Sign in to trade")
185
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
186
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatRow, { floorPriceRaw, lastSaleRaw }),
187
- isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
188
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "List on Marketplace", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "transparent", renderHelp }),
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatRow, { floorPriceRaw, lastSaleRaw })
112
+ ] }),
113
+ isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
115
+ myListing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
+ ActionButton,
117
+ {
118
+ label: "Cancel",
119
+ icon: isProcessing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-4 w-4" }),
120
+ onClick: () => onCancelClick(myListing),
121
+ disabled: isProcessing,
122
+ tone: "destructive",
123
+ renderHelp
124
+ }
125
+ ) : null,
126
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "List on Marketplace", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "blue", renderHelp }),
189
127
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Transfer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, tone: "orange", renderHelp }),
190
128
  remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
191
129
  ActionButton,
@@ -198,7 +136,17 @@ function AssetMarketplacePanel({
198
136
  renderHelp
199
137
  }
200
138
  ) : null
201
- ] }) : isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
139
+ ] }),
140
+ canBuyMore && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
141
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "border-t border-border/40 pt-2 mt-1" }),
142
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
143
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
144
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp })
145
+ ] })
146
+ ] })
147
+ ] }) : isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
148
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
149
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
202
150
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp }),
203
151
  remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
204
152
  ActionButton,
@@ -206,78 +154,120 @@ function AssetMarketplacePanel({
206
154
  label: "Remix",
207
155
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
208
156
  onClick: onOpenRemix,
209
- helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
157
+ helpContent: "Create your own attributed derivative of this work.",
210
158
  tone: "purple",
211
159
  renderHelp
212
160
  }
161
+ ) : null,
162
+ showDealOption && onProposeDeal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
163
+ ActionButton,
164
+ {
165
+ label: "License",
166
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }),
167
+ onClick: onProposeDeal,
168
+ helpContent: "Propose a license deal to the creator to use this work.",
169
+ tone: "blue",
170
+ renderHelp
171
+ }
213
172
  ) : null
214
- ] }) : renderAuthAction("Sign in to make an offer")
173
+ ] }),
174
+ !remixEnabled && !showDealOption ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground mt-2 leading-relaxed", children: "The creator marked this asset as no-derivatives." }) : null
175
+ ] }) : renderAuthAction("Sign in to trade")
176
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
177
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatRow, { floorPriceRaw, lastSaleRaw }),
178
+ isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
179
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "List on Marketplace", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "transparent", renderHelp }),
180
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Transfer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, tone: "orange", renderHelp }),
181
+ remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
182
+ ActionButton,
183
+ {
184
+ label: "Remix",
185
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
186
+ onClick: onOpenRemix,
187
+ helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
188
+ tone: "purple",
189
+ renderHelp
190
+ }
191
+ ) : null
192
+ ] }) : isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
193
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp }),
194
+ remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
195
+ ActionButton,
196
+ {
197
+ label: "Remix",
198
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
199
+ onClick: onOpenRemix,
200
+ helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
201
+ tone: "purple",
202
+ renderHelp
203
+ }
204
+ ) : null
205
+ ] }) : renderAuthAction("Sign in to make an offer")
206
+ ] }),
207
+ myBid ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3", children: [
208
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex items-center gap-2.5", children: [
209
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4 text-amber-500 shrink-0" }),
210
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
211
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-semibold text-amber-500", children: "Your active offer" }),
212
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs text-muted-foreground flex items-center gap-1.5 mt-0.5", children: [
213
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "font-bold text-foreground inline-flex items-center gap-1", children: [
214
+ (0, import_format.formatDisplayPrice)(myBid.price.formatted),
215
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: myBid.price.currency ?? "", size: 12 })
216
+ ] }),
217
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\xB7" }),
218
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Clock, { className: "h-3 w-3" }),
219
+ (0, import_time.timeUntil)(myBid.endTime)
220
+ ] })
221
+ ] })
215
222
  ] }),
216
- myBid ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3", children: [
217
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex items-center gap-2.5", children: [
218
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4 text-amber-500 shrink-0" }),
219
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
220
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-semibold text-amber-500", children: "Your active offer" }),
221
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs text-muted-foreground flex items-center gap-1.5 mt-0.5", children: [
222
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "font-bold text-foreground inline-flex items-center gap-1", children: [
223
- (0, import_format.formatDisplayPrice)(myBid.price.formatted),
224
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: myBid.price.currency ?? "", size: 12 })
225
- ] }),
226
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\xB7" }),
223
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
224
+ "button",
225
+ {
226
+ className: "shrink-0 text-xs font-semibold text-red-400 hover:text-red-300 transition-colors flex items-center gap-1",
227
+ onClick: () => onCancelClick(myBid),
228
+ children: [
229
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-3.5 w-3.5" }),
230
+ "Cancel"
231
+ ]
232
+ }
233
+ )
234
+ ] }) : null,
235
+ isOwner && activeBids.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl bg-card/40 p-5 space-y-3", children: [
236
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs font-semibold text-muted-foreground", children: [
237
+ "Incoming offers (",
238
+ activeBids.length,
239
+ ")"
240
+ ] }),
241
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-2", children: activeBids.map((bid) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3 rounded-lg bg-muted/30 px-3 py-2", children: [
242
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
243
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-bold", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
244
+ (0, import_format.formatDisplayPrice)(bid.price.formatted),
245
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: bid.price.currency ?? "", size: 14 })
246
+ ] }) }),
247
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
248
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address: bid.offerer, chars: 4, showCopy: false, className: "text-xs text-muted-foreground" }),
249
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs text-muted-foreground", children: "\xB7" }),
250
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
227
251
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Clock, { className: "h-3 w-3" }),
228
- (0, import_time.timeUntil)(myBid.endTime)
252
+ (0, import_time.timeUntil)(bid.endTime)
229
253
  ] })
230
254
  ] })
231
255
  ] }),
232
256
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
233
257
  "button",
234
258
  {
235
- className: "shrink-0 text-xs font-semibold text-red-400 hover:text-red-300 transition-colors flex items-center gap-1",
236
- onClick: () => onCancelClick(myBid),
259
+ disabled: isProcessing,
260
+ onClick: () => onAcceptBid(bid),
261
+ 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",
237
262
  children: [
238
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-3.5 w-3.5" }),
239
- "Cancel"
263
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle, { className: "h-3.5 w-3.5" }),
264
+ "Accept"
240
265
  ]
241
266
  }
242
267
  )
243
- ] }) : null,
244
- isOwner && activeBids.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl bg-card/40 p-5 space-y-3", children: [
245
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs font-semibold text-muted-foreground", children: [
246
- "Incoming offers (",
247
- activeBids.length,
248
- ")"
249
- ] }),
250
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-2", children: activeBids.map((bid) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3 rounded-lg bg-muted/30 px-3 py-2", children: [
251
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
252
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-bold", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
253
- (0, import_format.formatDisplayPrice)(bid.price.formatted),
254
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: bid.price.currency ?? "", size: 14 })
255
- ] }) }),
256
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 mt-0.5", children: [
257
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address: bid.offerer, chars: 4, showCopy: false, className: "text-xs text-muted-foreground" }),
258
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs text-muted-foreground", children: "\xB7" }),
259
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
260
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Clock, { className: "h-3 w-3" }),
261
- (0, import_time.timeUntil)(bid.endTime)
262
- ] })
263
- ] })
264
- ] }),
265
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
266
- "button",
267
- {
268
- disabled: isProcessing,
269
- onClick: () => onAcceptBid(bid),
270
- 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",
271
- children: [
272
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle, { className: "h-3.5 w-3.5" }),
273
- "Accept"
274
- ]
275
- }
276
- )
277
- ] }, bid.orderHash)) })
278
- ] }) : null
279
- ] })
280
- ] });
268
+ ] }, bid.orderHash)) })
269
+ ] }) : null
270
+ ] }) });
281
271
  }
282
272
  // Annotate the CommonJS export names for ESM import in node:
283
273
  0 && (module.exports = {
@@ -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, Loader2,\n ShoppingCart, Tag, X,\n} from \"lucide-react\";\nimport { CurrencyIcon, CurrencyAmount } from \"./currency-icon.js\";\nimport { AddressDisplay } from \"./address-display.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\ninterface ActionButtonProps {\n label: string;\n icon: ReactNode;\n onClick: () => void;\n tone: \"blue\" | \"orange\" | \"purple\" | \"destructive\" | \"transparent\";\n disabled?: boolean;\n helpContent?: string;\n renderHelp: (content: string) => ReactNode;\n}\n\nconst actionToneClass: Record<ActionButtonProps[\"tone\"], string> = {\n blue: \"bg-brand-blue\",\n orange: \"bg-brand-orange\",\n purple: \"bg-brand-purple\",\n destructive: \"bg-destructive\",\n transparent: \"bg-transparent\",\n};\n\nfunction ActionButton({ label, icon, onClick, tone, disabled = false, helpContent, renderHelp }: ActionButtonProps) {\n return (\n <div className={`btn-border-animated p-[1px] rounded-2xl ${disabled ? \"opacity-40 pointer-events-none\" : \"\"}`}>\n <button\n className={`w-full h-10 rounded-[15px] flex items-center justify-center gap-2 px-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] disabled:opacity-50 ${actionToneClass[tone]}`}\n disabled={disabled}\n onClick={onClick}\n >\n {icon}\n {label}\n {helpContent ? renderHelp(helpContent) : null}\n </button>\n </div>\n );\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}\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 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 {/* soft brand light-leak behind the trade zone — no hard border, per §III */}\n <div\n aria-hidden\n className=\"aurora-purple pointer-events-none\"\n style={{ position: \"absolute\", width: 280, height: 280, top: -60, left: \"20%\" }}\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 label=\"Cancel\"\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=\"destructive\"\n renderHelp={renderHelp}\n />\n ) : null}\n <ActionButton label=\"List on Marketplace\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} tone=\"blue\" renderHelp={renderHelp} />\n <ActionButton label=\"Transfer\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"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 tone=\"purple\"\n renderHelp={renderHelp}\n />\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 label=\"Buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest!)} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n </div>\n </>\n )}\n </div>\n ) : isSignedIn ? (\n <>\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest)} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Create your own attributed derivative of this work.\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showDealOption && onProposeDeal ? (\n <ActionButton\n label=\"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 tone=\"blue\"\n renderHelp={renderHelp}\n />\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 label=\"List on Marketplace\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Transfer\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"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 tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n ) : isSignedIn ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"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 tone=\"purple\"\n renderHelp={renderHelp}\n />\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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AC,OAAE,WAAU,+CAA8C;AAAA;AAAA,UACvC,WAAW;AAAA,UAAO;AAAA,WACtC;AAAA,QACA,4CAAC,SAAI,WAAU,aACZ,qBAAW,IAAI,CAAC,QACf,6CAAC,SAAwB,WAAU,4EACjC;AAAA,uDAAC,SAAI,WAAU,WACb;AAAA,wDAAC,OAAE,WAAU,qBACX,uDAAC,UAAK,WAAU,oCACb;AAAA,oDAAmB,IAAI,MAAM,SAAS;AAAA,cACvC,4CAAC,qCAAa,QAAQ,IAAI,MAAM,YAAY,IAAI,MAAM,IAAI;AAAA,eAC5D,GACF;AAAA,YACA,6CAAC,SAAI,WAAU,kCACb;AAAA,0DAAC,yCAAe,SAAS,IAAI,SAAS,OAAO,GAAG,UAAU,OAAO,WAAU,iCAAgC;AAAA,cAC3G,4CAAC,UAAK,WAAU,iCAAgC,kBAAC;AAAA,cACjD,6CAAC,SAAI,WAAU,yDACb;AAAA,4DAAC,6BAAM,WAAU,WAAU;AAAA,oBAC1B,uBAAU,IAAI,OAAO;AAAA,iBACxB;AAAA,eACF;AAAA,aACF;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,UAAU;AAAA,cACV,SAAS,MAAM,YAAY,GAAG;AAAA,cAC9B,WAAU;AAAA,cAEV;AAAA,4DAAC,mCAAY,WAAU,eAAc;AAAA,gBAAE;AAAA;AAAA;AAAA,UAEzC;AAAA,aAxBQ,IAAI,SAyBd,CACD,GACH;AAAA,SACF,IACE;AAAA,OACN;AAAA,KACF;AAEJ;","names":[]}
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, Loader2,\n ShoppingCart, Tag, X,\n} from \"lucide-react\";\nimport { CurrencyIcon, CurrencyAmount } from \"./currency-icon.js\";\nimport { AddressDisplay } from \"./address-display.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\ninterface ActionButtonProps {\n label: string;\n icon: ReactNode;\n onClick: () => void;\n tone: \"blue\" | \"orange\" | \"purple\" | \"destructive\" | \"transparent\";\n disabled?: boolean;\n helpContent?: string;\n renderHelp: (content: string) => ReactNode;\n}\n\nconst actionToneClass: Record<ActionButtonProps[\"tone\"], string> = {\n blue: \"bg-brand-blue\",\n orange: \"bg-brand-orange\",\n purple: \"bg-brand-purple\",\n destructive: \"bg-destructive\",\n transparent: \"bg-transparent\",\n};\n\nfunction ActionButton({ label, icon, onClick, tone, disabled = false, helpContent, renderHelp }: ActionButtonProps) {\n return (\n <div className={`btn-border-animated p-[1px] rounded-2xl ${disabled ? \"opacity-40 pointer-events-none\" : \"\"}`}>\n <button\n className={`w-full h-10 rounded-[15px] flex items-center justify-center gap-2 px-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] disabled:opacity-50 ${actionToneClass[tone]}`}\n disabled={disabled}\n onClick={onClick}\n >\n {icon}\n {label}\n {helpContent ? renderHelp(helpContent) : null}\n </button>\n </div>\n );\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}\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 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 label=\"Cancel\"\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=\"destructive\"\n renderHelp={renderHelp}\n />\n ) : null}\n <ActionButton label=\"List on Marketplace\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} tone=\"blue\" renderHelp={renderHelp} />\n <ActionButton label=\"Transfer\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"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 tone=\"purple\"\n renderHelp={renderHelp}\n />\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 label=\"Buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest!)} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n </div>\n </>\n )}\n </div>\n ) : isSignedIn ? (\n <>\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest)} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Create your own attributed derivative of this work.\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showDealOption && onProposeDeal ? (\n <ActionButton\n label=\"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 tone=\"blue\"\n renderHelp={renderHelp}\n />\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 label=\"List on Marketplace\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Transfer\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"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 tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n ) : isSignedIn ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"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 tone=\"purple\"\n renderHelp={renderHelp}\n />\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":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwCI;AArCJ,0BAGO;AACP,2BAA6C;AAC7C,6BAA+B;AAC/B,oBAAsD;AACtD,kBAA0B;AAoB1B,MAAM,kBAA6D;AAAA,EACjE,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,aAAa;AACf;AAEA,SAAS,aAAa,EAAE,OAAO,MAAM,SAAS,MAAM,WAAW,OAAO,aA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