@medialane/ui 0.258.0 → 0.259.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 (103) hide show
  1. package/dist/components/comments-section.cjs +5 -4
  2. package/dist/components/comments-section.cjs.map +1 -1
  3. package/dist/components/comments-section.js +5 -4
  4. package/dist/components/comments-section.js.map +1 -1
  5. package/dist/components/launchpad/coin-create.cjs +9 -7
  6. package/dist/components/launchpad/coin-create.cjs.map +1 -1
  7. package/dist/components/launchpad/coin-create.js +9 -7
  8. package/dist/components/launchpad/coin-create.js.map +1 -1
  9. package/dist/components/launchpad/collection-create-form.cjs +11 -14
  10. package/dist/components/launchpad/collection-create-form.cjs.map +1 -1
  11. package/dist/components/launchpad/collection-create-form.js +12 -15
  12. package/dist/components/launchpad/collection-create-form.js.map +1 -1
  13. package/dist/components/launchpad/collection-create-presets.cjs +8 -8
  14. package/dist/components/launchpad/collection-create-presets.cjs.map +1 -1
  15. package/dist/components/launchpad/collection-create-presets.d.cts +2 -1
  16. package/dist/components/launchpad/collection-create-presets.d.ts +2 -1
  17. package/dist/components/launchpad/collection-create-presets.js +8 -8
  18. package/dist/components/launchpad/collection-create-presets.js.map +1 -1
  19. package/dist/components/launchpad/edition-mint.cjs +9 -7
  20. package/dist/components/launchpad/edition-mint.cjs.map +1 -1
  21. package/dist/components/launchpad/edition-mint.js +9 -7
  22. package/dist/components/launchpad/edition-mint.js.map +1 -1
  23. package/dist/components/launchpad/pop-create.cjs +5 -6
  24. package/dist/components/launchpad/pop-create.cjs.map +1 -1
  25. package/dist/components/launchpad/pop-create.js +5 -6
  26. package/dist/components/launchpad/pop-create.js.map +1 -1
  27. package/dist/components/launchpad/remix-mint.cjs +9 -7
  28. package/dist/components/launchpad/remix-mint.cjs.map +1 -1
  29. package/dist/components/launchpad/remix-mint.js +9 -7
  30. package/dist/components/launchpad/remix-mint.js.map +1 -1
  31. package/dist/components/launchpad/single-edition-mint.cjs +9 -7
  32. package/dist/components/launchpad/single-edition-mint.cjs.map +1 -1
  33. package/dist/components/launchpad/single-edition-mint.js +9 -7
  34. package/dist/components/launchpad/single-edition-mint.js.map +1 -1
  35. package/dist/components/launchpad/sponsorship-create.cjs +5 -6
  36. package/dist/components/launchpad/sponsorship-create.cjs.map +1 -1
  37. package/dist/components/launchpad/sponsorship-create.js +5 -6
  38. package/dist/components/launchpad/sponsorship-create.js.map +1 -1
  39. package/dist/components/launchpad/tier-mint-form.cjs +5 -6
  40. package/dist/components/launchpad/tier-mint-form.cjs.map +1 -1
  41. package/dist/components/launchpad/tier-mint-form.js +5 -6
  42. package/dist/components/launchpad/tier-mint-form.js.map +1 -1
  43. package/dist/components/launchpad/tier-mint-presets.cjs +2 -2
  44. package/dist/components/launchpad/tier-mint-presets.cjs.map +1 -1
  45. package/dist/components/launchpad/tier-mint-presets.d.cts +2 -1
  46. package/dist/components/launchpad/tier-mint-presets.d.ts +2 -1
  47. package/dist/components/launchpad/tier-mint-presets.js +2 -2
  48. package/dist/components/launchpad/tier-mint-presets.js.map +1 -1
  49. package/dist/components/marketplace-dialog-primitives.cjs +0 -30
  50. package/dist/components/marketplace-dialog-primitives.cjs.map +1 -1
  51. package/dist/components/marketplace-dialog-primitives.d.cts +1 -12
  52. package/dist/components/marketplace-dialog-primitives.d.ts +1 -12
  53. package/dist/components/marketplace-dialog-primitives.js +1 -30
  54. package/dist/components/marketplace-dialog-primitives.js.map +1 -1
  55. package/dist/components/pop-claim-button.cjs +5 -4
  56. package/dist/components/pop-claim-button.cjs.map +1 -1
  57. package/dist/components/pop-claim-button.js +5 -4
  58. package/dist/components/pop-claim-button.js.map +1 -1
  59. package/dist/components/pop-manage-page.cjs +2 -2
  60. package/dist/components/pop-manage-page.cjs.map +1 -1
  61. package/dist/components/pop-manage-page.js +2 -2
  62. package/dist/components/pop-manage-page.js.map +1 -1
  63. package/dist/components/portfolio-sponsorships.cjs +2 -2
  64. package/dist/components/portfolio-sponsorships.cjs.map +1 -1
  65. package/dist/components/portfolio-sponsorships.js +2 -2
  66. package/dist/components/portfolio-sponsorships.js.map +1 -1
  67. package/dist/components/sponsorship-offer-page.cjs +5 -4
  68. package/dist/components/sponsorship-offer-page.cjs.map +1 -1
  69. package/dist/components/sponsorship-offer-page.js +5 -4
  70. package/dist/components/sponsorship-offer-page.js.map +1 -1
  71. package/dist/components/{creation-success.cjs → transaction-success.cjs} +14 -15
  72. package/dist/components/transaction-success.cjs.map +1 -0
  73. package/dist/components/transaction-success.d.cts +20 -0
  74. package/dist/components/transaction-success.d.ts +20 -0
  75. package/dist/components/{creation-success.js → transaction-success.js} +10 -11
  76. package/dist/components/transaction-success.js.map +1 -0
  77. package/dist/components/transfer-collection-ownership.cjs +5 -4
  78. package/dist/components/transfer-collection-ownership.cjs.map +1 -1
  79. package/dist/components/transfer-collection-ownership.js +5 -4
  80. package/dist/components/transfer-collection-ownership.js.map +1 -1
  81. package/dist/index.cjs +6 -8
  82. package/dist/index.cjs.map +1 -1
  83. package/dist/index.d.cts +3 -3
  84. package/dist/index.d.ts +3 -3
  85. package/dist/index.js +4 -6
  86. package/dist/index.js.map +1 -1
  87. package/dist/utils/success-messages.cjs +54 -0
  88. package/dist/utils/success-messages.cjs.map +1 -0
  89. package/dist/utils/success-messages.d.cts +31 -0
  90. package/dist/utils/success-messages.d.ts +31 -0
  91. package/dist/utils/success-messages.js +30 -0
  92. package/dist/utils/success-messages.js.map +1 -0
  93. package/package.json +3 -3
  94. package/dist/components/creation-success.cjs.map +0 -1
  95. package/dist/components/creation-success.d.cts +0 -20
  96. package/dist/components/creation-success.d.ts +0 -20
  97. package/dist/components/creation-success.js.map +0 -1
  98. package/dist/components/transaction-done.cjs +0 -46
  99. package/dist/components/transaction-done.cjs.map +0 -1
  100. package/dist/components/transaction-done.d.cts +0 -18
  101. package/dist/components/transaction-done.d.ts +0 -18
  102. package/dist/components/transaction-done.js +0 -22
  103. package/dist/components/transaction-done.js.map +0 -1
@@ -14,7 +14,7 @@ const CLUB_TIER_PRESET = {
14
14
  back: { href: "/launchpad/club", label: "\u2190 Back" },
15
15
  notOwner: { message: "You don't own this club.", back: { href: "/launchpad/club", label: "\u2190 Back to clubs" } },
16
16
  dialog: { title: "Create membership", workingLabel: "Creating your membership\u2026", firstStepLabel: "Upload membership metadata" },
17
- success: { caption: "Your membership is ready", againLabel: "Create another membership" },
17
+ success: { title: "Membership created", description: "The supply is minted to your wallet and ready to list.", againLabel: "Create another membership" },
18
18
  shell: {
19
19
  title: "Create Membership",
20
20
  subtitle: (name) => `Add a new membership tier to ${name ?? "your club"} and mint its supply to your wallet, ready to list.`
@@ -46,7 +46,7 @@ const TICKETS_TIER_PRESET = {
46
46
  back: { href: "/launchpad/tickets", label: "\u2190 Back" },
47
47
  notOwner: { message: "You don't own this tickets collection.", back: { href: "/launchpad/tickets", label: "\u2190 Back to tickets" } },
48
48
  dialog: { title: "Mint tickets", workingLabel: "Minting your tickets\u2026", firstStepLabel: "Upload ticket metadata" },
49
- success: { caption: "Your tickets are ready", againLabel: "Mint another ticket" },
49
+ success: { title: "Tickets minted", description: "Each ticket is recorded onchain under your wallet.", againLabel: "Mint another ticket" },
50
50
  shell: {
51
51
  title: "Mint Tickets",
52
52
  subtitle: (name) => `Add a new ticket type to ${name ?? "your collection"} and mint its supply to your wallet, ready to list.`
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/launchpad/tier-mint-presets.ts"],"sourcesContent":["import { Ticket, Users } from \"lucide-react\";\nimport type { ElementType } from \"react\";\nimport type { ApiClient } from \"@medialane/sdk\";\nimport { predictNextMembershipId, predictNextTicketId } from \"../../utils/use-tiers.js\";\n\nexport interface TierMintPreset {\n service: \"ip-club\" | \"ip-tickets\";\n predictNextId: (api: ApiClient, contract: string) => Promise<number>;\n traitType: string;\n icon: ElementType;\n iconClass: string;\n buttonClass: string;\n hoverBorderClass: string;\n uploadedClass: string;\n suggestExternalLink: boolean;\n signedOut: { title: string; description: string };\n back: { href: string; label: string };\n notOwner: { message: string; back: { href: string; label: string } };\n dialog: { title: string; workingLabel: string; firstStepLabel: string };\n success: { caption: string; againLabel: string };\n shell: { title: string; subtitle: (collectionName: string | null) => string };\n cardFallbackSymbol: string;\n copy: {\n imageHeading: string;\n imageAlt: string;\n imageRequired: string;\n nameLabel: string;\n nameRequired: string;\n namePlaceholder: string;\n descriptionPlaceholder: string;\n validUntilHint: string;\n submit: string;\n };\n}\n\nexport const CLUB_TIER_PRESET: TierMintPreset = {\n service: \"ip-club\",\n predictNextId: predictNextMembershipId,\n traitType: \"IP Club Membership\",\n icon: Users,\n iconClass: \"text-brand-purple\",\n buttonClass: \"bg-brand-purple\",\n hoverBorderClass: \"hover:border-brand-purple/50\",\n uploadedClass: \"text-brand-purple\",\n suggestExternalLink: false,\n signedOut: { title: \"Secure your account to create memberships\", description: \"Create a membership tier and mint its supply to your account.\" },\n back: { href: \"/launchpad/club\", label: \"← Back\" },\n notOwner: { message: \"You don't own this club.\", back: { href: \"/launchpad/club\", label: \"← Back to clubs\" } },\n dialog: { title: \"Create membership\", workingLabel: \"Creating your membership…\", firstStepLabel: \"Upload membership metadata\" },\n success: { caption: \"Your membership is ready\", againLabel: \"Create another membership\" },\n shell: {\n title: \"Create Membership\",\n subtitle: (name) => `Add a new membership tier to ${name ?? \"your club\"} and mint its supply to your wallet, ready to list.`,\n },\n cardFallbackSymbol: \"Club\",\n copy: {\n imageHeading: \"Membership image\",\n imageAlt: \"Membership\",\n imageRequired: \"Add a membership image.\",\n nameLabel: \"Membership name\",\n nameRequired: \"Membership name required\",\n namePlaceholder: \"Kalamaha Fan Club — 2026 Season Pass\",\n descriptionPlaceholder: \"What does this membership unlock?\",\n validUntilHint: \"Blank = lifetime membership.\",\n submit: \"Create Membership\",\n },\n};\n\nexport const TICKETS_TIER_PRESET: TierMintPreset = {\n service: \"ip-tickets\",\n predictNextId: predictNextTicketId,\n traitType: \"IP Ticket\",\n icon: Ticket,\n iconClass: \"text-teal-500\",\n buttonClass: \"bg-teal-600\",\n hoverBorderClass: \"hover:border-teal-500/50\",\n uploadedClass: \"text-teal-500\",\n suggestExternalLink: true,\n signedOut: { title: \"Secure your account to mint tickets\", description: \"Create a ticket type and mint its supply to your account.\" },\n back: { href: \"/launchpad/tickets\", label: \"← Back\" },\n notOwner: { message: \"You don't own this tickets collection.\", back: { href: \"/launchpad/tickets\", label: \"← Back to tickets\" } },\n dialog: { title: \"Mint tickets\", workingLabel: \"Minting your tickets…\", firstStepLabel: \"Upload ticket metadata\" },\n success: { caption: \"Your tickets are ready\", againLabel: \"Mint another ticket\" },\n shell: {\n title: \"Mint Tickets\",\n subtitle: (name) => `Add a new ticket type to ${name ?? \"your collection\"} and mint its supply to your wallet, ready to list.`,\n },\n cardFallbackSymbol: \"Tickets\",\n copy: {\n imageHeading: \"Ticket image\",\n imageAlt: \"Ticket\",\n imageRequired: \"Add a ticket image.\",\n nameLabel: \"Ticket name\",\n nameRequired: \"Ticket name required\",\n namePlaceholder: \"Summer Concert 2026 — General Admission\",\n descriptionPlaceholder: \"What does this ticket admit or unlock?\",\n validUntilHint: \"Blank = always valid.\",\n submit: \"Mint Tickets\",\n },\n};\n"],"mappings":"AAAA,SAAS,QAAQ,aAAa;AAG9B,SAAS,yBAAyB,2BAA2B;AAgCtD,MAAM,mBAAmC;AAAA,EAC9C,SAAS;AAAA,EACT,eAAe;AAAA,EACf,WAAW;AAAA,EACX,MAAM;AAAA,EACN,WAAW;AAAA,EACX,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,WAAW,EAAE,OAAO,6CAA6C,aAAa,gEAAgE;AAAA,EAC9I,MAAM,EAAE,MAAM,mBAAmB,OAAO,cAAS;AAAA,EACjD,UAAU,EAAE,SAAS,4BAA4B,MAAM,EAAE,MAAM,mBAAmB,OAAO,uBAAkB,EAAE;AAAA,EAC7G,QAAQ,EAAE,OAAO,qBAAqB,cAAc,kCAA6B,gBAAgB,6BAA6B;AAAA,EAC9H,SAAS,EAAE,SAAS,4BAA4B,YAAY,4BAA4B;AAAA,EACxF,OAAO;AAAA,IACL,OAAO;AAAA,IACP,UAAU,CAAC,SAAS,gCAAgC,QAAQ,WAAW;AAAA,EACzE;AAAA,EACA,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,cAAc;AAAA,IACd,UAAU;AAAA,IACV,eAAe;AAAA,IACf,WAAW;AAAA,IACX,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,wBAAwB;AAAA,IACxB,gBAAgB;AAAA,IAChB,QAAQ;AAAA,EACV;AACF;AAEO,MAAM,sBAAsC;AAAA,EACjD,SAAS;AAAA,EACT,eAAe;AAAA,EACf,WAAW;AAAA,EACX,MAAM;AAAA,EACN,WAAW;AAAA,EACX,aAAa;AAAA,EACb,kBAAkB;AAAA,EAClB,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,WAAW,EAAE,OAAO,uCAAuC,aAAa,4DAA4D;AAAA,EACpI,MAAM,EAAE,MAAM,sBAAsB,OAAO,cAAS;AAAA,EACpD,UAAU,EAAE,SAAS,0CAA0C,MAAM,EAAE,MAAM,sBAAsB,OAAO,yBAAoB,EAAE;AAAA,EAChI,QAAQ,EAAE,OAAO,gBAAgB,cAAc,8BAAyB,gBAAgB,yBAAyB;AAAA,EACjH,SAAS,EAAE,SAAS,0BAA0B,YAAY,sBAAsB;AAAA,EAChF,OAAO;AAAA,IACL,OAAO;AAAA,IACP,UAAU,CAAC,SAAS,4BAA4B,QAAQ,iBAAiB;AAAA,EAC3E;AAAA,EACA,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,cAAc;AAAA,IACd,UAAU;AAAA,IACV,eAAe;AAAA,IACf,WAAW;AAAA,IACX,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,wBAAwB;AAAA,IACxB,gBAAgB;AAAA,IAChB,QAAQ;AAAA,EACV;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/launchpad/tier-mint-presets.ts"],"sourcesContent":["import { Ticket, Users } from \"lucide-react\";\nimport type { ElementType } from \"react\";\nimport type { ApiClient } from \"@medialane/sdk\";\nimport { predictNextMembershipId, predictNextTicketId } from \"../../utils/use-tiers.js\";\n\nexport interface TierMintPreset {\n service: \"ip-club\" | \"ip-tickets\";\n predictNextId: (api: ApiClient, contract: string) => Promise<number>;\n traitType: string;\n icon: ElementType;\n iconClass: string;\n buttonClass: string;\n hoverBorderClass: string;\n uploadedClass: string;\n suggestExternalLink: boolean;\n signedOut: { title: string; description: string };\n back: { href: string; label: string };\n notOwner: { message: string; back: { href: string; label: string } };\n dialog: { title: string; workingLabel: string; firstStepLabel: string };\n success: { title: string; description: string; againLabel: string };\n shell: { title: string; subtitle: (collectionName: string | null) => string };\n cardFallbackSymbol: string;\n copy: {\n imageHeading: string;\n imageAlt: string;\n imageRequired: string;\n nameLabel: string;\n nameRequired: string;\n namePlaceholder: string;\n descriptionPlaceholder: string;\n validUntilHint: string;\n submit: string;\n };\n}\n\nexport const CLUB_TIER_PRESET: TierMintPreset = {\n service: \"ip-club\",\n predictNextId: predictNextMembershipId,\n traitType: \"IP Club Membership\",\n icon: Users,\n iconClass: \"text-brand-purple\",\n buttonClass: \"bg-brand-purple\",\n hoverBorderClass: \"hover:border-brand-purple/50\",\n uploadedClass: \"text-brand-purple\",\n suggestExternalLink: false,\n signedOut: { title: \"Secure your account to create memberships\", description: \"Create a membership tier and mint its supply to your account.\" },\n back: { href: \"/launchpad/club\", label: \"← Back\" },\n notOwner: { message: \"You don't own this club.\", back: { href: \"/launchpad/club\", label: \"← Back to clubs\" } },\n dialog: { title: \"Create membership\", workingLabel: \"Creating your membership…\", firstStepLabel: \"Upload membership metadata\" },\n success: { title: \"Membership created\", description: \"The supply is minted to your wallet and ready to list.\", againLabel: \"Create another membership\" },\n shell: {\n title: \"Create Membership\",\n subtitle: (name) => `Add a new membership tier to ${name ?? \"your club\"} and mint its supply to your wallet, ready to list.`,\n },\n cardFallbackSymbol: \"Club\",\n copy: {\n imageHeading: \"Membership image\",\n imageAlt: \"Membership\",\n imageRequired: \"Add a membership image.\",\n nameLabel: \"Membership name\",\n nameRequired: \"Membership name required\",\n namePlaceholder: \"Kalamaha Fan Club — 2026 Season Pass\",\n descriptionPlaceholder: \"What does this membership unlock?\",\n validUntilHint: \"Blank = lifetime membership.\",\n submit: \"Create Membership\",\n },\n};\n\nexport const TICKETS_TIER_PRESET: TierMintPreset = {\n service: \"ip-tickets\",\n predictNextId: predictNextTicketId,\n traitType: \"IP Ticket\",\n icon: Ticket,\n iconClass: \"text-teal-500\",\n buttonClass: \"bg-teal-600\",\n hoverBorderClass: \"hover:border-teal-500/50\",\n uploadedClass: \"text-teal-500\",\n suggestExternalLink: true,\n signedOut: { title: \"Secure your account to mint tickets\", description: \"Create a ticket type and mint its supply to your account.\" },\n back: { href: \"/launchpad/tickets\", label: \"← Back\" },\n notOwner: { message: \"You don't own this tickets collection.\", back: { href: \"/launchpad/tickets\", label: \"← Back to tickets\" } },\n dialog: { title: \"Mint tickets\", workingLabel: \"Minting your tickets…\", firstStepLabel: \"Upload ticket metadata\" },\n success: { title: \"Tickets minted\", description: \"Each ticket is recorded onchain under your wallet.\", againLabel: \"Mint another ticket\" },\n shell: {\n title: \"Mint Tickets\",\n subtitle: (name) => `Add a new ticket type to ${name ?? \"your collection\"} and mint its supply to your wallet, ready to list.`,\n },\n cardFallbackSymbol: \"Tickets\",\n copy: {\n imageHeading: \"Ticket image\",\n imageAlt: \"Ticket\",\n imageRequired: \"Add a ticket image.\",\n nameLabel: \"Ticket name\",\n nameRequired: \"Ticket name required\",\n namePlaceholder: \"Summer Concert 2026 — General Admission\",\n descriptionPlaceholder: \"What does this ticket admit or unlock?\",\n validUntilHint: \"Blank = always valid.\",\n submit: \"Mint Tickets\",\n },\n};\n"],"mappings":"AAAA,SAAS,QAAQ,aAAa;AAG9B,SAAS,yBAAyB,2BAA2B;AAgCtD,MAAM,mBAAmC;AAAA,EAC9C,SAAS;AAAA,EACT,eAAe;AAAA,EACf,WA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kB,aAAa,sDAAsD,YAAY,sBAAsB;AAAA,EACzI,OAAO;AAAA,IACL,OAAO;AAAA,IACP,UAAU,CAAC,SAAS,4BAA4B,QAAQ,iBAAiB;AAAA,EAC3E;AAAA,EACA,oBAAoB;AAAA,EACpB,MAAM;AAAA,IACJ,cAAc;AAAA,IACd,UAAU;AAAA,IACV,eAAe;AAAA,IACf,WAAW;AAAA,IACX,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,wBAAwB;AAAA,IACxB,gBAAgB;AAAA,IAChB,QAAQ;AAAA,EACV;AACF;","names":[]}
@@ -36,7 +36,6 @@ __export(marketplace_dialog_primitives_exports, {
36
36
  MarketplaceErrorState: () => MarketplaceErrorState,
37
37
  MarketplaceProcessingState: () => MarketplaceProcessingState,
38
38
  MarketplaceSignInGate: () => MarketplaceSignInGate,
39
- MarketplaceSuccessState: () => MarketplaceSuccessState,
40
39
  MarketplaceTxLink: () => MarketplaceTxLink
41
40
  });
42
41
  module.exports = __toCommonJS(marketplace_dialog_primitives_exports);
@@ -106,34 +105,6 @@ function MarketplaceSignInGate({ title, description, href, ctaLabel = "Set up ac
106
105
  ) })
107
106
  ] });
108
107
  }
109
- function MarketplaceSuccessState({
110
- tokenImage,
111
- name,
112
- title,
113
- description,
114
- txHash,
115
- explorerUrl,
116
- onDone,
117
- footer
118
- }) {
119
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col items-center gap-5 p-6 py-8", children: [
120
- tokenImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
121
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
122
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-emerald-500 flex items-center justify-center border-2 border-background", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle2, { className: "h-5 w-5 text-white" }) }),
123
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "absolute -top-2 -right-2 h-5 w-5 text-brand-orange" })
124
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
125
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-16 w-16 rounded-full bg-emerald-500/15 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle2, { className: "h-9 w-9 text-emerald-500" }) }),
126
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "absolute -top-1 -right-1 h-5 w-5 text-brand-orange" })
127
- ] }),
128
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "text-center space-y-1 max-w-full", children: [
129
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-xl break-words", children: title }),
130
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground break-words", children: description })
131
- ] }),
132
- txHash && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarketplaceTxLink, { txHash, explorerUrl }),
133
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { className: "w-full h-11", onClick: onDone, children: "Done" }),
134
- footer
135
- ] });
136
- }
137
108
  function MarketplaceErrorState({
138
109
  tokenImage,
139
110
  name,
@@ -286,7 +257,6 @@ function MarketplaceConfirmStep({
286
257
  MarketplaceErrorState,
287
258
  MarketplaceProcessingState,
288
259
  MarketplaceSignInGate,
289
- MarketplaceSuccessState,
290
260
  MarketplaceTxLink
291
261
  });
292
262
  //# sourceMappingURL=marketplace-dialog-primitives.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, CheckCircle2, ExternalLink, Loader2, Sparkles, Wallet } from \"lucide-react\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { cn } from \"../utils/cn.js\";\n\ninterface MarketplaceTxLinkProps {\n txHash: string;\n explorerUrl: string;\n className?: string;\n}\n\nexport function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps) {\n return (\n <a\n href={`${explorerUrl}/tx/${txHash}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\",\n className\n )}\n >\n <span className=\"tabular-nums\">{txHash.slice(0, 10)}…{txHash.slice(-8)}</span>\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n );\n}\n\ninterface MarketplaceProcessingStateProps {\n title: string;\n description?: string;\n imageUrl?: string | null;\n imageAlt?: string;\n txHash?: string | null;\n explorerUrl?: string;\n}\n\nexport function MarketplaceProcessingState({\n title,\n description = \"Please wait, do not close this window.\",\n imageUrl,\n imageAlt = \"Token preview\",\n txHash,\n explorerUrl,\n}: MarketplaceProcessingStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {imageUrl ? (\n <div className=\"relative h-20 w-20 rounded-2xl overflow-hidden border border-border\">\n <Image src={imageUrl} alt={imageAlt} fill sizes=\"80px\" className=\"object-cover\" unoptimized />\n <div className=\"absolute inset-0 bg-background/50 flex items-center justify-center\">\n <Loader2 className=\"h-7 w-7 animate-spin text-primary\" />\n </div>\n </div>\n ) : (\n <Loader2 className=\"h-10 w-10 animate-spin text-primary\" />\n )}\n <div className=\"text-center space-y-1\">\n <p className=\"font-semibold\">{title}</p>\n {txHash && explorerUrl ? (\n <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} className=\"mt-1\" />\n ) : null}\n </div>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n );\n}\n\ninterface MarketplaceSignInGateProps {\n title: string;\n description: string;\n href: string;\n ctaLabel?: string;\n}\n\nexport function MarketplaceSignInGate({ title, description, href, ctaLabel = \"Set up account\" }: MarketplaceSignInGateProps) {\n return (\n <div className=\"flex flex-col items-center gap-4 p-6 py-10 text-center\">\n <Wallet className=\"h-10 w-10 text-muted-foreground\" />\n <div>\n <p className=\"font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{description}</p>\n </div>\n <div className=\"btn-border-animated w-full p-[1px] rounded-lg\">\n <Button\n asChild\n className=\"w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all\"\n >\n <a href={href}>{ctaLabel}</a>\n </Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceSuccessStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n txHash?: string | null;\n explorerUrl: string;\n onDone: () => void;\n footer?: ReactNode;\n}\n\nexport function MarketplaceSuccessState({\n tokenImage,\n name,\n title,\n description,\n txHash,\n explorerUrl,\n onDone,\n footer,\n}: MarketplaceSuccessStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-emerald-500 flex items-center justify-center border-2 border-background\">\n <CheckCircle2 className=\"h-5 w-5 text-white\" />\n </div>\n <Sparkles className=\"absolute -top-2 -right-2 h-5 w-5 text-brand-orange\" />\n </div>\n ) : (\n <div className=\"relative\">\n <div className=\"h-16 w-16 rounded-full bg-emerald-500/15 flex items-center justify-center\">\n <CheckCircle2 className=\"h-9 w-9 text-emerald-500\" />\n </div>\n <Sparkles className=\"absolute -top-1 -right-1 h-5 w-5 text-brand-orange\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <Button className=\"w-full h-11\" onClick={onDone}>Done</Button>\n {footer}\n </div>\n );\n}\n\ninterface MarketplaceErrorStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n error?: string | null;\n txHash?: string | null;\n explorerUrl: string;\n onRetry?: () => void;\n onDone: () => void;\n doneLabel?: string;\n}\n\nexport function MarketplaceErrorState({\n tokenImage,\n name,\n title,\n description,\n error,\n txHash,\n explorerUrl,\n onRetry,\n onDone,\n doneLabel = \"Done\",\n}: MarketplaceErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background\">\n <AlertCircle className=\"h-5 w-5 text-white\" />\n </div>\n </div>\n ) : (\n <div className=\"h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center\">\n <AlertCircle className=\"h-9 w-9 text-destructive\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {error ? (\n <Alert variant=\"destructive\" className=\"text-left\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <div className=\"flex w-full gap-2\">\n {onRetry ? (\n <Button variant=\"outline\" className=\"flex-1 h-11\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n <Button className=\"flex-1 h-11\" onClick={onDone}>{doneLabel}</Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceDialogHeroProps {\n tokenImage?: string | null;\n tokenName?: string;\n tokenId: string;\n fallbackIcon: ReactNode;\n badge?: ReactNode;\n}\n\nexport function MarketplaceDialogHero({\n tokenImage,\n tokenName,\n tokenId,\n fallbackIcon,\n badge,\n}: MarketplaceDialogHeroProps) {\n const name = tokenName || `Token #${tokenId}`;\n\n return (\n <div className=\"relative flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center\">\n {fallbackIcon}\n </div>\n )}\n </div>\n {badge}\n </div>\n );\n}\n\ninterface CurrencyPickerProps {\n currencies: string[];\n value: string;\n onChange: (value: string) => void;\n disabled?: boolean;\n}\n\nexport function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps) {\n return (\n <div className=\"grid grid-cols-5 gap-1.5\">\n {currencies.map((c) => (\n <Button\n key={c}\n type=\"button\"\n variant={value === c ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(c)}\n disabled={disabled}\n className=\"gap-1 px-2 text-xs w-full\"\n >\n <CurrencyIcon symbol={c} size={13} className=\"shrink-0\" />\n <span className=\"truncate\">{c}</span>\n </Button>\n ))}\n </div>\n );\n}\n\ninterface DurationPickerProps {\n options: ReadonlyArray<{ label: string; seconds: number }>;\n value: number;\n onChange: (value: number) => void;\n disabled?: boolean;\n cols?: 3 | 4;\n}\n\nexport function DurationPicker({ options, value, onChange, disabled, cols = 3 }: DurationPickerProps) {\n return (\n <div className={cols === 4 ? \"grid grid-cols-4 gap-2\" : \"grid grid-cols-3 gap-2\"}>\n {options.map((opt) => (\n <Button\n key={opt.label}\n type=\"button\"\n variant={value === opt.seconds ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(opt.seconds)}\n disabled={disabled}\n className=\"text-xs\"\n >\n {opt.label}\n </Button>\n ))}\n </div>\n );\n}\n\ninterface MarketplaceConfirmStepProps {\n summary?: ReactNode;\n description: string;\n error?: string | null;\n secondaryLabel: string;\n onSecondary: () => void;\n primaryLabel: string;\n onPrimary: () => void;\n primaryDisabled?: boolean;\n primaryIcon?: ReactNode;\n primaryVariant?: \"default\" | \"destructive\";\n footer?: ReactNode;\n}\n\nexport function MarketplaceConfirmStep({\n summary,\n description,\n error,\n secondaryLabel,\n onSecondary,\n primaryLabel,\n onPrimary,\n primaryDisabled,\n primaryIcon,\n primaryVariant = \"default\",\n footer,\n}: MarketplaceConfirmStepProps) {\n const primaryButton = primaryVariant === \"destructive\" ? (\n <Button\n variant=\"destructive\"\n className=\"flex-1 h-11\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryLabel}\n </Button>\n ) : (\n <div\n className={cn(\n \"btn-border-animated p-[1px] rounded-xl flex-1\",\n primaryDisabled && \"pointer-events-none\"\n )}\n >\n <button\n className=\"w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryIcon}\n {primaryLabel}\n </button>\n </div>\n );\n\n return (\n <div className=\"px-6 pb-6 pt-3 space-y-4\">\n {summary}\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n {error ? (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n <div className=\"flex gap-2 pt-1\">\n <Button\n variant=\"outline\"\n className=\"gap-1.5\"\n on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AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AACF,GAAgC;AAC9B,QAAM,gBAAgB,mBAAmB,gBACvC;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,UAAU;AAAA,MACV,SAAS;AAAA,MAER;AAAA;AAAA,EACH,IAEA;AAAA,IAAC;AAAA;AAAA,MACC,eAAW;AAAA,QACT;AAAA,QACA,mBAAmB;AAAA,MACrB;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAGF,SACE,6CAAC,SAAI,WAAU,4BACZ;AAAA;AAAA,IACD,4CAAC,OAAE,WAAU,iCAAiC,uBAAY;AAAA,IACzD,QACC,6CAAC,sBAAM,SAAQ,eACb;AAAA,kDAAC,mCAAY,WAAU,WAAU;AAAA,MACjC,4CAAC,iCAAkB,iBAAM;AAAA,OAC3B,IACE;AAAA,IACJ,6CAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,WAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,MACH;AAAA,MACC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":["Image"]}
1
+ {"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, Wallet } from \"lucide-react\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { cn } from \"../utils/cn.js\";\n\ninterface MarketplaceTxLinkProps {\n txHash: string;\n explorerUrl: string;\n className?: string;\n}\n\nexport function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps) {\n return (\n <a\n href={`${explorerUrl}/tx/${txHash}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\",\n className\n )}\n >\n <span className=\"tabular-nums\">{txHash.slice(0, 10)}…{txHash.slice(-8)}</span>\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n );\n}\n\ninterface MarketplaceProcessingStateProps {\n title: string;\n description?: string;\n imageUrl?: string | null;\n imageAlt?: string;\n txHash?: string | null;\n explorerUrl?: string;\n}\n\nexport function MarketplaceProcessingState({\n title,\n description = \"Please wait, do not close this window.\",\n imageUrl,\n imageAlt = \"Token preview\",\n txHash,\n explorerUrl,\n}: MarketplaceProcessingStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {imageUrl ? (\n <div className=\"relative h-20 w-20 rounded-2xl overflow-hidden border border-border\">\n <Image src={imageUrl} alt={imageAlt} fill sizes=\"80px\" className=\"object-cover\" unoptimized />\n <div className=\"absolute inset-0 bg-background/50 flex items-center justify-center\">\n <Loader2 className=\"h-7 w-7 animate-spin text-primary\" />\n </div>\n </div>\n ) : (\n <Loader2 className=\"h-10 w-10 animate-spin text-primary\" />\n )}\n <div className=\"text-center space-y-1\">\n <p className=\"font-semibold\">{title}</p>\n {txHash && explorerUrl ? (\n <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} className=\"mt-1\" />\n ) : null}\n </div>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n );\n}\n\ninterface MarketplaceSignInGateProps {\n title: string;\n description: string;\n href: string;\n ctaLabel?: string;\n}\n\nexport function MarketplaceSignInGate({ title, description, href, ctaLabel = \"Set up account\" }: MarketplaceSignInGateProps) {\n return (\n <div className=\"flex flex-col items-center gap-4 p-6 py-10 text-center\">\n <Wallet className=\"h-10 w-10 text-muted-foreground\" />\n <div>\n <p className=\"font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{description}</p>\n </div>\n <div className=\"btn-border-animated w-full p-[1px] rounded-lg\">\n <Button\n asChild\n className=\"w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all\"\n >\n <a href={href}>{ctaLabel}</a>\n </Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceErrorStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n error?: string | null;\n txHash?: string | null;\n explorerUrl: string;\n onRetry?: () => void;\n onDone: () => void;\n doneLabel?: string;\n}\n\nexport function MarketplaceErrorState({\n tokenImage,\n name,\n title,\n description,\n error,\n txHash,\n explorerUrl,\n onRetry,\n onDone,\n doneLabel = \"Done\",\n}: MarketplaceErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background\">\n <AlertCircle className=\"h-5 w-5 text-white\" />\n </div>\n </div>\n ) : (\n <div className=\"h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center\">\n <AlertCircle className=\"h-9 w-9 text-destructive\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {error ? (\n <Alert variant=\"destructive\" className=\"text-left\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <div className=\"flex w-full gap-2\">\n {onRetry ? (\n <Button variant=\"outline\" className=\"flex-1 h-11\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n <Button className=\"flex-1 h-11\" onClick={onDone}>{doneLabel}</Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceDialogHeroProps {\n tokenImage?: string | null;\n tokenName?: string;\n tokenId: string;\n fallbackIcon: ReactNode;\n badge?: ReactNode;\n}\n\nexport function MarketplaceDialogHero({\n tokenImage,\n tokenName,\n tokenId,\n fallbackIcon,\n badge,\n}: MarketplaceDialogHeroProps) {\n const name = tokenName || `Token #${tokenId}`;\n\n return (\n <div className=\"relative flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center\">\n {fallbackIcon}\n </div>\n )}\n </div>\n {badge}\n </div>\n );\n}\n\ninterface CurrencyPickerProps {\n currencies: string[];\n value: string;\n onChange: (value: string) => void;\n disabled?: boolean;\n}\n\nexport function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps) {\n return (\n <div className=\"grid grid-cols-5 gap-1.5\">\n {currencies.map((c) => (\n <Button\n key={c}\n type=\"button\"\n variant={value === c ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(c)}\n disabled={disabled}\n className=\"gap-1 px-2 text-xs w-full\"\n >\n <CurrencyIcon symbol={c} size={13} className=\"shrink-0\" />\n <span className=\"truncate\">{c}</span>\n </Button>\n ))}\n </div>\n );\n}\n\ninterface DurationPickerProps {\n options: ReadonlyArray<{ label: string; seconds: number }>;\n value: number;\n onChange: (value: number) => void;\n disabled?: boolean;\n cols?: 3 | 4;\n}\n\nexport function DurationPicker({ options, value, onChange, disabled, cols = 3 }: DurationPickerProps) {\n return (\n <div className={cols === 4 ? \"grid grid-cols-4 gap-2\" : \"grid grid-cols-3 gap-2\"}>\n {options.map((opt) => (\n <Button\n key={opt.label}\n type=\"button\"\n variant={value === opt.seconds ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(opt.seconds)}\n disabled={disabled}\n className=\"text-xs\"\n >\n {opt.label}\n </Button>\n ))}\n </div>\n );\n}\n\ninterface MarketplaceConfirmStepProps {\n summary?: ReactNode;\n description: string;\n error?: string | null;\n secondaryLabel: string;\n onSecondary: () => void;\n primaryLabel: string;\n onPrimary: () => void;\n primaryDisabled?: boolean;\n primaryIcon?: ReactNode;\n primaryVariant?: \"default\" | \"destructive\";\n footer?: ReactNode;\n}\n\nexport function MarketplaceConfirmStep({\n summary,\n description,\n error,\n secondaryLabel,\n onSecondary,\n primaryLabel,\n onPrimary,\n primaryDisabled,\n primaryIcon,\n primaryVariant = \"default\",\n footer,\n}: MarketplaceConfirmStepProps) {\n const primaryButton = primaryVariant === \"destructive\" ? (\n <Button\n variant=\"destructive\"\n className=\"flex-1 h-11\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryLabel}\n </Button>\n ) : (\n <div\n className={cn(\n \"btn-border-animated p-[1px] rounded-xl flex-1\",\n primaryDisabled && \"pointer-events-none\"\n )}\n >\n <button\n className=\"w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryIcon}\n {primaryLabel}\n </button>\n </div>\n );\n\n return (\n <div className=\"px-6 pb-6 pt-3 space-y-4\">\n {summary}\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n {error ? (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n <div className=\"flex gap-2 pt-1\">\n <Button\n variant=\"outline\"\n className=\"gap-1.5\"\n onClick={onSecondary}\n >\n {secondaryL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ACH;AAEJ;","names":["Image"]}
@@ -23,17 +23,6 @@ interface MarketplaceSignInGateProps {
23
23
  ctaLabel?: string;
24
24
  }
25
25
  declare function MarketplaceSignInGate({ title, description, href, ctaLabel }: MarketplaceSignInGateProps): react_jsx_runtime.JSX.Element;
26
- interface MarketplaceSuccessStateProps {
27
- tokenImage?: string | null;
28
- name: string;
29
- title: string;
30
- description: ReactNode;
31
- txHash?: string | null;
32
- explorerUrl: string;
33
- onDone: () => void;
34
- footer?: ReactNode;
35
- }
36
- declare function MarketplaceSuccessState({ tokenImage, name, title, description, txHash, explorerUrl, onDone, footer, }: MarketplaceSuccessStateProps): react_jsx_runtime.JSX.Element;
37
26
  interface MarketplaceErrorStateProps {
38
27
  tokenImage?: string | null;
39
28
  name: string;
@@ -88,4 +77,4 @@ interface MarketplaceConfirmStepProps {
88
77
  }
89
78
  declare function MarketplaceConfirmStep({ summary, description, error, secondaryLabel, onSecondary, primaryLabel, onPrimary, primaryDisabled, primaryIcon, primaryVariant, footer, }: MarketplaceConfirmStepProps): react_jsx_runtime.JSX.Element;
90
79
 
91
- export { CurrencyPicker, DurationPicker, MarketplaceConfirmStep, MarketplaceDialogHero, MarketplaceErrorState, MarketplaceProcessingState, MarketplaceSignInGate, MarketplaceSuccessState, MarketplaceTxLink };
80
+ export { CurrencyPicker, DurationPicker, MarketplaceConfirmStep, MarketplaceDialogHero, MarketplaceErrorState, MarketplaceProcessingState, MarketplaceSignInGate, MarketplaceTxLink };
@@ -23,17 +23,6 @@ interface MarketplaceSignInGateProps {
23
23
  ctaLabel?: string;
24
24
  }
25
25
  declare function MarketplaceSignInGate({ title, description, href, ctaLabel }: MarketplaceSignInGateProps): react_jsx_runtime.JSX.Element;
26
- interface MarketplaceSuccessStateProps {
27
- tokenImage?: string | null;
28
- name: string;
29
- title: string;
30
- description: ReactNode;
31
- txHash?: string | null;
32
- explorerUrl: string;
33
- onDone: () => void;
34
- footer?: ReactNode;
35
- }
36
- declare function MarketplaceSuccessState({ tokenImage, name, title, description, txHash, explorerUrl, onDone, footer, }: MarketplaceSuccessStateProps): react_jsx_runtime.JSX.Element;
37
26
  interface MarketplaceErrorStateProps {
38
27
  tokenImage?: string | null;
39
28
  name: string;
@@ -88,4 +77,4 @@ interface MarketplaceConfirmStepProps {
88
77
  }
89
78
  declare function MarketplaceConfirmStep({ summary, description, error, secondaryLabel, onSecondary, primaryLabel, onPrimary, primaryDisabled, primaryIcon, primaryVariant, footer, }: MarketplaceConfirmStepProps): react_jsx_runtime.JSX.Element;
90
79
 
91
- export { CurrencyPicker, DurationPicker, MarketplaceConfirmStep, MarketplaceDialogHero, MarketplaceErrorState, MarketplaceProcessingState, MarketplaceSignInGate, MarketplaceSuccessState, MarketplaceTxLink };
80
+ export { CurrencyPicker, DurationPicker, MarketplaceConfirmStep, MarketplaceDialogHero, MarketplaceErrorState, MarketplaceProcessingState, MarketplaceSignInGate, MarketplaceTxLink };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import Image from "./image.js";
4
- import { AlertCircle, CheckCircle2, ExternalLink, Loader2, Sparkles, Wallet } from "lucide-react";
4
+ import { AlertCircle, ExternalLink, Loader2, Wallet } from "lucide-react";
5
5
  import { Alert, AlertDescription } from "./alert.js";
6
6
  import { Button } from "./button.js";
7
7
  import { CurrencyIcon } from "./currency-icon.js";
@@ -65,34 +65,6 @@ function MarketplaceSignInGate({ title, description, href, ctaLabel = "Set up ac
65
65
  ) })
66
66
  ] });
67
67
  }
68
- function MarketplaceSuccessState({
69
- tokenImage,
70
- name,
71
- title,
72
- description,
73
- txHash,
74
- explorerUrl,
75
- onDone,
76
- footer
77
- }) {
78
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center gap-5 p-6 py-8", children: [
79
- tokenImage ? /* @__PURE__ */ jsxs("div", { className: "relative", children: [
80
- /* @__PURE__ */ jsx("div", { className: "relative h-32 w-32 rounded-2xl overflow-hidden border border-border", children: /* @__PURE__ */ jsx(Image, { src: tokenImage, alt: name, fill: true, sizes: "128px", className: "object-cover", unoptimized: true }) }),
81
- /* @__PURE__ */ jsx("div", { className: "absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-emerald-500 flex items-center justify-center border-2 border-background", children: /* @__PURE__ */ jsx(CheckCircle2, { className: "h-5 w-5 text-white" }) }),
82
- /* @__PURE__ */ jsx(Sparkles, { className: "absolute -top-2 -right-2 h-5 w-5 text-brand-orange" })
83
- ] }) : /* @__PURE__ */ jsxs("div", { className: "relative", children: [
84
- /* @__PURE__ */ jsx("div", { className: "h-16 w-16 rounded-full bg-emerald-500/15 flex items-center justify-center", children: /* @__PURE__ */ jsx(CheckCircle2, { className: "h-9 w-9 text-emerald-500" }) }),
85
- /* @__PURE__ */ jsx(Sparkles, { className: "absolute -top-1 -right-1 h-5 w-5 text-brand-orange" })
86
- ] }),
87
- /* @__PURE__ */ jsxs("div", { className: "text-center space-y-1 max-w-full", children: [
88
- /* @__PURE__ */ jsx("p", { className: "font-bold text-xl break-words", children: title }),
89
- /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground break-words", children: description })
90
- ] }),
91
- txHash && /* @__PURE__ */ jsx(MarketplaceTxLink, { txHash, explorerUrl }),
92
- /* @__PURE__ */ jsx(Button, { className: "w-full h-11", onClick: onDone, children: "Done" }),
93
- footer
94
- ] });
95
- }
96
68
  function MarketplaceErrorState({
97
69
  tokenImage,
98
70
  name,
@@ -244,7 +216,6 @@ export {
244
216
  MarketplaceErrorState,
245
217
  MarketplaceProcessingState,
246
218
  MarketplaceSignInGate,
247
- MarketplaceSuccessState,
248
219
  MarketplaceTxLink
249
220
  };
250
221
  //# sourceMappingURL=marketplace-dialog-primitives.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, CheckCircle2, ExternalLink, Loader2, Sparkles, Wallet } from \"lucide-react\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { cn } from \"../utils/cn.js\";\n\ninterface MarketplaceTxLinkProps {\n txHash: string;\n explorerUrl: string;\n className?: string;\n}\n\nexport function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps) {\n return (\n <a\n href={`${explorerUrl}/tx/${txHash}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\",\n className\n )}\n >\n <span className=\"tabular-nums\">{txHash.slice(0, 10)}…{txHash.slice(-8)}</span>\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n );\n}\n\ninterface MarketplaceProcessingStateProps {\n title: string;\n description?: string;\n imageUrl?: string | null;\n imageAlt?: string;\n txHash?: string | null;\n explorerUrl?: string;\n}\n\nexport function MarketplaceProcessingState({\n title,\n description = \"Please wait, do not close this window.\",\n imageUrl,\n imageAlt = \"Token preview\",\n txHash,\n explorerUrl,\n}: MarketplaceProcessingStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {imageUrl ? (\n <div className=\"relative h-20 w-20 rounded-2xl overflow-hidden border border-border\">\n <Image src={imageUrl} alt={imageAlt} fill sizes=\"80px\" className=\"object-cover\" unoptimized />\n <div className=\"absolute inset-0 bg-background/50 flex items-center justify-center\">\n <Loader2 className=\"h-7 w-7 animate-spin text-primary\" />\n </div>\n </div>\n ) : (\n <Loader2 className=\"h-10 w-10 animate-spin text-primary\" />\n )}\n <div className=\"text-center space-y-1\">\n <p className=\"font-semibold\">{title}</p>\n {txHash && explorerUrl ? (\n <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} className=\"mt-1\" />\n ) : null}\n </div>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n );\n}\n\ninterface MarketplaceSignInGateProps {\n title: string;\n description: string;\n href: string;\n ctaLabel?: string;\n}\n\nexport function MarketplaceSignInGate({ title, description, href, ctaLabel = \"Set up account\" }: MarketplaceSignInGateProps) {\n return (\n <div className=\"flex flex-col items-center gap-4 p-6 py-10 text-center\">\n <Wallet className=\"h-10 w-10 text-muted-foreground\" />\n <div>\n <p className=\"font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{description}</p>\n </div>\n <div className=\"btn-border-animated w-full p-[1px] rounded-lg\">\n <Button\n asChild\n className=\"w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all\"\n >\n <a href={href}>{ctaLabel}</a>\n </Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceSuccessStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n txHash?: string | null;\n explorerUrl: string;\n onDone: () => void;\n footer?: ReactNode;\n}\n\nexport function MarketplaceSuccessState({\n tokenImage,\n name,\n title,\n description,\n txHash,\n explorerUrl,\n onDone,\n footer,\n}: MarketplaceSuccessStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-emerald-500 flex items-center justify-center border-2 border-background\">\n <CheckCircle2 className=\"h-5 w-5 text-white\" />\n </div>\n <Sparkles className=\"absolute -top-2 -right-2 h-5 w-5 text-brand-orange\" />\n </div>\n ) : (\n <div className=\"relative\">\n <div className=\"h-16 w-16 rounded-full bg-emerald-500/15 flex items-center justify-center\">\n <CheckCircle2 className=\"h-9 w-9 text-emerald-500\" />\n </div>\n <Sparkles className=\"absolute -top-1 -right-1 h-5 w-5 text-brand-orange\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <Button className=\"w-full h-11\" onClick={onDone}>Done</Button>\n {footer}\n </div>\n );\n}\n\ninterface MarketplaceErrorStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n error?: string | null;\n txHash?: string | null;\n explorerUrl: string;\n onRetry?: () => void;\n onDone: () => void;\n doneLabel?: string;\n}\n\nexport function MarketplaceErrorState({\n tokenImage,\n name,\n title,\n description,\n error,\n txHash,\n explorerUrl,\n onRetry,\n onDone,\n doneLabel = \"Done\",\n}: MarketplaceErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background\">\n <AlertCircle className=\"h-5 w-5 text-white\" />\n </div>\n </div>\n ) : (\n <div className=\"h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center\">\n <AlertCircle className=\"h-9 w-9 text-destructive\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {error ? (\n <Alert variant=\"destructive\" className=\"text-left\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <div className=\"flex w-full gap-2\">\n {onRetry ? (\n <Button variant=\"outline\" className=\"flex-1 h-11\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n <Button className=\"flex-1 h-11\" onClick={onDone}>{doneLabel}</Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceDialogHeroProps {\n tokenImage?: string | null;\n tokenName?: string;\n tokenId: string;\n fallbackIcon: ReactNode;\n badge?: ReactNode;\n}\n\nexport function MarketplaceDialogHero({\n tokenImage,\n tokenName,\n tokenId,\n fallbackIcon,\n badge,\n}: MarketplaceDialogHeroProps) {\n const name = tokenName || `Token #${tokenId}`;\n\n return (\n <div className=\"relative flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center\">\n {fallbackIcon}\n </div>\n )}\n </div>\n {badge}\n </div>\n );\n}\n\ninterface CurrencyPickerProps {\n currencies: string[];\n value: string;\n onChange: (value: string) => void;\n disabled?: boolean;\n}\n\nexport function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps) {\n return (\n <div className=\"grid grid-cols-5 gap-1.5\">\n {currencies.map((c) => (\n <Button\n key={c}\n type=\"button\"\n variant={value === c ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(c)}\n disabled={disabled}\n className=\"gap-1 px-2 text-xs w-full\"\n >\n <CurrencyIcon symbol={c} size={13} className=\"shrink-0\" />\n <span className=\"truncate\">{c}</span>\n </Button>\n ))}\n </div>\n );\n}\n\ninterface DurationPickerProps {\n options: ReadonlyArray<{ label: string; seconds: number }>;\n value: number;\n onChange: (value: number) => void;\n disabled?: boolean;\n cols?: 3 | 4;\n}\n\nexport function DurationPicker({ options, value, onChange, disabled, cols = 3 }: DurationPickerProps) {\n return (\n <div className={cols === 4 ? \"grid grid-cols-4 gap-2\" : \"grid grid-cols-3 gap-2\"}>\n {options.map((opt) => (\n <Button\n key={opt.label}\n type=\"button\"\n variant={value === opt.seconds ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(opt.seconds)}\n disabled={disabled}\n className=\"text-xs\"\n >\n {opt.label}\n </Button>\n ))}\n </div>\n );\n}\n\ninterface MarketplaceConfirmStepProps {\n summary?: ReactNode;\n description: string;\n error?: string | null;\n secondaryLabel: string;\n onSecondary: () => void;\n primaryLabel: string;\n onPrimary: () => void;\n primaryDisabled?: boolean;\n primaryIcon?: ReactNode;\n primaryVariant?: \"default\" | \"destructive\";\n footer?: ReactNode;\n}\n\nexport function MarketplaceConfirmStep({\n summary,\n description,\n error,\n secondaryLabel,\n onSecondary,\n primaryLabel,\n onPrimary,\n primaryDisabled,\n primaryIcon,\n primaryVariant = \"default\",\n footer,\n}: MarketplaceConfirmStepProps) {\n const primaryButton = primaryVariant === \"destructive\" ? (\n <Button\n variant=\"destructive\"\n className=\"flex-1 h-11\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryLabel}\n </Button>\n ) : (\n <div\n className={cn(\n \"btn-border-animated p-[1px] rounded-xl flex-1\",\n primaryDisabled && \"pointer-events-none\"\n )}\n >\n <button\n className=\"w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryIcon}\n {primaryLabel}\n </button>\n </div>\n );\n\n return (\n <div className=\"px-6 pb-6 pt-3 space-y-4\">\n {summary}\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n {error ? (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n <div className=\"flex gap-2 pt-1\">\n <Button\n variant=\"outline\"\n className=\"gap-1.5\"\n onClick={onSecondary}\n >\n {secondaryLabel}\n </Button>\n {primaryButton}\n </div>\n {footer}\n </div>\n );\n}\n"],"mappings":";AA2BM,SACA,KADA;AAxBN,OAAO,WAAW;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ACV,UAAU;AAAA,MACV,SAAS;AAAA,MAER;AAAA;AAAA,EACH,IAEA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,mBAAmB;AAAA,MACrB;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAGF,SACE,qBAAC,SAAI,WAAU,4BACZ;AAAA;AAAA,IACD,oBAAC,OAAE,WAAU,iCAAiC,uBAAY;AAAA,IACzD,QACC,qBAAC,SAAM,SAAQ,eACb;AAAA,0BAAC,eAAY,WAAU,WAAU;AAAA,MACjC,oBAAC,oBAAkB,iBAAM;AAAA,OAC3B,IACE;AAAA,IACJ,qBAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,WAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,MACH;AAAA,MACC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/marketplace-dialog-primitives.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport Image from \"./image.js\";\nimport { AlertCircle, ExternalLink, Loader2, Wallet } from \"lucide-react\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { Button } from \"./button.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { cn } from \"../utils/cn.js\";\n\ninterface MarketplaceTxLinkProps {\n txHash: string;\n explorerUrl: string;\n className?: string;\n}\n\nexport function MarketplaceTxLink({ txHash, explorerUrl, className }: MarketplaceTxLinkProps) {\n return (\n <a\n href={`${explorerUrl}/tx/${txHash}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n \"inline-flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors\",\n className\n )}\n >\n <span className=\"tabular-nums\">{txHash.slice(0, 10)}…{txHash.slice(-8)}</span>\n <ExternalLink className=\"h-3 w-3\" />\n </a>\n );\n}\n\ninterface MarketplaceProcessingStateProps {\n title: string;\n description?: string;\n imageUrl?: string | null;\n imageAlt?: string;\n txHash?: string | null;\n explorerUrl?: string;\n}\n\nexport function MarketplaceProcessingState({\n title,\n description = \"Please wait, do not close this window.\",\n imageUrl,\n imageAlt = \"Token preview\",\n txHash,\n explorerUrl,\n}: MarketplaceProcessingStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {imageUrl ? (\n <div className=\"relative h-20 w-20 rounded-2xl overflow-hidden border border-border\">\n <Image src={imageUrl} alt={imageAlt} fill sizes=\"80px\" className=\"object-cover\" unoptimized />\n <div className=\"absolute inset-0 bg-background/50 flex items-center justify-center\">\n <Loader2 className=\"h-7 w-7 animate-spin text-primary\" />\n </div>\n </div>\n ) : (\n <Loader2 className=\"h-10 w-10 animate-spin text-primary\" />\n )}\n <div className=\"text-center space-y-1\">\n <p className=\"font-semibold\">{title}</p>\n {txHash && explorerUrl ? (\n <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} className=\"mt-1\" />\n ) : null}\n </div>\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n </div>\n );\n}\n\ninterface MarketplaceSignInGateProps {\n title: string;\n description: string;\n href: string;\n ctaLabel?: string;\n}\n\nexport function MarketplaceSignInGate({ title, description, href, ctaLabel = \"Set up account\" }: MarketplaceSignInGateProps) {\n return (\n <div className=\"flex flex-col items-center gap-4 p-6 py-10 text-center\">\n <Wallet className=\"h-10 w-10 text-muted-foreground\" />\n <div>\n <p className=\"font-semibold\">{title}</p>\n <p className=\"text-sm text-muted-foreground mt-1\">{description}</p>\n </div>\n <div className=\"btn-border-animated w-full p-[1px] rounded-lg\">\n <Button\n asChild\n className=\"w-full bg-transparent text-white rounded-[7px] hover:bg-transparent hover:brightness-110 active:scale-[0.98] transition-all\"\n >\n <a href={href}>{ctaLabel}</a>\n </Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceErrorStateProps {\n tokenImage?: string | null;\n name: string;\n title: string;\n description: ReactNode;\n error?: string | null;\n txHash?: string | null;\n explorerUrl: string;\n onRetry?: () => void;\n onDone: () => void;\n doneLabel?: string;\n}\n\nexport function MarketplaceErrorState({\n tokenImage,\n name,\n title,\n description,\n error,\n txHash,\n explorerUrl,\n onRetry,\n onDone,\n doneLabel = \"Done\",\n}: MarketplaceErrorStateProps) {\n return (\n <div className=\"flex flex-col items-center gap-5 p-6 py-8\">\n {tokenImage ? (\n <div className=\"relative\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border\">\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n </div>\n <div className=\"absolute -bottom-2 -right-2 h-9 w-9 rounded-full bg-destructive flex items-center justify-center border-2 border-background\">\n <AlertCircle className=\"h-5 w-5 text-white\" />\n </div>\n </div>\n ) : (\n <div className=\"h-16 w-16 rounded-full bg-destructive/15 flex items-center justify-center\">\n <AlertCircle className=\"h-9 w-9 text-destructive\" />\n </div>\n )}\n <div className=\"text-center space-y-1 max-w-full\">\n <p className=\"font-bold text-xl break-words\">{title}</p>\n <p className=\"text-sm text-muted-foreground break-words\">{description}</p>\n </div>\n {error ? (\n <Alert variant=\"destructive\" className=\"text-left\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n {txHash && <MarketplaceTxLink txHash={txHash} explorerUrl={explorerUrl} />}\n <div className=\"flex w-full gap-2\">\n {onRetry ? (\n <Button variant=\"outline\" className=\"flex-1 h-11\" onClick={onRetry}>\n Try again\n </Button>\n ) : null}\n <Button className=\"flex-1 h-11\" onClick={onDone}>{doneLabel}</Button>\n </div>\n </div>\n );\n}\n\ninterface MarketplaceDialogHeroProps {\n tokenImage?: string | null;\n tokenName?: string;\n tokenId: string;\n fallbackIcon: ReactNode;\n badge?: ReactNode;\n}\n\nexport function MarketplaceDialogHero({\n tokenImage,\n tokenName,\n tokenId,\n fallbackIcon,\n badge,\n}: MarketplaceDialogHeroProps) {\n const name = tokenName || `Token #${tokenId}`;\n\n return (\n <div className=\"relative flex justify-center pt-6 shrink-0\">\n <div className=\"relative h-32 w-32 rounded-2xl overflow-hidden border border-border bg-muted\">\n {tokenImage ? (\n <Image src={tokenImage} alt={name} fill sizes=\"128px\" className=\"object-cover\" unoptimized />\n ) : (\n <div className=\"h-full w-full bg-gradient-to-br from-brand-blue/20 via-brand-purple/10 to-transparent flex items-center justify-center\">\n {fallbackIcon}\n </div>\n )}\n </div>\n {badge}\n </div>\n );\n}\n\ninterface CurrencyPickerProps {\n currencies: string[];\n value: string;\n onChange: (value: string) => void;\n disabled?: boolean;\n}\n\nexport function CurrencyPicker({ currencies, value, onChange, disabled }: CurrencyPickerProps) {\n return (\n <div className=\"grid grid-cols-5 gap-1.5\">\n {currencies.map((c) => (\n <Button\n key={c}\n type=\"button\"\n variant={value === c ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(c)}\n disabled={disabled}\n className=\"gap-1 px-2 text-xs w-full\"\n >\n <CurrencyIcon symbol={c} size={13} className=\"shrink-0\" />\n <span className=\"truncate\">{c}</span>\n </Button>\n ))}\n </div>\n );\n}\n\ninterface DurationPickerProps {\n options: ReadonlyArray<{ label: string; seconds: number }>;\n value: number;\n onChange: (value: number) => void;\n disabled?: boolean;\n cols?: 3 | 4;\n}\n\nexport function DurationPicker({ options, value, onChange, disabled, cols = 3 }: DurationPickerProps) {\n return (\n <div className={cols === 4 ? \"grid grid-cols-4 gap-2\" : \"grid grid-cols-3 gap-2\"}>\n {options.map((opt) => (\n <Button\n key={opt.label}\n type=\"button\"\n variant={value === opt.seconds ? \"default\" : \"outline\"}\n size=\"sm\"\n onClick={() => onChange(opt.seconds)}\n disabled={disabled}\n className=\"text-xs\"\n >\n {opt.label}\n </Button>\n ))}\n </div>\n );\n}\n\ninterface MarketplaceConfirmStepProps {\n summary?: ReactNode;\n description: string;\n error?: string | null;\n secondaryLabel: string;\n onSecondary: () => void;\n primaryLabel: string;\n onPrimary: () => void;\n primaryDisabled?: boolean;\n primaryIcon?: ReactNode;\n primaryVariant?: \"default\" | \"destructive\";\n footer?: ReactNode;\n}\n\nexport function MarketplaceConfirmStep({\n summary,\n description,\n error,\n secondaryLabel,\n onSecondary,\n primaryLabel,\n onPrimary,\n primaryDisabled,\n primaryIcon,\n primaryVariant = \"default\",\n footer,\n}: MarketplaceConfirmStepProps) {\n const primaryButton = primaryVariant === \"destructive\" ? (\n <Button\n variant=\"destructive\"\n className=\"flex-1 h-11\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryLabel}\n </Button>\n ) : (\n <div\n className={cn(\n \"btn-border-animated p-[1px] rounded-xl flex-1\",\n primaryDisabled && \"pointer-events-none\"\n )}\n >\n <button\n className=\"w-full h-11 rounded-[11px] flex items-center justify-center gap-2 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] bg-transparent\"\n disabled={primaryDisabled}\n onClick={onPrimary}\n >\n {primaryIcon}\n {primaryLabel}\n </button>\n </div>\n );\n\n return (\n <div className=\"px-6 pb-6 pt-3 space-y-4\">\n {summary}\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n {error ? (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n ) : null}\n <div className=\"flex gap-2 pt-1\">\n <Button\n variant=\"outline\"\n className=\"gap-1.5\"\n onClick={onSecondary}\n >\n {secondaryLabel}\n </Button>\n {primaryButton}\n </div>\n {footer}\n </div>\n );\n}\n"],"mappings":";AA2BM,SACA,KADA;AAxBN,OAAO,WAAW;AAClB,SAAS,aAAa,cAAc,SAAS,cAAc;AAC3D,SAAS,OAAO,wBAAwB;AACxC,SAAS,cAAc;AACvB,SAAS,oBAAoB;AAC7B,SAAS,UAAU;AAQZ,SAAS,kB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A;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AACF,GAAgC;AAC9B,QAAM,gBAAgB,mBAAmB,gBACvC;AAAA,IAAC;AAAA;AAAA,MACC,SAAQ;AAAA,MACR,WAAU;AAAA,MACV,UAAU;AAAA,MACV,SAAS;AAAA,MAER;AAAA;AAAA,EACH,IAEA;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,mBAAmB;AAAA,MACrB;AAAA,MAEA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,UAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,YACA;AAAA;AAAA;AAAA,MACH;AAAA;AAAA,EACF;AAGF,SACE,qBAAC,SAAI,WAAU,4BACZ;AAAA;AAAA,IACD,oBAAC,OAAE,WAAU,iCAAiC,uBAAY;AAAA,IACzD,QACC,qBAAC,SAAM,SAAQ,eACb;AAAA,0BAAC,eAAY,WAAU,WAAU;AAAA,MACjC,oBAAC,oBAAkB,iBAAM;AAAA,OAC3B,IACE;AAAA,IACJ,qBAAC,SAAI,WAAU,mBACb;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,SAAQ;AAAA,UACR,WAAU;AAAA,UACV,SAAS;AAAA,UAER;AAAA;AAAA,MACH;AAAA,MACC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
@@ -28,7 +28,7 @@ var import_lucide_react = require("lucide-react");
28
28
  var import_starknet = require("@medialane/sdk/starknet");
29
29
  var import_button = require("./button.js");
30
30
  var import_transaction_dialog = require("./transaction-dialog.js");
31
- var import_transaction_done = require("./transaction-done.js");
31
+ var import_transaction_success = require("./transaction-success.js");
32
32
  var import_reward_earned = require("./rewards/reward-earned.js");
33
33
  var import_medialane_app = require("./medialane-app.js");
34
34
  var import_claim_proof = require("../utils/drop/claim-proof.js");
@@ -74,13 +74,14 @@ function PopClaimButton({ collectionAddress }) {
74
74
  busy ? "Claiming\u2026" : "Claim credential"
75
75
  ] }),
76
76
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_dialog.TransactionDialog, { tx, title: "Claim credential", workingLabel: "Claiming your credential\u2026", firstStepLabel: "Prepare claim", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
77
- import_transaction_done.TransactionDone,
77
+ import_transaction_success.TransactionSuccess,
78
78
  {
79
- tx,
80
79
  name: "Credential",
81
80
  title: "Credential claimed!",
82
81
  description: "Your proof of participation is now on-chain.",
83
- footer: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_reward_earned.RewardEarned, { actionType: "claim_pop" })
82
+ txHash: tx.txHash,
83
+ actions: [{ label: "Done", onClick: tx.reset }],
84
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_reward_earned.RewardEarned, { actionType: "claim_pop" })
84
85
  }
85
86
  ) })
86
87
  ] });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/pop-claim-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Award, Loader2 } from \"lucide-react\";\nimport { popClaimState, type PopClaimInfo } from \"@medialane/sdk/starknet\";\nimport { Button } from \"./button.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionDone } from \"./transaction-done.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { claimProofFor } from \"../utils/drop/claim-proof.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { usePopClaimStatus } from \"../utils/use-pop.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport function PopClaimButton({ collectionAddress }: { collectionAddress: string }) {\n const app = useMedialaneApp();\n const { walletAddress } = app;\n const { hasClaimed, mutate } = usePopClaimStatus(collectionAddress, walletAddress);\n const [proof, setProof] = useState<string[] | null>(null);\n const [info, setInfo] = useState<PopClaimInfo | null>(null);\n const tx = useTransaction();\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n\n useEffect(() => {\n let storage: Storage | null = null;\n try {\n storage = window.sessionStorage;\n } catch {\n storage = null;\n }\n setProof(claimProofFor(storage, collectionAddress, window.location.hash));\n app.getClient().api.chainReads.popClaimInfo(collectionAddress)\n .then(setInfo)\n .catch(() => setInfo(null));\n }, [app, collectionAddress]);\n\n useEffect(() => {\n if (tx.phase === \"success\") void mutate();\n }, [tx.phase, mutate]);\n\n const state = popClaimState({\n hasClaimed,\n proof,\n wallet: walletAddress,\n info: info && { ...info, now: Math.floor(Date.now() / 1000) },\n });\n\n const claim = () => {\n if (!proof) return;\n void tx.run(async (signer) => {\n await runIntentCalls(signer, () => app.getClient().api.intents.create(\"pop-claim\", { claimer: signer.address, collection: collectionAddress, proof }));\n });\n };\n\n return (\n <>\n {(state === \"ready\" || busy) && (\n <Button size=\"sm\" className=\"w-full gap-1.5\" onClick={claim} disabled={busy}>\n {busy ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : <Award className=\"h-3.5 w-3.5\" />}\n {busy ? \"Claiming…\" : \"Claim credential\"}\n </Button>\n )}\n <TransactionDialog tx={tx} title=\"Claim credential\" workingLabel=\"Claiming your credential…\" firstStepLabel=\"Prepare claim\">\n <TransactionDone\n tx={tx}\n name=\"Credential\"\n title=\"Credential claimed!\"\n description=\"Your proof of participation is now on-chain.\"\n footer={<RewardEarned actionType=\"claim_pop\" />}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwDI;AAtDJ,mBAAoC;AACpC,0BAA+B;AAC/B,sBAAiD;AACjD,oBAAuB;AACvB,gCAAkC;AAClC,8BAAgC;AAChC,2BAA6B;AAC7B,2BAAgC;AAChC,yBAA8B;AAC9B,8BAA+B;AAC/B,qBAAkC;AAClC,6BAA+B;AAExB,S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,eAAU,WAAW,SACrB,6CAAC,wBAAO,MAAK,MAAK,WAAU,kBAAiB,SAAS,OAAO,UAAU,MACpE;AAAA,aAAO,4CAAC,+BAAQ,WAAU,4BAA2B,IAAK,4CAAC,6BAAM,WAAU,eAAc;AAAA,MACzF,OAAO,mBAAc;AAAA,OACxB;AAAA,IAEF,4CAAC,+CAAkB,IAAQ,OAAM,oBAAmB,cAAa,kCAA4B,gBAAe,iBAC1G;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,OAAM;AAAA,QACN,aAAY;AAAA,QACZ,QAAQ,4CAAC,qCAAa,YAAW,aAAY;AAAA;AAAA,IAC/C,GACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/pop-claim-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Award, Loader2 } from \"lucide-react\";\nimport { popClaimState, type PopClaimInfo } from \"@medialane/sdk/starknet\";\nimport { Button } from \"./button.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { claimProofFor } from \"../utils/drop/claim-proof.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { usePopClaimStatus } from \"../utils/use-pop.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport function PopClaimButton({ collectionAddress }: { collectionAddress: string }) {\n const app = useMedialaneApp();\n const { walletAddress } = app;\n const { hasClaimed, mutate } = usePopClaimStatus(collectionAddress, walletAddress);\n const [proof, setProof] = useState<string[] | null>(null);\n const [info, setInfo] = useState<PopClaimInfo | null>(null);\n const tx = useTransaction();\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n\n useEffect(() => {\n let storage: Storage | null = null;\n try {\n storage = window.sessionStorage;\n } catch {\n storage = null;\n }\n setProof(claimProofFor(storage, collectionAddress, window.location.hash));\n app.getClient().api.chainReads.popClaimInfo(collectionAddress)\n .then(setInfo)\n .catch(() => setInfo(null));\n }, [app, collectionAddress]);\n\n useEffect(() => {\n if (tx.phase === \"success\") void mutate();\n }, [tx.phase, mutate]);\n\n const state = popClaimState({\n hasClaimed,\n proof,\n wallet: walletAddress,\n info: info && { ...info, now: Math.floor(Date.now() / 1000) },\n });\n\n const claim = () => {\n if (!proof) return;\n void tx.run(async (signer) => {\n await runIntentCalls(signer, () => app.getClient().api.intents.create(\"pop-claim\", { claimer: signer.address, collection: collectionAddress, proof }));\n });\n };\n\n return (\n <>\n {(state === \"ready\" || busy) && (\n <Button size=\"sm\" className=\"w-full gap-1.5\" onClick={claim} disabled={busy}>\n {busy ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : <Award className=\"h-3.5 w-3.5\" />}\n {busy ? \"Claiming…\" : \"Claim credential\"}\n </Button>\n )}\n <TransactionDialog tx={tx} title=\"Claim credential\" workingLabel=\"Claiming your credential…\" firstStepLabel=\"Prepare claim\">\n <TransactionSuccess\n name=\"Credential\"\n title=\"Credential claimed!\"\n description=\"Your proof of participation is now on-chain.\"\n txHash={tx.txHash}\n actions={[{ label: \"Done\", onClick: tx.reset }]}\n >\n <RewardEarned actionType=\"claim_pop\" />\n </TransactionSuccess>\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwDI;AAtDJ,mBAAoC;AACpC,0BAA+B;AAC/B,sBAAiD;AACjD,oBAAuB;AACvB,gCAAkC;AAClC,iCAAmC;AACnC,2BAA6B;AAC7B,2BAAgC;AAChC,yBAA8B;AAC9B,8BAA+B;AAC/B,qBAAkC;AAClC,6BAA+B;AAExB,SAAS,eAAe,EAAE,kBAAkB,GAAkC;AACnF,QAAM,UAAM,sCAAgB;AAC5B,QAAM,EAAE,cAAc,IAAI;AAC1B,QAAM,EAAE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Q,WAAU,4BAA2B,IAAK,4CAAC,6BAAM,WAAU,eAAc;AAAA,MACzF,OAAO,mBAAc;AAAA,OACxB;AAAA,IAEF,4CAAC,+CAAkB,IAAQ,OAAM,oBAAmB,cAAa,kCAA4B,gBAAe,iBAC1G;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAM;AAAA,QACN,aAAY;AAAA,QACZ,QAAQ,GAAG;AAAA,QACX,SAAS,CAAC,EAAE,OAAO,QAAQ,SAAS,GAAG,MAAM,CAAC;AAAA,QAE9C,sDAAC,qCAAa,YAAW,aAAY;AAAA;AAAA,IACvC,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -5,7 +5,7 @@ import { Award, Loader2 } from "lucide-react";
5
5
  import { popClaimState } from "@medialane/sdk/starknet";
6
6
  import { Button } from "./button.js";
7
7
  import { TransactionDialog } from "./transaction-dialog.js";
8
- import { TransactionDone } from "./transaction-done.js";
8
+ import { TransactionSuccess } from "./transaction-success.js";
9
9
  import { RewardEarned } from "./rewards/reward-earned.js";
10
10
  import { useMedialaneApp } from "./medialane-app.js";
11
11
  import { claimProofFor } from "../utils/drop/claim-proof.js";
@@ -51,13 +51,14 @@ function PopClaimButton({ collectionAddress }) {
51
51
  busy ? "Claiming\u2026" : "Claim credential"
52
52
  ] }),
53
53
  /* @__PURE__ */ jsx(TransactionDialog, { tx, title: "Claim credential", workingLabel: "Claiming your credential\u2026", firstStepLabel: "Prepare claim", children: /* @__PURE__ */ jsx(
54
- TransactionDone,
54
+ TransactionSuccess,
55
55
  {
56
- tx,
57
56
  name: "Credential",
58
57
  title: "Credential claimed!",
59
58
  description: "Your proof of participation is now on-chain.",
60
- footer: /* @__PURE__ */ jsx(RewardEarned, { actionType: "claim_pop" })
59
+ txHash: tx.txHash,
60
+ actions: [{ label: "Done", onClick: tx.reset }],
61
+ children: /* @__PURE__ */ jsx(RewardEarned, { actionType: "claim_pop" })
61
62
  }
62
63
  ) })
63
64
  ] });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/pop-claim-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Award, Loader2 } from \"lucide-react\";\nimport { popClaimState, type PopClaimInfo } from \"@medialane/sdk/starknet\";\nimport { Button } from \"./button.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionDone } from \"./transaction-done.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { claimProofFor } from \"../utils/drop/claim-proof.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { usePopClaimStatus } from \"../utils/use-pop.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport function PopClaimButton({ collectionAddress }: { collectionAddress: string }) {\n const app = useMedialaneApp();\n const { walletAddress } = app;\n const { hasClaimed, mutate } = usePopClaimStatus(collectionAddress, walletAddress);\n const [proof, setProof] = useState<string[] | null>(null);\n const [info, setInfo] = useState<PopClaimInfo | null>(null);\n const tx = useTransaction();\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n\n useEffect(() => {\n let storage: Storage | null = null;\n try {\n storage = window.sessionStorage;\n } catch {\n storage = null;\n }\n setProof(claimProofFor(storage, collectionAddress, window.location.hash));\n app.getClient().api.chainReads.popClaimInfo(collectionAddress)\n .then(setInfo)\n .catch(() => setInfo(null));\n }, [app, collectionAddress]);\n\n useEffect(() => {\n if (tx.phase === \"success\") void mutate();\n }, [tx.phase, mutate]);\n\n const state = popClaimState({\n hasClaimed,\n proof,\n wallet: walletAddress,\n info: info && { ...info, now: Math.floor(Date.now() / 1000) },\n });\n\n const claim = () => {\n if (!proof) return;\n void tx.run(async (signer) => {\n await runIntentCalls(signer, () => app.getClient().api.intents.create(\"pop-claim\", { claimer: signer.address, collection: collectionAddress, proof }));\n });\n };\n\n return (\n <>\n {(state === \"ready\" || busy) && (\n <Button size=\"sm\" className=\"w-full gap-1.5\" onClick={claim} disabled={busy}>\n {busy ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : <Award className=\"h-3.5 w-3.5\" />}\n {busy ? \"Claiming…\" : \"Claim credential\"}\n </Button>\n )}\n <TransactionDialog tx={tx} title=\"Claim credential\" workingLabel=\"Claiming your credential…\" firstStepLabel=\"Prepare claim\">\n <TransactionDone\n tx={tx}\n name=\"Credential\"\n title=\"Credential claimed!\"\n description=\"Your proof of participation is now on-chain.\"\n footer={<RewardEarned actionType=\"claim_pop\" />}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";AAwDI,mBAGc,KADV,YAFJ;AAtDJ,SAAS,WAAW,gBAAgB;AACpC,SAAS,OAAO,eAAe;AAC/B,SAAS,qBAAwC;AACjD,SAAS,cAAc;AACvB,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAChC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAExB,SAAS,eAAe,EAAE,kBAAkB,GAAkC;AACnF,QAAM,MAAM,gBAAgB;AAC5B,QAAM,EAAE,cAAc,IAAI;AAC1B,QAAM,EAAE,YAAY,OAAO,IAAI,kBAAkB,mBAAmB,aAAa;AACjF,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA0B,IAAI;AACxD,QAAM,CAAC,MAAM,OAAO,IAAI,SAA8B,IAAI;AAC1D,QAAM,KAAK,eAAe;AAC1B,QAAM,OAAO,GAAG,UAAU,eAAe,GAAG,UAAU,gBAAgB,GAAG,UAAU;AAEnF,YAAU,MAAM;AACd,QAAI,UAA0B;AAC9B,QAAI;AACF,gBAAU,OAAO;AAAA,IACnB,QAAQ;AACN,gBAAU;AAAA,IACZ;AACA,aAAS,cAAc,SAAS,mBAAmB,OAAO,SAAS,IAAI,CAAC;AACxE,QAAI,UAAU,EAAE,IAAI,WAAW,aAAa,iBAAiB,EAC1D,KAAK,OAAO,EACZ,MAAM,MAAM,QAAQ,IAAI,CAAC;AAAA,EAC9B,GAAG,CAAC,KAAK,iBAAiB,CAAC;AAE3B,YAAU,MAAM;AACd,QAAI,GAAG,UAAU,UAAW,MAAK,OAAO;AAAA,EAC1C,GAAG,CAAC,GAAG,OAAO,MAAM,CAAC;AAErB,QAAM,QAAQ,cAAc;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,MAAM,QAAQ,EAAE,GAAG,MAAM,KAAK,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI,EAAE;AAAA,EAC9D,CAAC;AAED,QAAM,QAAQ,MAAM;AAClB,QAAI,CAAC,MAAO;AACZ,SAAK,GAAG,IAAI,OAAO,WAAW;AAC5B,YAAM,eAAe,QAAQ,MAAM,IAAI,UAAU,EAAE,IAAI,QAAQ,OAAO,aAAa,EAAE,SAAS,OAAO,SAAS,YAAY,mBAAmB,MAAM,CAAC,CAAC;AAAA,IACvJ,CAAC;AAAA,EACH;AAEA,SACE,iCACI;AAAA,eAAU,WAAW,SACrB,qBAAC,UAAO,MAAK,MAAK,WAAU,kBAAiB,SAAS,OAAO,UAAU,MACpE;AAAA,aAAO,oBAAC,WAAQ,WAAU,4BAA2B,IAAK,oBAAC,SAAM,WAAU,eAAc;AAAA,MACzF,OAAO,mBAAc;AAAA,OACxB;AAAA,IAEF,oBAAC,qBAAkB,IAAQ,OAAM,oBAAmB,cAAa,kCAA4B,gBAAe,iBAC1G;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,MAAK;AAAA,QACL,OAAM;AAAA,QACN,aAAY;AAAA,QACZ,QAAQ,oBAAC,gBAAa,YAAW,aAAY;AAAA;AAAA,IAC/C,GACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/pop-claim-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Award, Loader2 } from \"lucide-react\";\nimport { popClaimState, type PopClaimInfo } from \"@medialane/sdk/starknet\";\nimport { Button } from \"./button.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { RewardEarned } from \"./rewards/reward-earned.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { claimProofFor } from \"../utils/drop/claim-proof.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { usePopClaimStatus } from \"../utils/use-pop.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport function PopClaimButton({ collectionAddress }: { collectionAddress: string }) {\n const app = useMedialaneApp();\n const { walletAddress } = app;\n const { hasClaimed, mutate } = usePopClaimStatus(collectionAddress, walletAddress);\n const [proof, setProof] = useState<string[] | null>(null);\n const [info, setInfo] = useState<PopClaimInfo | null>(null);\n const tx = useTransaction();\n const busy = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n\n useEffect(() => {\n let storage: Storage | null = null;\n try {\n storage = window.sessionStorage;\n } catch {\n storage = null;\n }\n setProof(claimProofFor(storage, collectionAddress, window.location.hash));\n app.getClient().api.chainReads.popClaimInfo(collectionAddress)\n .then(setInfo)\n .catch(() => setInfo(null));\n }, [app, collectionAddress]);\n\n useEffect(() => {\n if (tx.phase === \"success\") void mutate();\n }, [tx.phase, mutate]);\n\n const state = popClaimState({\n hasClaimed,\n proof,\n wallet: walletAddress,\n info: info && { ...info, now: Math.floor(Date.now() / 1000) },\n });\n\n const claim = () => {\n if (!proof) return;\n void tx.run(async (signer) => {\n await runIntentCalls(signer, () => app.getClient().api.intents.create(\"pop-claim\", { claimer: signer.address, collection: collectionAddress, proof }));\n });\n };\n\n return (\n <>\n {(state === \"ready\" || busy) && (\n <Button size=\"sm\" className=\"w-full gap-1.5\" onClick={claim} disabled={busy}>\n {busy ? <Loader2 className=\"h-3.5 w-3.5 animate-spin\" /> : <Award className=\"h-3.5 w-3.5\" />}\n {busy ? \"Claiming…\" : \"Claim credential\"}\n </Button>\n )}\n <TransactionDialog tx={tx} title=\"Claim credential\" workingLabel=\"Claiming your credential…\" firstStepLabel=\"Prepare claim\">\n <TransactionSuccess\n name=\"Credential\"\n title=\"Credential claimed!\"\n description=\"Your proof of participation is now on-chain.\"\n txHash={tx.txHash}\n actions={[{ label: \"Done\", onClick: tx.reset }]}\n >\n <RewardEarned actionType=\"claim_pop\" />\n </TransactionSuccess>\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";AAwDI,mBAGc,KADV,YAFJ;AAtDJ,SAAS,WAAW,gBAAgB;AACpC,SAAS,OAAO,eAAe;AAC/B,SAAS,qBAAwC;AACjD,SAAS,cAAc;AACvB,SAAS,yBAAyB;AAClC,SAAS,0BAA0B;AACnC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAChC,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAExB,SAAS,eAAe,EAAE,kBAAkB,GAAkC;AACnF,QAAM,MAAM,gBAAgB;AAC5B,QAAM,EAAE,cAAc,IAAI;AAC1B,QAAM,EAAE,YAAY,OAAO,IAAI,kBAAkB,mBAAmB,aAAa;AACjF,QAAM,CAAC,OAAO,QAAQ,IAAI,SAA0B,IAAI;AACxD,QAAM,CAAC,MAAM,OAAO,IAAI,SAA8B,IAAI;AAC1D,QAAM,KAAK,eAAe;AAC1B,QAAM,OAAO,GAAG,UAAU,eAAe,GAAG,UAAU,gBAAgB,GAAG,UAAU;AAEnF,YAAU,MAAM;AACd,QAAI,UAA0B;AAC9B,QAAI;AACF,gBAAU,OAAO;AAAA,IACnB,QAAQ;AACN,gBAAU;AAAA,IACZ;AACA,aAAS,cAAc,SAAS,mBAAmB,OAAO,SAAS,IAAI,CAAC;AACxE,QAAI,UAAU,EAAE,IAAI,WAAW,aAAa,iBAAiB,EAC1D,KAAK,OAAO,EACZ,MAAM,MAAM,QAAQ,IAAI,CAAC;AAAA,EAC9B,GAAG,CAAC,KAAK,iBAAiB,CAAC;AAE3B,YAAU,MAAM;AACd,QAAI,GAAG,UAAU,UAAW,MAAK,OAAO;AAAA,EAC1C,GAAG,CAAC,GAAG,OAAO,MAAM,CAAC;AAErB,QAAM,QAAQ,cAAc;AAAA,IAC1B;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR,MAAM,QAAQ,EAAE,GAAG,MAAM,KAAK,KAAK,MAAM,KAAK,IAAI,IAAI,GAAI,EAAE;AAAA,EAC9D,CAAC;AAED,QAAM,QAAQ,MAAM;AAClB,QAAI,CAAC,MAAO;AACZ,SAAK,GAAG,IAAI,OAAO,WAAW;AAC5B,YAAM,eAAe,QAAQ,MAAM,IAAI,UAAU,EAAE,IAAI,QAAQ,OAAO,aAAa,EAAE,SAAS,OAAO,SAAS,YAAY,mBAAmB,MAAM,CAAC,CAAC;AAAA,IACvJ,CAAC;AAAA,EACH;AAEA,SACE,iCACI;AAAA,eAAU,WAAW,SACrB,qBAAC,UAAO,MAAK,MAAK,WAAU,kBAAiB,SAAS,OAAO,UAAU,MACpE;AAAA,aAAO,oBAAC,WAAQ,WAAU,4BAA2B,IAAK,oBAAC,SAAM,WAAU,eAAc;AAAA,MACzF,OAAO,mBAAc;AAAA,OACxB;AAAA,IAEF,oBAAC,qBAAkB,IAAQ,OAAM,oBAAmB,cAAa,kCAA4B,gBAAe,iBAC1G;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAM;AAAA,QACN,aAAY;AAAA,QACZ,QAAQ,GAAG;AAAA,QACX,SAAS,CAAC,EAAE,OAAO,QAAQ,SAAS,GAAG,MAAM,CAAC;AAAA,QAE9C,8BAAC,gBAAa,YAAW,aAAY;AAAA;AAAA,IACvC,GACF;AAAA,KACF;AAEJ;","names":[]}
@@ -44,7 +44,7 @@ var import_motion_primitives = require("./motion-primitives.js");
44
44
  var import_skeleton = require("./skeleton.js");
45
45
  var import_textarea = require("./textarea.js");
46
46
  var import_transaction_dialog = require("./transaction-dialog.js");
47
- var import_transaction_done = require("./transaction-done.js");
47
+ var import_transaction_success = require("./transaction-success.js");
48
48
  var import_wallet_required = require("./wallet-required.js");
49
49
  var import_run_intent_calls = require("../utils/run-intent-calls.js");
50
50
  var import_use_collections = require("../utils/use-collections.js");
@@ -192,7 +192,7 @@ function PopManagePage({ contract }) {
192
192
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-muted-foreground", children: "You are not the organizer of this event." }),
193
193
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { asChild: true, variant: "outline", size: "sm", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: "/launchpad/pop", children: "\u2190 Back to events" }) })
194
194
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "max-w-xl mx-auto px-4 pt-10 pb-16 space-y-6", children: [
195
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_dialog.TransactionDialog, { tx, title: "Manage event", workingLabel: "Updating your event\u2026", firstStepLabel: "Prepare", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_done.TransactionDone, { tx, name: collection.name ?? "Event", title: done.title, description: done.description }) }),
195
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_dialog.TransactionDialog, { tx, title: "Manage event", workingLabel: "Updating your event\u2026", firstStepLabel: "Prepare", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_success.TransactionSuccess, { name: collection.name ?? "Event", title: done.title, description: done.description, txHash: tx.txHash, actions: [{ label: "Done", onClick: tx.reset }] }) }),
196
196
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_motion_primitives.FadeIn, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { asChild: true, variant: "ghost", size: "sm", className: "-ml-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: "/launchpad/pop", children: [
197
197
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowLeft, { className: "h-3.5 w-3.5 mr-1.5" }),
198
198
  "All events"
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/pop-manage-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { buildPopAllowlist, popClaimLinks, popClaimLinksCsv, type PopClaimLink } from \"@medialane/sdk/starknet\";\nimport { ArrowLeft, Award, AlertCircle, CheckCircle2, Download, Loader2, Send, Users } from \"lucide-react\";\nimport { Button } from \"./button.js\";\nimport Link from \"./link.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { Skeleton } from \"./skeleton.js\";\nimport { Textarea } from \"./textarea.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionDone } from \"./transaction-done.js\";\nimport { WalletRequired } from \"./wallet-required.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useCollection } from \"../utils/use-collections.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nfunction parseAddresses(raw: string): string[] {\n return raw\n .split(/[\\n,\\s]+/)\n .map((a) => a.trim())\n .filter((a) => /^0x[0-9a-fA-F]+$/.test(a));\n}\n\nfunction downloadCsv(links: PopClaimLink[]) {\n const href = URL.createObjectURL(new Blob([popClaimLinksCsv(links)], { type: \"text/csv\" }));\n const anchor = Object.assign(document.createElement(\"a\"), { href, download: \"claim-links.csv\" });\n anchor.click();\n URL.revokeObjectURL(href);\n}\n\nfunction IssueSection({\n onIssue,\n isSubmitting,\n}: {\n onIssue: (address: string) => void;\n isSubmitting: boolean;\n}) {\n const [raw, setRaw] = useState(\"\");\n const address = raw.trim();\n const valid = /^0x[0-9a-fA-F]{1,64}$/.test(address);\n\n return (\n <div className=\"bento-cell p-5 space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Award className=\"h-4 w-4 text-green-500\" />\n <span className=\"font-semibold text-sm\">Issue directly</span>\n </div>\n <p className=\"text-xs text-muted-foreground\">\n Send the credential straight to one wallet — for a late participant, without republishing the list or\n changing anyone&apos;s claim link.\n </p>\n <input\n type=\"text\"\n placeholder=\"0x...\"\n value={raw}\n onChange={(e) => setRaw(e.target.value)}\n className=\"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm tabular-nums placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring\"\n />\n <Button\n size=\"sm\"\n variant=\"outline\"\n className=\"w-full\"\n disabled={!valid || isSubmitting}\n onClick={() => {\n onIssue(address);\n setRaw(\"\");\n }}\n >\n <Send className=\"h-3.5 w-3.5 mr-1.5\" />\n Issue credential\n </Button>\n </div>\n );\n}\n\nfunction AllowlistSection({\n onPublish,\n isSubmitting,\n links,\n}: {\n onPublish: (addresses: string[]) => void;\n isSubmitting: boolean;\n links: PopClaimLink[] | null;\n}) {\n const [raw, setRaw] = useState(\"\");\n const parsed = parseAddresses(raw);\n\n return (\n <div className=\"bento-cell p-5 space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Users className=\"h-4 w-4 text-green-500\" />\n <span className=\"font-semibold text-sm\">Participants</span>\n {parsed.length > 0 && (\n <span className=\"ml-auto text-xs text-muted-foreground\">\n {parsed.length} address{parsed.length !== 1 ? \"es\" : \"\"}\n </span>\n )}\n </div>\n <p className=\"text-xs text-muted-foreground\">\n Paste every participant&apos;s wallet address. Publishing replaces the previous list and every link\n sent before it — send the new links to everyone who hasn&apos;t claimed yet. The list stays in this\n browser: download the claim links and send each participant theirs.\n </p>\n <Textarea\n placeholder={\"Paste Starknet addresses, one per line:\\n0x04a...\\n0x06b...\"}\n rows={8}\n value={raw}\n onChange={(e) => setRaw(e.target.value)}\n className=\"tabular-nums text-xs resize-none\"\n />\n <Button\n size=\"sm\"\n className=\"w-full bg-green-600 hover:bg-green-700 text-white\"\n disabled={parsed.length === 0 || isSubmitting}\n onClick={() => onPublish(parsed)}\n >\n {isSubmitting ? (\n <>\n <Loader2 className=\"h-3.5 w-3.5 animate-spin mr-1.5\" />\n Publishing…\n </>\n ) : (\n <>\n <CheckCircle2 className=\"h-3.5 w-3.5 mr-1.5\" />\n Publish {parsed.length > 0 ? `${parsed.length} participant${parsed.length !== 1 ? \"s\" : \"\"}` : \"participants\"}\n </>\n )}\n </Button>\n {links && (\n <div className=\"space-y-2 pt-2\">\n <Button variant=\"outline\" size=\"sm\" className=\"w-full\" onClick={() => downloadCsv(links)}>\n <Download className=\"h-3.5 w-3.5 mr-1.5\" />\n Download claim links (CSV)\n </Button>\n <ul className=\"max-h-48 overflow-auto text-xs tabular-nums space-y-1 text-muted-foreground\">\n {links.map((link) => (\n <li key={link.address} className=\"truncate\">{link.address}</li>\n ))}\n </ul>\n </div>\n )}\n </div>\n );\n}\n\nexport function PopManagePage({ contract }: { contract: string }) {\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const { collection, isLoading } = useCollection(contract);\n const tx = useTransaction();\n const [done, setDone] = useState({ title: \"\", description: \"\" });\n const [links, setLinks] = useState<PopClaimLink[] | null>(null);\n const isSubmitting = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n\n const isOwner =\n walletAddress &&\n collection?.owner &&\n normalizeAddress(\"STARKNET\", walletAddress) === normalizeAddress(\"STARKNET\", collection.owner);\n\n const issue = (recipient: string) => {\n setDone({ title: \"Credential issued\", description: \"The credential is now in their wallet.\" });\n void tx.run(async (signer) => {\n await runIntentCalls(signer, () => app.getClient().api.intents.create(\"pop-manage\", { owner: signer.address, collection: contract, action: \"issue\", recipient }));\n });\n };\n\n const publish = (addresses: string[]) => {\n const list = buildPopAllowlist(addresses);\n const count = Object.keys(list.proofs).length;\n setDone({ title: \"Participants published\", description: `Published ${count} participant${count !== 1 ? \"s\" : \"\"}.` });\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () => app.getClient().api.intents.create(\"pop-manage\", { owner: signer.address, collection: contract, action: \"set_allowlist_root\", root: list.root }));\n })\n .then((ok) => {\n if (ok) setLinks(popClaimLinks(window.location.origin, contract, list));\n });\n };\n\n return (\n <WalletRequired icon={Award} title=\"Connect your wallet\" description=\"Connect to manage your event.\">\n {isLoading ? (\n <div className=\"max-w-xl mx-auto px-4 pt-10 pb-16 space-y-4\">\n <Skeleton className=\"h-6 w-24\" />\n <Skeleton className=\"h-32 w-full rounded-2xl\" />\n <Skeleton className=\"h-64 w-full rounded-2xl\" />\n </div>\n ) : !collection ? (\n <div className=\"max-w-xl mx-auto px-4 pt-24 pb-8 text-center space-y-4\">\n <AlertCircle className=\"h-10 w-10 text-muted-foreground/20 mx-auto\" />\n <p className=\"text-muted-foreground\">Collection not found.</p>\n <Button asChild variant=\"outline\" size=\"sm\">\n <Link href=\"/launchpad/pop\">← Back</Link>\n </Button>\n </div>\n ) : !isOwner ? (\n <div className=\"max-w-xl mx-auto px-4 pt-24 pb-8 text-center space-y-4\">\n <Award className=\"h-10 w-10 text-muted-foreground/20 mx-auto\" />\n <p className=\"text-muted-foreground\">You are not the organizer of this event.</p>\n <Button asChild variant=\"outline\" size=\"sm\">\n <Link href=\"/launchpad/pop\">← Back to events</Link>\n </Button>\n </div>\n ) : (\n <div className=\"max-w-xl mx-auto px-4 pt-10 pb-16 space-y-6\">\n <TransactionDialog tx={tx} title=\"Manage event\" workingLabel=\"Updating your event…\" firstStepLabel=\"Prepare\">\n <TransactionDone tx={tx} name={collection.name ?? \"Event\"} title={done.title} description={done.description} />\n </TransactionDialog>\n\n <FadeIn>\n <Button asChild variant=\"ghost\" size=\"sm\" className=\"-ml-2\">\n <Link href=\"/launchpad/pop\">\n <ArrowLeft className=\"h-3.5 w-3.5 mr-1.5\" />\n All events\n </Link>\n </Button>\n </FadeIn>\n\n <FadeIn delay={0.04}>\n <div>\n <span className=\"pill-badge inline-flex gap-1.5 mb-2\">\n <Award className=\"h-3 w-3\" />\n Organizer\n </span>\n <h1 className=\"text-2xl font-bold mt-1\">Manage Event</h1>\n <p className=\"text-sm text-muted-foreground\">{collection.name ?? contract}</p>\n </div>\n </FadeIn>\n\n <FadeIn delay={0.08}>\n <div className=\"bento-cell p-4 flex items-center gap-3\">\n <Award className=\"h-4 w-4 text-green-500 shrink-0\" />\n <p className=\"text-xs text-muted-foreground\">\n Only participants on your <strong className=\"text-foreground\">published list</strong> can claim,\n with the link you send them.\n </p>\n </div>\n </FadeIn>\n\n <FadeIn delay={0.12}>\n <AllowlistSection onPublish={publish} isSubmitting={isSubmitting} links={links} />\n </FadeIn>\n\n <FadeIn delay={0.16}>\n <IssueSection onIssue={issue} isSubmitting={isSubmitting} />\n </FadeIn>\n </div>\n )}\n </WalletRequired>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CM;AA5CN,mBAAyB;AACzB,iBAAiC;AACjC,sBAAsF;AACtF,0BAA4F;AAC5F,oBAAuB;AACvB,kBAAiB;AACjB,2BAAgC;AAChC,+BAAuB;AACvB,sBAAyB;AACzB,sBAAyB;AACzB,gCAAkC;AAClC,8BAAgC;AAChC,6BAA+B;AAC/B,8BAA+B;AAC/B,6BAA8B;AAC9B,6BAA+B;AAE/B,SAAS,eAAe,KAAuB;AAC7C,SAAO,IACJ,MAAM,UAAU,EAChB,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EACnB,OAAO,CAAC,MAAM,mBAAmB,KAAK,CAAC,CAAC;AAC7C;AAEA,SAAS,YAAY,OAAuB;AAC1C,QAAM,OAAO,IAAI,gBAAgB,IAAI,KAAK,KAAC,kCAAiB,KAAK,CAAC,GAAG,EAAE,MAAM,WAAW,CAAC,CAAC;AAC1F,QAAM,SAAS,OAAO,OAAO,SAAS,cAAc,GAAG,GAAG,EAAE,MAAM,UAAU,kBAAkB,CAAC;AAC/F,SAAO,MAAM;AACb,MAAI,gBAAgB,IAAI;AAC1B;AAEA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA;AACF,GAGG;AACD,QAAM,CAAC,KAAK,MAAM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,mCAAkC;AAAA,MACnD,6CAAC,OAAE,WAAU,iCAAgC;AAAA;AAAA,QACjB,4CAAC,YAAO,WAAU,mBAAkB,4BAAc;AAAA,QAAS;AAAA,SAEvF;AAAA,OACF,GACF;AAAA,IAEA,4CAAC,mCAAO,OAAO,MACb,sDAAC,oBAAiB,WAAW,SAAS,cAA4B,OAAc,GAClF;AAAA,IAEA,4CAAC,mCAAO,OAAO,MACb,sDAAC,gBAAa,SAAS,OAAO,cAA4B,GAC5D;AAAA,KACF,GAEJ;AAEJ;","names":["Link"]}
1
+ {"version":3,"sources":["../../src/components/pop-manage-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { buildPopAllowlist, popClaimLinks, popClaimLinksCsv, type PopClaimLink } from \"@medialane/sdk/starknet\";\nimport { ArrowLeft, Award, AlertCircle, CheckCircle2, Download, Loader2, Send, Users } from \"lucide-react\";\nimport { Button } from \"./button.js\";\nimport Link from \"./link.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { FadeIn } from \"./motion-primitives.js\";\nimport { Skeleton } from \"./skeleton.js\";\nimport { Textarea } from \"./textarea.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionSuccess } from \"./transaction-success.js\";\nimport { WalletRequired } from \"./wallet-required.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useCollection } from \"../utils/use-collections.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nfunction parseAddresses(raw: string): string[] {\n return raw\n .split(/[\\n,\\s]+/)\n .map((a) => a.trim())\n .filter((a) => /^0x[0-9a-fA-F]+$/.test(a));\n}\n\nfunction downloadCsv(links: PopClaimLink[]) {\n const href = URL.createObjectURL(new Blob([popClaimLinksCsv(links)], { type: \"text/csv\" }));\n const anchor = Object.assign(document.createElement(\"a\"), { href, download: \"claim-links.csv\" });\n anchor.click();\n URL.revokeObjectURL(href);\n}\n\nfunction IssueSection({\n onIssue,\n isSubmitting,\n}: {\n onIssue: (address: string) => void;\n isSubmitting: boolean;\n}) {\n const [raw, setRaw] = useState(\"\");\n const address = raw.trim();\n const valid = /^0x[0-9a-fA-F]{1,64}$/.test(address);\n\n return (\n <div className=\"bento-cell p-5 space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Award className=\"h-4 w-4 text-green-500\" />\n <span className=\"font-semibold text-sm\">Issue directly</span>\n </div>\n <p className=\"text-xs text-muted-foreground\">\n Send the credential straight to one wallet — for a late participant, without republishing the list or\n changing anyone&apos;s claim link.\n </p>\n <input\n type=\"text\"\n placeholder=\"0x...\"\n value={raw}\n onChange={(e) => setRaw(e.target.value)}\n className=\"w-full rounded-lg border border-border bg-background px-3 py-2 text-sm tabular-nums placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring\"\n />\n <Button\n size=\"sm\"\n variant=\"outline\"\n className=\"w-full\"\n disabled={!valid || isSubmitting}\n onClick={() => {\n onIssue(address);\n setRaw(\"\");\n }}\n >\n <Send className=\"h-3.5 w-3.5 mr-1.5\" />\n Issue credential\n </Button>\n </div>\n );\n}\n\nfunction AllowlistSection({\n onPublish,\n isSubmitting,\n links,\n}: {\n onPublish: (addresses: string[]) => void;\n isSubmitting: boolean;\n links: PopClaimLink[] | null;\n}) {\n const [raw, setRaw] = useState(\"\");\n const parsed = parseAddresses(raw);\n\n return (\n <div className=\"bento-cell p-5 space-y-3\">\n <div className=\"flex items-center gap-2\">\n <Users className=\"h-4 w-4 text-green-500\" />\n <span className=\"font-semibold text-sm\">Participants</span>\n {parsed.length > 0 && (\n <span className=\"ml-auto text-xs text-muted-foreground\">\n {parsed.length} address{parsed.length !== 1 ? \"es\" : \"\"}\n </span>\n )}\n </div>\n <p className=\"text-xs text-muted-foreground\">\n Paste every participant&apos;s wallet address. Publishing replaces the previous list and every link\n sent before it — send the new links to everyone who hasn&apos;t claimed yet. The list stays in this\n browser: download the claim links and send each participant theirs.\n </p>\n <Textarea\n placeholder={\"Paste Starknet addresses, one per line:\\n0x04a...\\n0x06b...\"}\n rows={8}\n value={raw}\n onChange={(e) => setRaw(e.target.value)}\n className=\"tabular-nums text-xs resize-none\"\n />\n <Button\n size=\"sm\"\n className=\"w-full bg-green-600 hover:bg-green-700 text-white\"\n disabled={parsed.length === 0 || isSubmitting}\n onClick={() => onPublish(parsed)}\n >\n {isSubmitting ? (\n <>\n <Loader2 className=\"h-3.5 w-3.5 animate-spin mr-1.5\" />\n Publishing…\n </>\n ) : (\n <>\n <CheckCircle2 className=\"h-3.5 w-3.5 mr-1.5\" />\n Publish {parsed.length > 0 ? `${parsed.length} participant${parsed.length !== 1 ? \"s\" : \"\"}` : \"participants\"}\n </>\n )}\n </Button>\n {links && (\n <div className=\"space-y-2 pt-2\">\n <Button variant=\"outline\" size=\"sm\" className=\"w-full\" onClick={() => downloadCsv(links)}>\n <Download className=\"h-3.5 w-3.5 mr-1.5\" />\n Download claim links (CSV)\n </Button>\n <ul className=\"max-h-48 overflow-auto text-xs tabular-nums space-y-1 text-muted-foreground\">\n {links.map((link) => (\n <li key={link.address} className=\"truncate\">{link.address}</li>\n ))}\n </ul>\n </div>\n )}\n </div>\n );\n}\n\nexport function PopManagePage({ contract }: { contract: string }) {\n const app = useMedialaneApp();\n const walletAddress = app.walletAddress;\n const { collection, isLoading } = useCollection(contract);\n const tx = useTransaction();\n const [done, setDone] = useState({ title: \"\", description: \"\" });\n const [links, setLinks] = useState<PopClaimLink[] | null>(null);\n const isSubmitting = tx.phase === \"preparing\" || tx.phase === \"submitting\" || tx.phase === \"confirming\";\n\n const isOwner =\n walletAddress &&\n collection?.owner &&\n normalizeAddress(\"STARKNET\", walletAddress) === normalizeAddress(\"STARKNET\", collection.owner);\n\n const issue = (recipient: string) => {\n setDone({ title: \"Credential issued\", description: \"The credential is now in their wallet.\" });\n void tx.run(async (signer) => {\n await runIntentCalls(signer, () => app.getClient().api.intents.create(\"pop-manage\", { owner: signer.address, collection: contract, action: \"issue\", recipient }));\n });\n };\n\n const publish = (addresses: string[]) => {\n const list = buildPopAllowlist(addresses);\n const count = Object.keys(list.proofs).length;\n setDone({ title: \"Participants published\", description: `Published ${count} participant${count !== 1 ? \"s\" : \"\"}.` });\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () => app.getClient().api.intents.create(\"pop-manage\", { owner: signer.address, collection: contract, action: \"set_allowlist_root\", root: list.root }));\n })\n .then((ok) => {\n if (ok) setLinks(popClaimLinks(window.location.origin, contract, list));\n });\n };\n\n return (\n <WalletRequired icon={Award} title=\"Connect your wallet\" description=\"Connect to manage your event.\">\n {isLoading ? (\n <div className=\"max-w-xl mx-auto px-4 pt-10 pb-16 space-y-4\">\n <Skeleton className=\"h-6 w-24\" />\n <Skeleton className=\"h-32 w-full rounded-2xl\" />\n <Skeleton className=\"h-64 w-full rounded-2xl\" />\n </div>\n ) : !collection ? (\n <div className=\"max-w-xl mx-auto px-4 pt-24 pb-8 text-center space-y-4\">\n <AlertCircle className=\"h-10 w-10 text-muted-foreground/20 mx-auto\" />\n <p className=\"text-muted-foreground\">Collection not found.</p>\n <Button asChild variant=\"outline\" size=\"sm\">\n <Link href=\"/launchpad/pop\">← Back</Link>\n </Button>\n </div>\n ) : !isOwner ? (\n <div className=\"max-w-xl mx-auto px-4 pt-24 pb-8 text-center space-y-4\">\n <Award className=\"h-10 w-10 text-muted-foreground/20 mx-auto\" />\n <p className=\"text-muted-foreground\">You are not the organizer of this event.</p>\n <Button asChild variant=\"outline\" size=\"sm\">\n <Link href=\"/launchpad/pop\">← Back to events</Link>\n </Button>\n </div>\n ) : (\n <div className=\"max-w-xl mx-auto px-4 pt-10 pb-16 space-y-6\">\n <TransactionDialog tx={tx} title=\"Manage event\" workingLabel=\"Updating your event…\" firstStepLabel=\"Prepare\">\n <TransactionSuccess name={collection.name ?? \"Event\"} title={done.title} description={done.description} txHash={tx.txHash} actions={[{ label: \"Done\", onClick: tx.reset }]} />\n </TransactionDialog>\n\n <FadeIn>\n <Button asChild variant=\"ghost\" size=\"sm\" className=\"-ml-2\">\n <Link href=\"/launchpad/pop\">\n <ArrowLeft className=\"h-3.5 w-3.5 mr-1.5\" />\n All events\n </Link>\n </Button>\n </FadeIn>\n\n <FadeIn delay={0.04}>\n <div>\n <span className=\"pill-badge inline-flex gap-1.5 mb-2\">\n <Award className=\"h-3 w-3\" />\n Organizer\n </span>\n <h1 className=\"text-2xl font-bold mt-1\">Manage Event</h1>\n <p className=\"text-sm text-muted-foreground\">{collection.name ?? contract}</p>\n </div>\n </FadeIn>\n\n <FadeIn delay={0.08}>\n <div className=\"bento-cell p-4 flex items-center gap-3\">\n <Award className=\"h-4 w-4 text-green-500 shrink-0\" />\n <p className=\"text-xs text-muted-foreground\">\n Only participants on your <strong className=\"text-foreground\">published list</strong> can claim,\n with the link you send them.\n </p>\n </div>\n </FadeIn>\n\n <FadeIn delay={0.12}>\n <AllowlistSection onPublish={publish} isSubmitting={isSubmitting} links={links} />\n </FadeIn>\n\n <FadeIn delay={0.16}>\n <IssueSection onIssue={issue} isSubmitting={isSubmitting} />\n </FadeIn>\n </div>\n )}\n </WalletRequired>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8CM;AA5CN,mBAAyB;AACzB,iBAAiC;AACjC,sBAAsF;AACtF,0BAA4F;AAC5F,oBAAuB;AACvB,kBAAiB;AACjB,2BAAgC;AAChC,+BAAuB;AACvB,sBAAyB;AACzB,sBAAyB;AACzB,gCAAkC;AAClC,iCAAmC;AACnC,6BAA+B;AAC/B,8BAA+B;AAC/B,6BAA8B;AAC9B,6BAA+B;AAE/B,SAAS,eAAe,KAAuB;AAC7C,SAAO,IACJ,MAAM,UAAU,EAChB,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,EACnB,OAAO,CAAC,MAAM,mBAAmB,KAAK,CAAC,CAAC;AAC7C;AAEA,SAAS,YAAY,OAAuB;AAC1C,QAAM,OAAO,IAAI,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