@medialane/ui 0.258.0 → 0.260.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 (167) hide show
  1. package/dist/components/activities-feed.cjs +5 -1
  2. package/dist/components/activities-feed.cjs.map +1 -1
  3. package/dist/components/activities-feed.js +5 -1
  4. package/dist/components/activities-feed.js.map +1 -1
  5. package/dist/components/activity-feed-shell.cjs +3 -1
  6. package/dist/components/activity-feed-shell.cjs.map +1 -1
  7. package/dist/components/activity-feed-shell.js +3 -1
  8. package/dist/components/activity-feed-shell.js.map +1 -1
  9. package/dist/components/button.d.cts +1 -1
  10. package/dist/components/button.d.ts +1 -1
  11. package/dist/components/coins-explorer.cjs +5 -1
  12. package/dist/components/coins-explorer.cjs.map +1 -1
  13. package/dist/components/coins-explorer.js +6 -2
  14. package/dist/components/coins-explorer.js.map +1 -1
  15. package/dist/components/comments-section.cjs +7 -6
  16. package/dist/components/comments-section.cjs.map +1 -1
  17. package/dist/components/comments-section.js +7 -6
  18. package/dist/components/comments-section.js.map +1 -1
  19. package/dist/components/discover-community-section.cjs +5 -1
  20. package/dist/components/discover-community-section.cjs.map +1 -1
  21. package/dist/components/discover-community-section.js +5 -1
  22. package/dist/components/discover-community-section.js.map +1 -1
  23. package/dist/components/discover-feed-section.cjs +5 -1
  24. package/dist/components/discover-feed-section.cjs.map +1 -1
  25. package/dist/components/discover-feed-section.js +5 -1
  26. package/dist/components/discover-feed-section.js.map +1 -1
  27. package/dist/components/fast-mint/fast-mint.d.cts +2 -2
  28. package/dist/components/fast-mint/fast-mint.d.ts +2 -2
  29. package/dist/components/fast-mint/success-view.cjs +2 -2
  30. package/dist/components/fast-mint/success-view.cjs.map +1 -1
  31. package/dist/components/fast-mint/success-view.js +2 -2
  32. package/dist/components/fast-mint/success-view.js.map +1 -1
  33. package/dist/components/ip-type-page.cjs +3 -2
  34. package/dist/components/ip-type-page.cjs.map +1 -1
  35. package/dist/components/ip-type-page.js +3 -2
  36. package/dist/components/ip-type-page.js.map +1 -1
  37. package/dist/components/launchpad/coin-create.cjs +9 -7
  38. package/dist/components/launchpad/coin-create.cjs.map +1 -1
  39. package/dist/components/launchpad/coin-create.js +9 -7
  40. package/dist/components/launchpad/coin-create.js.map +1 -1
  41. package/dist/components/launchpad/collection-create-form.cjs +11 -14
  42. package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
  43. package/dist/components/launchpad/collection-create-form.js +12 -15
  44. package/dist/components/launchpad/collection-create-form.js.map +1 -1
  45. package/dist/components/launchpad/collection-create-presets.cjs +8 -8
  46. package/dist/components/launchpad/collection-create-presets.cjs.map +1 -1
  47. package/dist/components/launchpad/collection-create-presets.d.cts +2 -1
  48. package/dist/components/launchpad/collection-create-presets.d.ts +2 -1
  49. package/dist/components/launchpad/collection-create-presets.js +8 -8
  50. package/dist/components/launchpad/collection-create-presets.js.map +1 -1
  51. package/dist/components/launchpad/edition-mint.cjs +9 -7
  52. package/dist/components/launchpad/edition-mint.cjs.map +1 -1
  53. package/dist/components/launchpad/edition-mint.js +9 -7
  54. package/dist/components/launchpad/edition-mint.js.map +1 -1
  55. package/dist/components/launchpad/pop-create.cjs +5 -6
  56. package/dist/components/launchpad/pop-create.cjs.map +1 -1
  57. package/dist/components/launchpad/pop-create.js +5 -6
  58. package/dist/components/launchpad/pop-create.js.map +1 -1
  59. package/dist/components/launchpad/remix-mint.cjs +9 -7
  60. package/dist/components/launchpad/remix-mint.cjs.map +1 -1
  61. package/dist/components/launchpad/remix-mint.js +9 -7
  62. package/dist/components/launchpad/remix-mint.js.map +1 -1
  63. package/dist/components/launchpad/single-edition-mint.cjs +9 -7
  64. package/dist/components/launchpad/single-edition-mint.cjs.map +1 -1
  65. package/dist/components/launchpad/single-edition-mint.js +9 -7
  66. package/dist/components/launchpad/single-edition-mint.js.map +1 -1
  67. package/dist/components/launchpad/sponsorship-create.cjs +5 -6
  68. package/dist/components/launchpad/sponsorship-create.cjs.map +1 -1
  69. package/dist/components/launchpad/sponsorship-create.js +5 -6
  70. package/dist/components/launchpad/sponsorship-create.js.map +1 -1
  71. package/dist/components/launchpad/tier-mint-form.cjs +5 -6
  72. package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
  73. package/dist/components/launchpad/tier-mint-form.js +5 -6
  74. package/dist/components/launchpad/tier-mint-form.js.map +1 -1
  75. package/dist/components/launchpad/tier-mint-presets.cjs +2 -2
  76. package/dist/components/launchpad/tier-mint-presets.cjs.map +1 -1
  77. package/dist/components/launchpad/tier-mint-presets.d.cts +2 -1
  78. package/dist/components/launchpad/tier-mint-presets.d.ts +2 -1
  79. package/dist/components/launchpad/tier-mint-presets.js +2 -2
  80. package/dist/components/launchpad/tier-mint-presets.js.map +1 -1
  81. package/dist/components/marketplace-dialog-primitives.cjs +1 -31
  82. package/dist/components/marketplace-dialog-primitives.cjs.map +1 -1
  83. package/dist/components/marketplace-dialog-primitives.d.cts +1 -12
  84. package/dist/components/marketplace-dialog-primitives.d.ts +1 -12
  85. package/dist/components/marketplace-dialog-primitives.js +2 -31
  86. package/dist/components/marketplace-dialog-primitives.js.map +1 -1
  87. package/dist/components/media-wallet/media-wallet-activity.cjs +5 -1
  88. package/dist/components/media-wallet/media-wallet-activity.cjs.map +1 -1
  89. package/dist/components/media-wallet/media-wallet-activity.js +5 -1
  90. package/dist/components/media-wallet/media-wallet-activity.js.map +1 -1
  91. package/dist/components/media-wallet/media-wallet-home.cjs +3 -2
  92. package/dist/components/media-wallet/media-wallet-home.cjs.map +1 -1
  93. package/dist/components/media-wallet/media-wallet-home.js +3 -2
  94. package/dist/components/media-wallet/media-wallet-home.js.map +1 -1
  95. package/dist/components/media-wallet/media-wallet-send.cjs +5 -2
  96. package/dist/components/media-wallet/media-wallet-send.cjs.map +1 -1
  97. package/dist/components/media-wallet/media-wallet-send.js +5 -2
  98. package/dist/components/media-wallet/media-wallet-send.js.map +1 -1
  99. package/dist/components/media-wallet/success-dialog.cjs +5 -11
  100. package/dist/components/media-wallet/success-dialog.cjs.map +1 -1
  101. package/dist/components/media-wallet/success-dialog.js +5 -11
  102. package/dist/components/media-wallet/success-dialog.js.map +1 -1
  103. package/dist/components/pop-claim-button.cjs +7 -6
  104. package/dist/components/pop-claim-button.cjs.map +1 -1
  105. package/dist/components/pop-claim-button.js +7 -6
  106. package/dist/components/pop-claim-button.js.map +1 -1
  107. package/dist/components/pop-manage-page.cjs +5 -4
  108. package/dist/components/pop-manage-page.cjs.map +1 -1
  109. package/dist/components/pop-manage-page.js +5 -4
  110. package/dist/components/pop-manage-page.js.map +1 -1
  111. package/dist/components/portfolio-sponsorships.cjs +15 -8
  112. package/dist/components/portfolio-sponsorships.cjs.map +1 -1
  113. package/dist/components/portfolio-sponsorships.js +15 -8
  114. package/dist/components/portfolio-sponsorships.js.map +1 -1
  115. package/dist/components/service-collections-page.cjs +2 -2
  116. package/dist/components/service-collections-page.cjs.map +1 -1
  117. package/dist/components/service-collections-page.d.cts +2 -2
  118. package/dist/components/service-collections-page.d.ts +2 -2
  119. package/dist/components/service-collections-page.js +2 -2
  120. package/dist/components/service-collections-page.js.map +1 -1
  121. package/dist/components/sheet.d.cts +1 -1
  122. package/dist/components/sheet.d.ts +1 -1
  123. package/dist/components/sponsorship-offer-page.cjs +9 -8
  124. package/dist/components/sponsorship-offer-page.cjs.map +1 -1
  125. package/dist/components/sponsorship-offer-page.js +9 -8
  126. package/dist/components/sponsorship-offer-page.js.map +1 -1
  127. package/dist/components/transaction-success.cjs +60 -0
  128. package/dist/components/transaction-success.cjs.map +1 -0
  129. package/dist/components/transaction-success.d.cts +20 -0
  130. package/dist/components/transaction-success.d.ts +20 -0
  131. package/dist/components/transaction-success.js +26 -0
  132. package/dist/components/transaction-success.js.map +1 -0
  133. package/dist/components/transfer-collection-ownership.cjs +6 -8
  134. package/dist/components/transfer-collection-ownership.cjs.map +1 -1
  135. package/dist/components/transfer-collection-ownership.js +6 -8
  136. package/dist/components/transfer-collection-ownership.js.map +1 -1
  137. package/dist/index.cjs +9 -8
  138. package/dist/index.cjs.map +1 -1
  139. package/dist/index.d.cts +4 -3
  140. package/dist/index.d.ts +4 -3
  141. package/dist/index.js +6 -6
  142. package/dist/index.js.map +1 -1
  143. package/dist/utils/empty-messages.cjs +62 -0
  144. package/dist/utils/empty-messages.cjs.map +1 -0
  145. package/dist/utils/empty-messages.d.cts +40 -0
  146. package/dist/utils/empty-messages.d.ts +40 -0
  147. package/dist/utils/empty-messages.js +38 -0
  148. package/dist/utils/empty-messages.js.map +1 -0
  149. package/dist/utils/success-messages.cjs +106 -0
  150. package/dist/utils/success-messages.cjs.map +1 -0
  151. package/dist/utils/success-messages.d.cts +58 -0
  152. package/dist/utils/success-messages.d.ts +58 -0
  153. package/dist/utils/success-messages.js +82 -0
  154. package/dist/utils/success-messages.js.map +1 -0
  155. package/package.json +3 -3
  156. package/dist/components/creation-success.cjs +0 -64
  157. package/dist/components/creation-success.cjs.map +0 -1
  158. package/dist/components/creation-success.d.cts +0 -20
  159. package/dist/components/creation-success.d.ts +0 -20
  160. package/dist/components/creation-success.js +0 -30
  161. package/dist/components/creation-success.js.map +0 -1
  162. package/dist/components/transaction-done.cjs +0 -46
  163. package/dist/components/transaction-done.cjs.map +0 -1
  164. package/dist/components/transaction-done.d.cts +0 -18
  165. package/dist/components/transaction-done.d.ts +0 -18
  166. package/dist/components/transaction-done.js +0 -22
  167. package/dist/components/transaction-done.js.map +0 -1
@@ -12,16 +12,17 @@ import { FadeIn } from "./motion-primitives.js";
12
12
  import { RewardEarned } from "./rewards/reward-earned.js";
13
13
  import { ServiceHeader } from "./service-header.js";
14
14
  import { TransactionDialog } from "./transaction-dialog.js";
15
- import { TransactionDone } from "./transaction-done.js";
15
+ import { TransactionSuccess } from "./transaction-success.js";
16
16
  import { shortenAddress } from "../utils/address.js";
17
17
  import { runIntentCalls } from "../utils/run-intent-calls.js";
18
18
  import { useImageUrl } from "../utils/use-image-url.js";
19
19
  import { useSponsorshipBids, useSponsorshipOffer } from "../utils/use-sponsorship.js";
20
20
  import { useToken } from "../utils/use-tokens.js";
21
21
  import { useTransaction } from "../utils/use-transaction.js";
22
+ import { successMessages } from "../utils/success-messages.js";
22
23
  const COPY = {
23
- bid: { title: "Place bid", working: "Placing your bid\u2026", done: "Bid placed!", description: "Your bid is now on-chain." },
24
- accept: { title: "Accept bid", working: "Accepting the bid\u2026", done: "Bid accepted!", description: "The license is minted to the sponsor." }
24
+ bid: { title: "Place bid", working: "Placing your bid\u2026", message: successMessages.bidPlaced() },
25
+ accept: { title: "Accept bid", working: "Accepting the bid\u2026", message: successMessages.bidAccepted() }
25
26
  };
26
27
  function SponsorshipOfferPage({ offerId }) {
27
28
  const app = useMedialaneApp();
@@ -77,13 +78,13 @@ function SponsorshipOfferPage({ offerId }) {
77
78
  const copy = COPY[action];
78
79
  return /* @__PURE__ */ jsxs("div", { className: "pb-16", children: [
79
80
  /* @__PURE__ */ jsx(TransactionDialog, { tx, title: copy.title, workingLabel: copy.working, firstStepLabel: "Prepare", children: /* @__PURE__ */ jsx(
80
- TransactionDone,
81
+ TransactionSuccess,
81
82
  {
82
- tx,
83
83
  name,
84
- title: copy.done,
85
- description: copy.description,
86
- footer: action === "bid" ? /* @__PURE__ */ jsx(RewardEarned, { actionType: "place_sponsorship_bid" }) : void 0
84
+ ...copy.message,
85
+ txHash: tx.txHash,
86
+ actions: [{ label: "Done", onClick: tx.reset }],
87
+ children: action === "bid" && /* @__PURE__ */ jsx(RewardEarned, { actionType: "place_sponsorship_bid" })
87
88
  }
88
89
  ) }),
89
90
  /* @__PURE__ */ jsxs("section", { className: "px-4 pt-10 max-w-3xl mx-auto space-y-6", children: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/sponsorship-offer-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Handshake, ImageIcon, Loader2 } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, normalizeAddress } from \"@medialane/sdk\";\nimport { BackButton } from \"./back-button.js\";\nimport { Button } from \"./button.js\";\nimport Image from \"./image.js\";\nimport { Input } from \"./input.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionDone } from \"./transaction-done.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useSponsorshipBids, useSponsorshipOffer } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\ntype Action = \"bid\" | \"accept\";\n\nconst COPY = {\n bid: { title: \"Place bid\", working: \"Placing your bid…\", done: \"Bid placed!\", description: \"Your bid is now on-chain.\" },\n accept: { title: \"Accept bid\", working: \"Accepting the bid…\", done: \"Bid accepted!\", description: \"The license is minted to the sponsor.\" },\n} as const;\n\nexport function SponsorshipOfferPage({ offerId }: { offerId: string }) {\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const resolveImage = useImageUrl();\n const { offer, isLoading, mutate: mutateOffer } = useSponsorshipOffer(offerId);\n const { bids, isLoading: bidsLoading, mutate: mutateBids } = useSponsorshipBids(offerId);\n const { token } = useToken(offer?.nftContract ?? \"\", offer?.tokenId ?? \"\");\n const tx = useTransaction();\n const [action, setAction] = useState<Action>(\"bid\");\n const [amount, setAmount] = useState(\"\");\n const [activeSponsor, setActiveSponsor] = useState<string | null>(null);\n\n useEffect(() => {\n if (tx.phase !== \"success\") return;\n setAmount(\"\");\n void Promise.all([mutateOffer(), mutateBids()]);\n }, [tx.phase, mutateOffer, mutateBids]);\n\n if (isLoading) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">Loading offer…</div>;\n }\n if (!offer) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">Offer not found.</div>;\n }\n\n const isOwner = !!walletAddress && normalizeAddress(\"STARKNET\", walletAddress) === normalizeAddress(\"STARKNET\", offer.author);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n const name = token?.metadata?.name ?? `Token #${offer.tokenId}`;\n const imageUrl = resolveImage(token?.metadata?.image);\n const minDisplay = paymentToken ? `${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : offer.minAmount;\n const format = (value: string) => (paymentToken ? `${formatAmount(value, paymentToken.decimals)} ${paymentToken.symbol}` : value);\n\n const placeBid = () => {\n if (!walletAddress || !paymentToken) return;\n setAction(\"bid\");\n void tx.run(async (signer) => {\n const value = BigInt(Math.round(Number(amount) * 10 ** paymentToken.decimals));\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid\", { sponsor: walletAddress, offerId: offer.offerId, amount: value.toString(), paymentToken: offer.paymentToken }),\n );\n });\n };\n\n const acceptBid = (sponsor: string) => {\n if (!walletAddress) return;\n setAction(\"accept\");\n setActiveSponsor(sponsor);\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid-accept\", { author: walletAddress, offerId: offer.offerId, sponsor }),\n );\n })\n .finally(() => setActiveSponsor(null));\n };\n\n const copy = COPY[action];\n\n return (\n <div className=\"pb-16\">\n <TransactionDialog tx={tx} title={copy.title} workingLabel={copy.working} firstStepLabel=\"Prepare\">\n <TransactionDone\n tx={tx}\n name={name}\n title={copy.done}\n description={copy.description}\n footer={action === \"bid\" ? <RewardEarned actionType=\"place_sponsorship_bid\" /> : undefined}\n />\n </TransactionDialog>\n\n <section className=\"px-4 pt-10 max-w-3xl mx-auto space-y-6\">\n <BackButton fallbackHref=\"/launchpad/sponsorship\" />\n <FadeIn>\n <ServiceHeader plain icon={<Handshake className=\"h-4 w-4 text-white\" />} title={name} subtitle={offer.open ? \"Open for bids\" : \"Closed\"} />\n </FadeIn>\n\n <FadeIn>\n <div className=\"rounded-2xl border border-border/40 overflow-hidden\">\n <div className=\"relative aspect-square bg-muted/40\">\n {imageUrl ? (\n <Image src={imageUrl} alt={name} fill sizes=\"(min-width: 768px) 768px, 100vw\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <ImageIcon className=\"h-8 w-8 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n <div className=\"p-5 grid grid-cols-2 sm:grid-cols-4 gap-4 text-sm\">\n <div>\n <p className=\"text-xs text-muted-foreground\">Minimum bid</p>\n <p className=\"font-semibold\">{minDisplay}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">License length</p>\n <p className=\"font-semibold\">{Math.round(Number(offer.duration) / 86400)} days</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">Resale royalty</p>\n <p className=\"font-semibold\">{(offer.royaltyBps / 100).toFixed(1)}%</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">Owner</p>\n <p className=\"font-semibold\">{shortenAddress(offer.author)}</p>\n </div>\n </div>\n </div>\n </FadeIn>\n\n {!offer.open ? (\n <FadeIn>\n <p className=\"text-sm text-muted-foreground text-center py-6\">This offer is no longer open.</p>\n </FadeIn>\n ) : isOwner ? (\n <FadeIn>\n <div className=\"space-y-3\">\n <p className=\"text-sm font-semibold\">Bids</p>\n {bidsLoading ? (\n <p className=\"text-xs text-muted-foreground\">Loading bids…</p>\n ) : bids.length === 0 ? (\n <p className=\"text-xs text-muted-foreground\">No bids yet.</p>\n ) : (\n <div className=\"space-y-2\">\n {bids.map((bid) => (\n <div key={bid.id} className=\"flex items-center justify-between gap-3 rounded-xl border border-border/30 p-3\">\n <div>\n <p className=\"text-sm font-medium\">{shortenAddress(bid.sponsor)}</p>\n <p className=\"text-xs text-muted-foreground\">{format(bid.amount)}</p>\n </div>\n <Button size=\"sm\" className=\"bg-brand-rose hover:brightness-110 text-white\" disabled={busy} onClick={() => acceptBid(bid.sponsor)}>\n {busy && activeSponsor === bid.sponsor ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : \"Accept\"}\n </Button>\n </div>\n ))}\n </div>\n )}\n </div>\n </FadeIn>\n ) : (\n <FadeIn>\n <div className=\"space-y-2\">\n <p className=\"text-sm font-semibold\">Place a bid</p>\n <div className=\"flex gap-2\">\n <Input type=\"number\" min={0} step=\"0.01\" placeholder=\"Your bid\" value={amount} onChange={(e) => setAmount(e.target.value)} disabled={busy} />\n <Button className=\"bg-brand-rose hover:brightness-110 text-white shrink-0\" disabled={busy || !walletAddress || !paymentToken || !amount || Number(amount) <= 0} onClick={placeBid}>\n {busy ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : \"Place bid\"}\n </Button>\n </div>\n {!walletAddress && (\n <button type=\"button\" className=\"text-xs text-muted-foreground underline\" onClick={app.onRequireWallet}>\n {app.connectLabel ?? \"Connect\"} to place a bid\n </button>\n )}\n {!paymentToken && <p className=\"text-xs text-destructive\">This offer uses a currency the app does not support yet.</p>}\n <p className=\"text-xs text-muted-foreground\">\n Placing a bid approves the offer&apos;s payment token — no funds move until the owner accepts.\n </p>\n </div>\n </FadeIn>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";AAgDW,cAsEG,YAtEH;AA9CX,SAAS,WAAW,gBAAgB;AACpC,SAAS,WAAW,WAAW,eAAe;AAC9C,SAAS,cAAc,mBAAmB,wBAAwB;AAClE,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,OAAO,WAAW;AAClB,SAAS,aAAa;AACtB,SAAS,uBAAuB;AAChC,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,oBA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,MAAM,KAAK,GAAG,SAAS,UACtK,iBAAO,oBAAC,WAAQ,WAAU,wBAAuB,IAAK,aACzD;AAAA,WACF;AAAA,QACC,CAAC,iBACA,qBAAC,YAAO,MAAK,UAAS,WAAU,2CAA0C,SAAS,IAAI,iBACpF;AAAA,cAAI,gBAAgB;AAAA,UAAU;AAAA,WACjC;AAAA,QAED,CAAC,gBAAgB,oBAAC,OAAE,WAAU,4BAA2B,sEAAwD;AAAA,QAClH,oBAAC,OAAE,WAAU,iCAAgC,4GAE7C;AAAA,SACF,GACF;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/sponsorship-offer-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Handshake, ImageIcon, Loader2 } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, normalizeAddress } from \"@medialane/sdk\";\nimport { BackButton } from \"./back-button.js\";\nimport { Button } from \"./button.js\";\nimport Image from \"./image.js\";\nimport { Input } from \"./input.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\nimport { useSponsorshipBids, useSponsorshipOffer } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\n\ntype Action = \"bid\" | \"accept\";\n\nconst COPY = {\n bid: { title: \"Place bid\", working: \"Placing your bid…\", message: successMessages.bidPlaced() },\n accept: { title: \"Accept bid\", working: \"Accepting the bid…\", message: successMessages.bidAccepted() },\n} as const;\n\nexport function SponsorshipOfferPage({ offerId }: { offerId: string }) {\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const resolveImage = useImageUrl();\n const { offer, isLoading, mutate: mutateOffer } = useSponsorshipOffer(offerId);\n const { bids, isLoading: bidsLoading, mutate: mutateBids } = useSponsorshipBids(offerId);\n const { token } = useToken(offer?.nftContract ?? \"\", offer?.tokenId ?? \"\");\n const tx = useTransaction();\n const [action, setAction] = useState<Action>(\"bid\");\n const [amount, setAmount] = useState(\"\");\n const [activeSponsor, setActiveSponsor] = useState<string | null>(null);\n\n useEffect(() => {\n if (tx.phase !== \"success\") return;\n setAmount(\"\");\n void Promise.all([mutateOffer(), mutateBids()]);\n }, [tx.phase, mutateOffer, mutateBids]);\n\n if (isLoading) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">Loading offer…</div>;\n }\n if (!offer) {\n return <div className=\"max-w-3xl mx-auto px-4 pt-24 pb-8 text-center text-sm text-muted-foreground\">Offer not found.</div>;\n }\n\n const isOwner = !!walletAddress && normalizeAddress(\"STARKNET\", walletAddress) === normalizeAddress(\"STARKNET\", offer.author);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n const name = token?.metadata?.name ?? `Token #${offer.tokenId}`;\n const imageUrl = resolveImage(token?.metadata?.image);\n const minDisplay = paymentToken ? `${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : offer.minAmount;\n const format = (value: string) => (paymentToken ? `${formatAmount(value, paymentToken.decimals)} ${paymentToken.symbol}` : value);\n\n const placeBid = () => {\n if (!walletAddress || !paymentToken) return;\n setAction(\"bid\");\n void tx.run(async (signer) => {\n const value = BigInt(Math.round(Number(amount) * 10 ** paymentToken.decimals));\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid\", { sponsor: walletAddress, offerId: offer.offerId, amount: value.toString(), paymentToken: offer.paymentToken }),\n );\n });\n };\n\n const acceptBid = (sponsor: string) => {\n if (!walletAddress) return;\n setAction(\"accept\");\n setActiveSponsor(sponsor);\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"sponsorship-bid-accept\", { author: walletAddress, offerId: offer.offerId, sponsor }),\n );\n })\n .finally(() => setActiveSponsor(null));\n };\n\n const copy = COPY[action];\n\n return (\n <div className=\"pb-16\">\n <TransactionDialog tx={tx} title={copy.title} workingLabel={copy.working} firstStepLabel=\"Prepare\">\n <TransactionSuccess\n name={name}\n {...copy.message}\n txHash={tx.txHash}\n actions={[{ label: \"Done\", onClick: tx.reset }]}\n >\n {action === \"bid\" && <RewardEarned actionType=\"place_sponsorship_bid\" />}\n </TransactionSuccess>\n </TransactionDialog>\n\n <section className=\"px-4 pt-10 max-w-3xl mx-auto space-y-6\">\n <BackButton fallbackHref=\"/launchpad/sponsorship\" />\n <FadeIn>\n <ServiceHeader plain icon={<Handshake className=\"h-4 w-4 text-white\" />} title={name} subtitle={offer.open ? \"Open for bids\" : \"Closed\"} />\n </FadeIn>\n\n <FadeIn>\n <div className=\"rounded-2xl border border-border/40 overflow-hidden\">\n <div className=\"relative aspect-square bg-muted/40\">\n {imageUrl ? (\n <Image src={imageUrl} alt={name} fill sizes=\"(min-width: 768px) 768px, 100vw\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center\">\n <ImageIcon className=\"h-8 w-8 text-muted-foreground/40\" />\n </div>\n )}\n </div>\n <div className=\"p-5 grid grid-cols-2 sm:grid-cols-4 gap-4 text-sm\">\n <div>\n <p className=\"text-xs text-muted-foreground\">Minimum bid</p>\n <p className=\"font-semibold\">{minDisplay}</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">License length</p>\n <p className=\"font-semibold\">{Math.round(Number(offer.duration) / 86400)} days</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">Resale royalty</p>\n <p className=\"font-semibold\">{(offer.royaltyBps / 100).toFixed(1)}%</p>\n </div>\n <div>\n <p className=\"text-xs text-muted-foreground\">Owner</p>\n <p className=\"font-semibold\">{shortenAddress(offer.author)}</p>\n </div>\n </div>\n </div>\n </FadeIn>\n\n {!offer.open ? (\n <FadeIn>\n <p className=\"text-sm text-muted-foreground text-center py-6\">This offer is no longer open.</p>\n </FadeIn>\n ) : isOwner ? (\n <FadeIn>\n <div className=\"space-y-3\">\n <p className=\"text-sm font-semibold\">Bids</p>\n {bidsLoading ? (\n <p className=\"text-xs text-muted-foreground\">Loading bids…</p>\n ) : bids.length === 0 ? (\n <p className=\"text-xs text-muted-foreground\">No bids yet.</p>\n ) : (\n <div className=\"space-y-2\">\n {bids.map((bid) => (\n <div key={bid.id} className=\"flex items-center justify-between gap-3 rounded-xl border border-border/30 p-3\">\n <div>\n <p className=\"text-sm font-medium\">{shortenAddress(bid.sponsor)}</p>\n <p className=\"text-xs text-muted-foreground\">{format(bid.amount)}</p>\n </div>\n <Button size=\"sm\" className=\"bg-brand-rose hover:brightness-110 text-white\" disabled={busy} onClick={() => acceptBid(bid.sponsor)}>\n {busy && activeSponsor === bid.sponsor ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : \"Accept\"}\n </Button>\n </div>\n ))}\n </div>\n )}\n </div>\n </FadeIn>\n ) : (\n <FadeIn>\n <div className=\"space-y-2\">\n <p className=\"text-sm font-semibold\">Place a bid</p>\n <div className=\"flex gap-2\">\n <Input type=\"number\" min={0} step=\"0.01\" placeholder=\"Your bid\" value={amount} onChange={(e) => setAmount(e.target.value)} disabled={busy} />\n <Button className=\"bg-brand-rose hover:brightness-110 text-white shrink-0\" disabled={busy || !walletAddress || !paymentToken || !amount || Number(amount) <= 0} onClick={placeBid}>\n {busy ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : \"Place bid\"}\n </Button>\n </div>\n {!walletAddress && (\n <button type=\"button\" className=\"text-xs text-muted-foreground underline\" onClick={app.onRequireWallet}>\n {app.connectLabel ?? \"Connect\"} to place a bid\n </button>\n )}\n {!paymentToken && <p className=\"text-xs text-destructive\">This offer uses a currency the app does not support yet.</p>}\n <p className=\"text-xs text-muted-foreground\">\n Placing a bid approves the offer&apos;s payment token — no funds move until the owner accepts.\n </p>\n </div>\n </FadeIn>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";AAiDW,cAuEG,YAvEH;AA/CX,SAAS,WAAW,gBAAgB;AACpC,SAAS,WAAW,WAAW,eAAe;AAC9C,SAAS,cAAc,mBAAmB,wBAAwB;AAClE,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AACvB,OAAO,WAAW;AAClB,SAAS,aAAa;AACtB,SAAS,uBAAuB;AAChC,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB,2BAA2B;AACxD,SAAS,gBAAgB;AACzB,SAAS,sBAAsB;AAC/B,SAAS,uBAAuB;AAIhC,MAAM,OAAO;AAAA,EACX,KAAK,EAAE,OAAO,aAAa,SAAS,0BAAqB,SAAS,gBAAgB,UAAU,EAAE;AAAA,EAC9F,QAAQ,EAAE,OAAO,cAAc,SAAS,2BAAsB,SAAS,gBAAgB,YAAY,EAAE;AACvG;AAEO,SAAS,qBAAqB,EAAE,QAAQ,GAAwB;AACrE,QAAM,MAAM,gBAAgB;AAC5B,QAAM,gBAAgB,IAAI;AAC1B,QAAM,eAAe,YAAY;AACjC,QAAM,EAAE,OAAO,WAAW,QAAQ,YAAY,IAAI,oBAAoB,OAAO;AAC7E,QAAM,EAAE,MAAM,WAAW,aAAa,QAAQ,WAAW,IAAI,mBAAmB,OAAO;AACvF,QAAM,EAAE,MAAM,IAAI,SAAS,OAAO,eAAe,IAAI,OAAO,WAAW,EAAE;AACzE,QAAM,KAAK,eAAe;A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yBAAe,IAAI,OAAO,GAAE;AAAA,YAChE,oBAAC,OAAE,WAAU,iCAAiC,iBAAO,IAAI,MAAM,GAAE;AAAA,aACnE;AAAA,UACA,oBAAC,UAAO,MAAK,MAAK,WAAU,iDAAgD,UAAU,MAAM,SAAS,MAAM,UAAU,IAAI,OAAO,GAC7H,kBAAQ,kBAAkB,IAAI,UAAU,oBAAC,WAAQ,WAAU,4BAA2B,IAAK,UAC9F;AAAA,aAPQ,IAAI,EAQd,CACD,GACH;AAAA,SAEJ,GACF,IAEA,oBAAC,UACC,+BAAC,SAAI,WAAU,aACb;AAAA,4BAAC,OAAE,WAAU,yBAAwB,yBAAW;AAAA,QAChD,qBAAC,SAAI,WAAU,cACb;AAAA,8BAAC,SAAM,MAAK,UAAS,KAAK,GAAG,MAAK,QAAO,aAAY,YAAW,OAAO,QAAQ,UAAU,CAAC,MAAM,UAAU,EAAE,OAAO,KAAK,GAAG,UAAU,MAAM;AAAA,UAC3I,oBAAC,UAAO,WAAU,0DAAyD,UAAU,QAAQ,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,UAAU,OAAO,MAAM,KAAK,GAAG,SAAS,UACtK,iBAAO,oBAAC,WAAQ,WAAU,wBAAuB,IAAK,aACzD;AAAA,WACF;AAAA,QACC,CAAC,iBACA,qBAAC,YAAO,MAAK,UAAS,WAAU,2CAA0C,SAAS,IAAI,iBACpF;AAAA,cAAI,gBAAgB;AAAA,UAAU;AAAA,WACjC;AAAA,QAED,CAAC,gBAAgB,oBAAC,OAAE,WAAU,4BAA2B,sEAAwD;AAAA,QAClH,oBAAC,OAAE,WAAU,iCAAgC,4GAE7C;AAAA,SACF,GACF;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,60 @@
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 transaction_success_exports = {};
31
+ __export(transaction_success_exports, {
32
+ TransactionSuccess: () => TransactionSuccess
33
+ });
34
+ module.exports = __toCommonJS(transaction_success_exports);
35
+ var import_jsx_runtime = require("react/jsx-runtime");
36
+ var import_lucide_react = require("lucide-react");
37
+ var import_link = __toESM(require("./link.js"), 1);
38
+ var import_image = __toESM(require("./image.js"), 1);
39
+ var import_button = require("./button.js");
40
+ var import_marketplace_dialog_primitives = require("./marketplace-dialog-primitives.js");
41
+ var import_explorer_url = require("../utils/explorer-url.js");
42
+ function TransactionSuccess({ name, image, title, description, txHash, actions, children }) {
43
+ const shown = actions.filter((a) => !!a);
44
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex w-full flex-col items-center gap-6 py-2 text-center", children: [
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-40 w-40 overflow-hidden rounded-3xl border border-border bg-muted shadow-lg", children: image ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: image, alt: name, fill: true, sizes: "160px", unoptimized: true, className: "object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex h-full w-full items-center justify-center text-muted-foreground/40", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ImageIcon, { className: "h-10 w-10" }) }) }),
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { role: "status", className: "w-full min-w-0 space-y-1", children: [
47
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "line-clamp-2 break-words text-xl font-bold", children: name }),
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-medium", children: title }),
49
+ description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "break-words text-sm text-muted-foreground", children: description }),
50
+ txHash && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_marketplace_dialog_primitives.MarketplaceTxLink, { txHash, explorerUrl: import_explorer_url.EXPLORER_URL, className: "pt-1" })
51
+ ] }),
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex w-full flex-col gap-2", children: shown.map((action, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { asChild: !!action.href, variant: i === 0 ? "default" : "outline", className: "w-full", onClick: action.onClick, children: action.href ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: action.href, children: action.label }) : action.label }, action.label)) }),
53
+ children
54
+ ] });
55
+ }
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {
58
+ TransactionSuccess
59
+ });
60
+ //# sourceMappingURL=transaction-success.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/transaction-success.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { ImageIcon } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Button } from \"./button.js\";\nimport { MarketplaceTxLink } from \"./marketplace-dialog-primitives.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nexport interface TransactionSuccessAction {\n label: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface TransactionSuccessProps {\n name: string;\n image?: string | null;\n title: string;\n description?: ReactNode;\n txHash?: string | null;\n actions: Array<TransactionSuccessAction | undefined>;\n children?: ReactNode;\n}\n\nexport function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps) {\n const shown = actions.filter((a): a is TransactionSuccessAction => !!a);\n return (\n <div className=\"flex w-full flex-col items-center gap-6 py-2 text-center\">\n <div className=\"relative h-40 w-40 overflow-hidden rounded-3xl border border-border bg-muted shadow-lg\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"160px\" unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center text-muted-foreground/40\">\n <ImageIcon className=\"h-10 w-10\" />\n </div>\n )}\n </div>\n\n <div role=\"status\" className=\"w-full min-w-0 space-y-1\">\n <p className=\"line-clamp-2 break-words text-xl font-bold\">{name}</p>\n <p className=\"font-medium\">{title}</p>\n {description && <div className=\"break-words text-sm text-muted-foreground\">{description}</div>}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={EXPLORER_URL} className=\"pt-1\" />}\n </div>\n\n <div className=\"flex w-full flex-col gap-2\">\n {shown.map((action, i) => (\n <Button key={action.label} asChild={!!action.href} variant={i === 0 ? \"default\" : \"outline\"} className=\"w-full\" onClick={action.onClick}>\n {action.href ? <Link href={action.href}>{action.label}</Link> : action.label}\n </Button>\n ))}\n </div>\n\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgCU;AA7BV,0BAA0B;AAC1B,kBAAiB;AACjB,mBAAkB;AAClB,oBAAuB;AACvB,2CAAkC;AAClC,0BAA6B;AAkBtB,SAAS,mBAAmB,EAAE,MAAM,OAAO,OAAO,aAAa,QAAQ,SAAS,SAAS,GAA4B;AAC1H,QAAM,QAAQ,QAAQ,OAAO,CAAC,MAAqC,CAAC,CAAC,CAAC;AACtE,SACE,6CAAC,SAAI,WAAU,4DACb;AAAA,gDAAC,SAAI,WAAU,0FACZ,kBACC,4CAAC,aAAAA,SAAA,EAAM,KAAK,OAAO,KAAK,MAAM,MAAI,MAAC,OAAM,SAAQ,aAAW,MAAC,WAAU,gBAAe,IAEtF,4CAAC,SAAI,WAAU,2EACb,sDAAC,iCAAU,WAAU,aAAY,GACnC,GAEJ;AAAA,IAEA,6CAAC,SAAI,MAAK,UAAS,WAAU,4BAC3B;AAAA,kDAAC,OAAE,WAAU,8CAA8C,gBAAK;AAAA,MAChE,4CAAC,OAAE,WAAU,eAAe,iBAAM;AAAA,MACjC,eAAe,4CAAC,SAAI,WAAU,6CAA6C,uBAAY;AAAA,MACvF,UAAU,4CAAC,0DAAkB,QAAgB,aAAa,kCAAc,WAAU,QAAO;AAAA,OAC5F;AAAA,IAEA,4CAAC,SAAI,WAAU,8BACZ,gBAAM,IAAI,CAAC,QAAQ,MAClB,4CAAC,wBAA0B,SAAS,CAAC,CAAC,OAAO,MAAM,SAAS,MAAM,IAAI,YAAY,WAAW,WAAU,UAAS,SAAS,OAAO,SAC7H,iBAAO,OAAO,4CAAC,YAAAC,SAAA,EAAK,MAAM,OAAO,MAAO,iBAAO,OAAM,IAAU,OAAO,SAD5D,OAAO,KAEpB,CACD,GACH;AAAA,IAEC;AAAA,KACH;AAEJ;","names":["Image","Link"]}
@@ -0,0 +1,20 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface TransactionSuccessAction {
5
+ label: string;
6
+ href?: string;
7
+ onClick?: () => void;
8
+ }
9
+ interface TransactionSuccessProps {
10
+ name: string;
11
+ image?: string | null;
12
+ title: string;
13
+ description?: ReactNode;
14
+ txHash?: string | null;
15
+ actions: Array<TransactionSuccessAction | undefined>;
16
+ children?: ReactNode;
17
+ }
18
+ declare function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps): react_jsx_runtime.JSX.Element;
19
+
20
+ export { TransactionSuccess, type TransactionSuccessAction, type TransactionSuccessProps };
@@ -0,0 +1,20 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ReactNode } from 'react';
3
+
4
+ interface TransactionSuccessAction {
5
+ label: string;
6
+ href?: string;
7
+ onClick?: () => void;
8
+ }
9
+ interface TransactionSuccessProps {
10
+ name: string;
11
+ image?: string | null;
12
+ title: string;
13
+ description?: ReactNode;
14
+ txHash?: string | null;
15
+ actions: Array<TransactionSuccessAction | undefined>;
16
+ children?: ReactNode;
17
+ }
18
+ declare function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps): react_jsx_runtime.JSX.Element;
19
+
20
+ export { TransactionSuccess, type TransactionSuccessAction, type TransactionSuccessProps };
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { ImageIcon } from "lucide-react";
4
+ import Link from "./link.js";
5
+ import Image from "./image.js";
6
+ import { Button } from "./button.js";
7
+ import { MarketplaceTxLink } from "./marketplace-dialog-primitives.js";
8
+ import { EXPLORER_URL } from "../utils/explorer-url.js";
9
+ function TransactionSuccess({ name, image, title, description, txHash, actions, children }) {
10
+ const shown = actions.filter((a) => !!a);
11
+ return /* @__PURE__ */ jsxs("div", { className: "flex w-full flex-col items-center gap-6 py-2 text-center", children: [
12
+ /* @__PURE__ */ jsx("div", { className: "relative h-40 w-40 overflow-hidden rounded-3xl border border-border bg-muted shadow-lg", children: image ? /* @__PURE__ */ jsx(Image, { src: image, alt: name, fill: true, sizes: "160px", unoptimized: true, className: "object-cover" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center text-muted-foreground/40", children: /* @__PURE__ */ jsx(ImageIcon, { className: "h-10 w-10" }) }) }),
13
+ /* @__PURE__ */ jsxs("div", { role: "status", className: "w-full min-w-0 space-y-1", children: [
14
+ /* @__PURE__ */ jsx("p", { className: "line-clamp-2 break-words text-xl font-bold", children: name }),
15
+ /* @__PURE__ */ jsx("p", { className: "font-medium", children: title }),
16
+ description && /* @__PURE__ */ jsx("div", { className: "break-words text-sm text-muted-foreground", children: description }),
17
+ txHash && /* @__PURE__ */ jsx(MarketplaceTxLink, { txHash, explorerUrl: EXPLORER_URL, className: "pt-1" })
18
+ ] }),
19
+ /* @__PURE__ */ jsx("div", { className: "flex w-full flex-col gap-2", children: shown.map((action, i) => /* @__PURE__ */ jsx(Button, { asChild: !!action.href, variant: i === 0 ? "default" : "outline", className: "w-full", onClick: action.onClick, children: action.href ? /* @__PURE__ */ jsx(Link, { href: action.href, children: action.label }) : action.label }, action.label)) }),
20
+ children
21
+ ] });
22
+ }
23
+ export {
24
+ TransactionSuccess
25
+ };
26
+ //# sourceMappingURL=transaction-success.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/transaction-success.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { ImageIcon } from \"lucide-react\";\nimport Link from \"./link.js\";\nimport Image from \"./image.js\";\nimport { Button } from \"./button.js\";\nimport { MarketplaceTxLink } from \"./marketplace-dialog-primitives.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\n\nexport interface TransactionSuccessAction {\n label: string;\n href?: string;\n onClick?: () => void;\n}\n\nexport interface TransactionSuccessProps {\n name: string;\n image?: string | null;\n title: string;\n description?: ReactNode;\n txHash?: string | null;\n actions: Array<TransactionSuccessAction | undefined>;\n children?: ReactNode;\n}\n\nexport function TransactionSuccess({ name, image, title, description, txHash, actions, children }: TransactionSuccessProps) {\n const shown = actions.filter((a): a is TransactionSuccessAction => !!a);\n return (\n <div className=\"flex w-full flex-col items-center gap-6 py-2 text-center\">\n <div className=\"relative h-40 w-40 overflow-hidden rounded-3xl border border-border bg-muted shadow-lg\">\n {image ? (\n <Image src={image} alt={name} fill sizes=\"160px\" unoptimized className=\"object-cover\" />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center text-muted-foreground/40\">\n <ImageIcon className=\"h-10 w-10\" />\n </div>\n )}\n </div>\n\n <div role=\"status\" className=\"w-full min-w-0 space-y-1\">\n <p className=\"line-clamp-2 break-words text-xl font-bold\">{name}</p>\n <p className=\"font-medium\">{title}</p>\n {description && <div className=\"break-words text-sm text-muted-foreground\">{description}</div>}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={EXPLORER_URL} className=\"pt-1\" />}\n </div>\n\n <div className=\"flex w-full flex-col gap-2\">\n {shown.map((action, i) => (\n <Button key={action.label} asChild={!!action.href} variant={i === 0 ? \"default\" : \"outline\"} className=\"w-full\" onClick={action.onClick}>\n {action.href ? <Link href={action.href}>{action.label}</Link> : action.label}\n </Button>\n ))}\n </div>\n\n {children}\n </div>\n );\n}\n"],"mappings":";AAgCU,cAQJ,YARI;AA7BV,SAAS,iBAAiB;AAC1B,OAAO,UAAU;AACjB,OAAO,WAAW;AAClB,SAAS,cAAc;AACvB,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAkBtB,SAAS,mBAAmB,EAAE,MAAM,OAAO,OAAO,aAAa,QAAQ,SAAS,SAAS,GAA4B;AAC1H,QAAM,QAAQ,QAAQ,OAAO,CAAC,MAAqC,CAAC,CAAC,CAAC;AACtE,SACE,qBAAC,SAAI,WAAU,4DACb;AAAA,wBAAC,SAAI,WAAU,0FACZ,kBACC,oBAAC,SAAM,KAAK,OAAO,KAAK,MAAM,MAAI,MAAC,OAAM,SAAQ,aAAW,MAAC,WAAU,gBAAe,IAEtF,oBAAC,SAAI,WAAU,2EACb,8BAAC,aAAU,WAAU,aAAY,GACnC,GAEJ;AAAA,IAEA,qBAAC,SAAI,MAAK,UAAS,WAAU,4BAC3B;AAAA,0BAAC,OAAE,WAAU,8CAA8C,gBAAK;AAAA,MAChE,oBAAC,OAAE,WAAU,eAAe,iBAAM;AAAA,MACjC,eAAe,oBAAC,SAAI,WAAU,6CAA6C,uBAAY;AAAA,MACvF,UAAU,oBAAC,qBAAkB,QAAgB,aAAa,cAAc,WAAU,QAAO;AAAA,OAC5F;AAAA,IAEA,oBAAC,SAAI,WAAU,8BACZ,gBAAM,IAAI,CAAC,QAAQ,MAClB,oBAAC,UAA0B,SAAS,CAAC,CAAC,OAAO,MAAM,SAAS,MAAM,IAAI,YAAY,WAAW,WAAU,UAAS,SAAS,OAAO,SAC7H,iBAAO,OAAO,oBAAC,QAAK,MAAM,OAAO,MAAO,iBAAO,OAAM,IAAU,OAAO,SAD5D,OAAO,KAEpB,CACD,GACH;AAAA,IAEC;AAAA,KACH;AAEJ;","names":[]}
@@ -33,9 +33,10 @@ var import_label = require("./label.js");
33
33
  var import_marketplace_dialog_primitives = require("./marketplace-dialog-primitives.js");
34
34
  var import_medialane_app = require("./medialane-app.js");
35
35
  var import_transaction_dialog = require("./transaction-dialog.js");
36
- var import_transaction_done = require("./transaction-done.js");
36
+ var import_transaction_success = require("./transaction-success.js");
37
37
  var import_address = require("../utils/address.js");
38
38
  var import_run_intent_calls = require("../utils/run-intent-calls.js");
39
+ var import_success_messages = require("../utils/success-messages.js");
39
40
  var import_use_transaction = require("../utils/use-transaction.js");
40
41
  function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }) {
41
42
  const app = (0, import_medialane_app.useMedialaneApp)();
@@ -117,15 +118,12 @@ function TransferCollectionOwnership({ collectionId, currentOwner, collectionNam
117
118
  ] })
118
119
  ] }) }),
119
120
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_dialog.TransactionDialog, { tx, title: "Transfer ownership", workingLabel: "Transferring ownership\u2026", firstStepLabel: "Prepare transfer", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
120
- import_transaction_done.TransactionDone,
121
+ import_transaction_success.TransactionSuccess,
121
122
  {
122
- tx,
123
123
  name: collectionName ?? "Collection",
124
- title: "Ownership transferred",
125
- description: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "tabular-nums", children: [
126
- "New owner: ",
127
- (0, import_address.shortenAddress)(trimmed)
128
- ] })
124
+ ...import_success_messages.successMessages.ownershipTransferred({ name: collectionName ?? "the collection", to: (0, import_address.shortenAddress)(trimmed) }),
125
+ txHash: tx.txHash,
126
+ actions: [{ label: "Done", onClick: tx.reset }]
129
127
  }
130
128
  ) })
131
129
  ] });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionDone } from \"./transaction-done.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"outline\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n Transfer ownership\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">Transfer ownership of {collectionName ?? \"collection\"}</DialogTitle>\n <DialogDescription className=\"sr-only\">Transfer the on-chain owner of this collection. Existing tokens are unaffected.</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={`Transfer ownership to ${shortenAddress(trimmed)}?`}\n secondaryLabel=\"Back\"\n onSecondary={() => setConfirming(false)}\n primaryLabel=\"Transfer ownership\"\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">Transfer collection ownership</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">New owner address</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-red-500\">Not a valid Starknet address.</p>}\n {wouldNoop && <p className=\"text-xs text-amber-500\">This is already the current owner.</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n Cancel\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n Continue\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title=\"Transfer ownership\" workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionDone\n tx={tx}\n name={collectionName ?? \"Collection\"}\n title=\"Ownership transferred\"\n description={<span className=\"tabular-nums\">New owner: {shortenAddress(trimmed)}</span>}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsDI;AApDJ,mBAAyB;AACzB,0BAA6B;AAC7B,iBAAiC;AACjC,oBAAuB;AACvB,oBAAsE;AACtE,mBAAsB;AACtB,mBAAsB;AACtB,2CAAuC;AACvC,2BAAgC;AAChC,gCAAkC;AAClC,8BAAgC;AAChC,qBAA+B;AAC/B,8BAA+B;AAC/B,6BAA+B;AASxB,SAAS,4BAA4B,EAAE,cAAc,cAAc,gBAAgB,cAAc,GAAqC;AAC3I,QAAM,UAAM,sCAAgB;AAC5B,QAAM,SAAK,uCAAe;AAC1B,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,KAAK;AACtC,QAAM,CAAC,YAAY,aAAa,QAAI,uBAAS,KAAK;AAClD,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,EAAE;AAE3C,QAAM,UAAU,SAAS,KAAK;AAC9B,QAAM,UAAU,wBAAwB,KAAK,OAAO;AACpD,QAAM,YAAY,eAAW,6BAAiB,YAAY,OAAO,UAAM,6BAAiB,YAAY,YAAY;AAEhH,QAAM,QAAQ,MAAM;AAClB,YAAQ,KAAK;AACb,kBAAc,KAAK;AAAA,EACrB;AAEA,QA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AI,WAAU,aACb;AAAA,sDAAC,sBAAM,SAAQ,aAAY,+BAAiB;AAAA,UAC5C;AAAA,YAAC;AAAA;AAAA,cACC,IAAG;AAAA,cACH,aAAY;AAAA,cACZ,OAAO;AAAA,cACP,UAAU,CAAC,MAAM,YAAY,EAAE,OAAO,KAAK;AAAA,cAC3C,WAAU;AAAA,cACV,YAAY;AAAA,cACZ,cAAa;AAAA;AAAA,UACf;AAAA,UACC,WAAW,CAAC,WAAW,4CAAC,OAAE,WAAU,wBAAuB,2CAA6B;AAAA,UACxF,aAAa,4CAAC,OAAE,WAAU,0BAAyB,gDAAkC;AAAA,WACxF;AAAA,QACA,6CAAC,SAAI,WAAU,mBACb;AAAA,sDAAC,wBAAO,SAAQ,SAAQ,WAAU,UAAS,SAAS,OAAO,oBAE3D;AAAA,UACA,4CAAC,wBAAO,WAAU,UAAS,SAAS,MAAM,cAAc,IAAI,GAAG,UAAU,CAAC,WAAW,aAAa,CAAC,IAAI,eAAe,sBAEtH;AAAA,WACF;AAAA,SACF;AAAA,OAEJ,GACF;AAAA,IAEA,4CAAC,+CAAkB,IAAQ,OAAM,sBAAqB,cAAa,gCAA0B,gBAAe,oBAC1G;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAM,kBAAkB;AAAA,QACxB,OAAM;AAAA,QACN,aAAa,6CAAC,UAAK,WAAU,gBAAe;AAAA;AAAA,cAAY,+BAAe,OAAO;AAAA,WAAE;AAAA;AAAA,IAClF,GACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"outline\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n Transfer ownership\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">Transfer ownership of {collectionName ?? \"collection\"}</DialogTitle>\n <DialogDescription className=\"sr-only\">Transfer the on-chain owner of this collection. Existing tokens are unaffected.</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={`Transfer ownership to ${shortenAddress(trimmed)}?`}\n secondaryLabel=\"Back\"\n onSecondary={() => setConfirming(false)}\n primaryLabel=\"Transfer ownership\"\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">Transfer collection ownership</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">New owner address</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-red-500\">Not a valid Starknet address.</p>}\n {wouldNoop && <p className=\"text-xs text-amber-500\">This is already the current owner.</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n Cancel\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n Continue\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title=\"Transfer ownership\" workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionSuccess\n name={collectionName ?? \"Collection\"}\n {...successMessages.ownershipTransferred({ name: collectionName ?? \"the collection\", to: shortenAddress(trimmed) })}\n txHash={tx.txHash}\n actions={[{ label: \"Done\", onClick: tx.reset }]}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAuDI;AArDJ,mBAAyB;AACzB,0BAA6B;AAC7B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I,GAAG,UAAU,CAAC,WAAW,aAAa,CAAC,IAAI,eAAe,sBAEtH;AAAA,WACF;AAAA,SACF;AAAA,OAEJ,GACF;AAAA,IAEA,4CAAC,+CAAkB,IAAQ,OAAM,sBAAqB,cAAa,gCAA0B,gBAAe,oBAC1G;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,kBAAkB;AAAA,QACvB,GAAG,wCAAgB,qBAAqB,EAAE,MAAM,kBAAkB,kBAAkB,QAAI,+BAAe,OAAO,EAAE,CAAC;AAAA,QAClH,QAAQ,GAAG;AAAA,QACX,SAAS,CAAC,EAAE,OAAO,QAAQ,SAAS,GAAG,MAAM,CAAC;AAAA;AAAA,IAChD,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -10,9 +10,10 @@ import { Label } from "./label.js";
10
10
  import { MarketplaceConfirmStep } from "./marketplace-dialog-primitives.js";
11
11
  import { useMedialaneApp } from "./medialane-app.js";
12
12
  import { TransactionDialog } from "./transaction-dialog.js";
13
- import { TransactionDone } from "./transaction-done.js";
13
+ import { TransactionSuccess } from "./transaction-success.js";
14
14
  import { shortenAddress } from "../utils/address.js";
15
15
  import { runIntentCalls } from "../utils/run-intent-calls.js";
16
+ import { successMessages } from "../utils/success-messages.js";
16
17
  import { useTransaction } from "../utils/use-transaction.js";
17
18
  function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }) {
18
19
  const app = useMedialaneApp();
@@ -94,15 +95,12 @@ function TransferCollectionOwnership({ collectionId, currentOwner, collectionNam
94
95
  ] })
95
96
  ] }) }),
96
97
  /* @__PURE__ */ jsx(TransactionDialog, { tx, title: "Transfer ownership", workingLabel: "Transferring ownership\u2026", firstStepLabel: "Prepare transfer", children: /* @__PURE__ */ jsx(
97
- TransactionDone,
98
+ TransactionSuccess,
98
99
  {
99
- tx,
100
100
  name: collectionName ?? "Collection",
101
- title: "Ownership transferred",
102
- description: /* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
103
- "New owner: ",
104
- shortenAddress(trimmed)
105
- ] })
101
+ ...successMessages.ownershipTransferred({ name: collectionName ?? "the collection", to: shortenAddress(trimmed) }),
102
+ txHash: tx.txHash,
103
+ actions: [{ label: "Done", onClick: tx.reset }]
106
104
  }
107
105
  ) })
108
106
  ] });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionDone } from \"./transaction-done.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"outline\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n Transfer ownership\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">Transfer ownership of {collectionName ?? \"collection\"}</DialogTitle>\n <DialogDescription className=\"sr-only\">Transfer the on-chain owner of this collection. Existing tokens are unaffected.</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={`Transfer ownership to ${shortenAddress(trimmed)}?`}\n secondaryLabel=\"Back\"\n onSecondary={() => setConfirming(false)}\n primaryLabel=\"Transfer ownership\"\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">Transfer collection ownership</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">New owner address</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-red-500\">Not a valid Starknet address.</p>}\n {wouldNoop && <p className=\"text-xs text-amber-500\">This is already the current owner.</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n Cancel\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n Continue\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title=\"Transfer ownership\" workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionDone\n tx={tx}\n name={collectionName ?? \"Collection\"}\n title=\"Ownership transferred\"\n description={<span className=\"tabular-nums\">New owner: {shortenAddress(trimmed)}</span>}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";AAsDI,mBAEI,KADF,YADF;AApDJ,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,QAAQ,eAAe,mBAAmB,mBAAmB;AACtE,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AASxB,SAAS,4BAA4B,EAAE,cAAc,cAAc,gBAAgB,cAAc,GAAqC;AAC3I,QAAM,MAAM,gBAAgB;AAC5B,QAAM,KAAK,eAAe;AAC1B,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAE3C,QAAM,UAAU,SAAS,KAAK;AAC9B,QAAM,UAAU,wBAAwB,KAAK,OAAO;AACpD,QAAM,YAAY,WAAW,iBAAiB,YAAY,OAAO,MAAM,iBAAiB,YAAY,YAAY;AAEhH,QAAM,QAAQ,MAAM;AAClB,YAAQ,KAAK;AACb,kBAAc,KAAK;AAAA,EACrB;AAEA,QAAM,WAAW,MAAM;AACrB,UAAM;AACN,SAAK,GACF,IAAI,OAAO,WAAW;AACrB,YAAM;AAAA,QAAe;AAAA,QAAQ,MAC3B,IAAI,UAAU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AA,cACZ,OAAO;AAAA,cACP,UAAU,CAAC,MAAM,YAAY,EAAE,OAAO,KAAK;AAAA,cAC3C,WAAU;AAAA,cACV,YAAY;AAAA,cACZ,cAAa;AAAA;AAAA,UACf;AAAA,UACC,WAAW,CAAC,WAAW,oBAAC,OAAE,WAAU,wBAAuB,2CAA6B;AAAA,UACxF,aAAa,oBAAC,OAAE,WAAU,0BAAyB,gDAAkC;AAAA,WACxF;AAAA,QACA,qBAAC,SAAI,WAAU,mBACb;AAAA,8BAAC,UAAO,SAAQ,SAAQ,WAAU,UAAS,SAAS,OAAO,oBAE3D;AAAA,UACA,oBAAC,UAAO,WAAU,UAAS,SAAS,MAAM,cAAc,IAAI,GAAG,UAAU,CAAC,WAAW,aAAa,CAAC,IAAI,eAAe,sBAEtH;AAAA,WACF;AAAA,SACF;AAAA,OAEJ,GACF;AAAA,IAEA,oBAAC,qBAAkB,IAAQ,OAAM,sBAAqB,cAAa,gCAA0B,gBAAe,oBAC1G;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAM,kBAAkB;AAAA,QACxB,OAAM;AAAA,QACN,aAAa,qBAAC,UAAK,WAAU,gBAAe;AAAA;AAAA,UAAY,eAAe,OAAO;AAAA,WAAE;AAAA;AAAA,IAClF,GACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"outline\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n Transfer ownership\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">Transfer ownership of {collectionName ?? \"collection\"}</DialogTitle>\n <DialogDescription className=\"sr-only\">Transfer the on-chain owner of this collection. Existing tokens are unaffected.</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={`Transfer ownership to ${shortenAddress(trimmed)}?`}\n secondaryLabel=\"Back\"\n onSecondary={() => setConfirming(false)}\n primaryLabel=\"Transfer ownership\"\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">Transfer collection ownership</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">New owner address</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-red-500\">Not a valid Starknet address.</p>}\n {wouldNoop && <p className=\"text-xs text-amber-500\">This is already the current owner.</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n Cancel\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n Continue\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title=\"Transfer ownership\" workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionSuccess\n name={collectionName ?? \"Collection\"}\n {...successMessages.ownershipTransferred({ name: collectionName ?? \"the collection\", to: shortenAddress(trimmed) })}\n txHash={tx.txHash}\n actions={[{ label: \"Done\", onClick: tx.reset }]}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";AAuDI,mBAEI,KADF,YADF;AArDJ,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,QAAQ,eAAe,mBAAmB,mBAAmB;AACtE,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,8BAA8B;AACvC,SAAS,uBAAu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AA,SACF;AAAA,OAEJ,GACF;AAAA,IAEA,oBAAC,qBAAkB,IAAQ,OAAM,sBAAqB,cAAa,gCAA0B,gBAAe,oBAC1G;AAAA,MAAC;AAAA;AAAA,QACC,MAAM,kBAAkB;AAAA,QACvB,GAAG,gBAAgB,qBAAqB,EAAE,MAAM,kBAAkB,kBAAkB,IAAI,eAAe,OAAO,EAAE,CAAC;AAAA,QAClH,QAAQ,GAAG;AAAA,QACX,SAAS,CAAC,EAAE,OAAO,QAAQ,SAAS,GAAG,MAAM,CAAC;AAAA;AAAA,IAChD,GACF;AAAA,KACF;AAEJ;","names":[]}
package/dist/index.cjs CHANGED
@@ -108,7 +108,6 @@ __export(index_exports, {
108
108
  CollectionsPage: () => import_collections_page.CollectionsPage,
109
109
  CommentsSection: () => import_comments_section.CommentsSection,
110
110
  CreationRecord: () => import_creation_record.CreationRecord,
111
- CreationSuccess: () => import_creation_success.CreationSuccess,
112
111
  CreatorAnalytics: () => import_creator_analytics.CreatorAnalytics,
113
112
  CreatorChip: () => import_creator_chip.CreatorChip,
114
113
  CreatorHeader: () => import_creator_header.CreatorHeader,
@@ -261,7 +260,6 @@ __export(index_exports, {
261
260
  MarketplaceErrorState: () => import_marketplace_dialog_primitives.MarketplaceErrorState,
262
261
  MarketplaceProcessingState: () => import_marketplace_dialog_primitives.MarketplaceProcessingState,
263
262
  MarketplaceSignInGate: () => import_marketplace_dialog_primitives.MarketplaceSignInGate,
264
- MarketplaceSuccessState: () => import_marketplace_dialog_primitives.MarketplaceSuccessState,
265
263
  MarketplaceTxLink: () => import_marketplace_dialog_primitives.MarketplaceTxLink,
266
264
  MediaWalletOverlay: () => import_media_wallet_overlay.MediaWalletOverlay,
267
265
  MedialaneAppProvider: () => import_medialane_app.MedialaneAppProvider,
@@ -387,7 +385,7 @@ __export(index_exports, {
387
385
  TokenCardSkeleton: () => import_token_card.TokenCardSkeleton,
388
386
  TokenGlyph: () => import_token_glyph.TokenGlyph,
389
387
  TransactionDialog: () => import_transaction_dialog.TransactionDialog,
390
- TransactionDone: () => import_transaction_done.TransactionDone,
388
+ TransactionSuccess: () => import_transaction_success.TransactionSuccess,
391
389
  TransferCollectionOwnership: () => import_transfer_collection_ownership.TransferCollectionOwnership,
392
390
  UserFacingError: () => import_describe_error.UserFacingError,
393
391
  WalletRequired: () => import_wallet_required.WalletRequired,
@@ -418,6 +416,7 @@ __export(index_exports, {
418
416
  detectAssetKind: () => import_asset_page.detectAssetKind,
419
417
  detectPasskeySupport: () => import_passkey_support.detectPasskeySupport,
420
418
  emailCodeReducer: () => import_email_code.emailCodeReducer,
419
+ emptyMessages: () => import_empty_messages.emptyMessages,
421
420
  fdvUsd: () => import_coins.fdvUsd,
422
421
  feeLabelFor: () => import_self_fund_consent_dialog.feeLabelFor,
423
422
  formatActivity: () => import_format_activity.formatActivity,
@@ -470,6 +469,7 @@ __export(index_exports, {
470
469
  sitemapEntries: () => import_sitemap_data.sitemapEntries,
471
470
  sitemapIndexXml: () => import_sitemap_data.sitemapIndexXml,
472
471
  sortOrders: () => import_order_sort_control.sortOrders,
472
+ successMessages: () => import_success_messages.successMessages,
473
473
  suggestLaunchpadSymbol: () => import_launchpad_defaults.suggestLaunchpadSymbol,
474
474
  timeAgo: () => import_time.timeAgo,
475
475
  timeUntil: () => import_time.timeUntil,
@@ -756,14 +756,15 @@ var import_sponsorship_offers_page = require("./components/sponsorship-offers-pa
756
756
  var import_sponsorship_offer_page = require("./components/sponsorship-offer-page.js");
757
757
  var import_portfolio_sponsorships = require("./components/portfolio-sponsorships.js");
758
758
  var import_transfer_collection_ownership = require("./components/transfer-collection-ownership.js");
759
- var import_transaction_done = require("./components/transaction-done.js");
760
759
  var import_coin_create = require("./components/launchpad/coin-create.js");
761
760
  var import_wallet_required = require("./components/wallet-required.js");
762
761
  var import_claim_route_shell = require("./components/claim-route-shell.js");
763
762
  var import_use_launchpad_image_upload = require("./utils/use-launchpad-image-upload.js");
764
763
  var import_portfolio_cache = require("./utils/portfolio-cache.js");
765
764
  var import_transaction_dialog = require("./components/transaction-dialog.js");
766
- var import_creation_success = require("./components/creation-success.js");
765
+ var import_transaction_success = require("./components/transaction-success.js");
766
+ var import_success_messages = require("./utils/success-messages.js");
767
+ var import_empty_messages = require("./utils/empty-messages.js");
767
768
  var import_medialane_collection_card = require("./components/medialane-collection-card.js");
768
769
  var import_token_glyph = require("./components/token-glyph.js");
769
770
  var import_stat_tile = require("./components/stat-tile.js");
@@ -939,7 +940,6 @@ var import_asset_accents = require("./utils/asset-accents.js");
939
940
  CollectionsPage,
940
941
  CommentsSection,
941
942
  CreationRecord,
942
- CreationSuccess,
943
943
  CreatorAnalytics,
944
944
  CreatorChip,
945
945
  CreatorHeader,
@@ -1092,7 +1092,6 @@ var import_asset_accents = require("./utils/asset-accents.js");
1092
1092
  MarketplaceErrorState,
1093
1093
  MarketplaceProcessingState,
1094
1094
  MarketplaceSignInGate,
1095
- MarketplaceSuccessState,
1096
1095
  MarketplaceTxLink,
1097
1096
  MediaWalletOverlay,
1098
1097
  MedialaneAppProvider,
@@ -1218,7 +1217,7 @@ var import_asset_accents = require("./utils/asset-accents.js");
1218
1217
  TokenCardSkeleton,
1219
1218
  TokenGlyph,
1220
1219
  TransactionDialog,
1221
- TransactionDone,
1220
+ TransactionSuccess,
1222
1221
  TransferCollectionOwnership,
1223
1222
  UserFacingError,
1224
1223
  WalletRequired,
@@ -1249,6 +1248,7 @@ var import_asset_accents = require("./utils/asset-accents.js");
1249
1248
  detectAssetKind,
1250
1249
  detectPasskeySupport,
1251
1250
  emailCodeReducer,
1251
+ emptyMessages,
1252
1252
  fdvUsd,
1253
1253
  feeLabelFor,
1254
1254
  formatActivity,
@@ -1301,6 +1301,7 @@ var import_asset_accents = require("./utils/asset-accents.js");
1301
1301
  sitemapEntries,
1302
1302
  sitemapIndexXml,
1303
1303
  sortOrders,
1304
+ successMessages,
1304
1305
  suggestLaunchpadSymbol,
1305
1306
  timeAgo,
1306
1307
  timeUntil,