@medialane/ui 0.245.0 → 0.247.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/asset-comments-dialog.cjs +2 -2
- package/dist/components/asset-comments-dialog.cjs.map +1 -1
- package/dist/components/asset-comments-dialog.d.cts +3 -9
- package/dist/components/asset-comments-dialog.d.ts +3 -9
- package/dist/components/asset-comments-dialog.js +2 -2
- package/dist/components/asset-comments-dialog.js.map +1 -1
- package/dist/components/asset-page.cjs +6 -7
- package/dist/components/asset-page.cjs.map +1 -1
- package/dist/components/asset-page.d.cts +4 -13
- package/dist/components/asset-page.d.ts +4 -13
- package/dist/components/asset-page.js +6 -7
- package/dist/components/asset-page.js.map +1 -1
- package/dist/components/collection-page.cjs +3 -2
- package/dist/components/collection-page.cjs.map +1 -1
- package/dist/components/collection-page.d.cts +0 -5
- package/dist/components/collection-page.d.ts +0 -5
- package/dist/components/collection-page.js +3 -2
- package/dist/components/collection-page.js.map +1 -1
- package/dist/components/comments-section.cjs +304 -0
- package/dist/components/comments-section.cjs.map +1 -0
- package/dist/components/comments-section.d.cts +10 -0
- package/dist/components/comments-section.d.ts +10 -0
- package/dist/components/comments-section.js +270 -0
- package/dist/components/comments-section.js.map +1 -0
- package/dist/components/medialane-app.cjs.map +1 -1
- package/dist/components/medialane-app.d.cts +3 -0
- package/dist/components/medialane-app.d.ts +3 -0
- package/dist/components/medialane-app.js.map +1 -1
- package/dist/components/pop-burn-button.cjs +65 -0
- package/dist/components/pop-burn-button.cjs.map +1 -0
- package/dist/components/pop-burn-button.d.cts +10 -0
- package/dist/components/pop-burn-button.d.ts +10 -0
- package/dist/components/pop-burn-button.js +41 -0
- package/dist/components/pop-burn-button.js.map +1 -0
- package/dist/components/pop-claim-button.cjs +92 -0
- package/dist/components/pop-claim-button.cjs.map +1 -0
- package/dist/components/pop-claim-button.d.cts +7 -0
- package/dist/components/pop-claim-button.d.ts +7 -0
- package/dist/components/pop-claim-button.js +68 -0
- package/dist/components/pop-claim-button.js.map +1 -0
- package/dist/components/pop-manage-page.cjs +224 -0
- package/dist/components/pop-manage-page.cjs.map +1 -0
- package/dist/components/pop-manage-page.d.cts +7 -0
- package/dist/components/pop-manage-page.d.ts +7 -0
- package/dist/components/pop-manage-page.js +190 -0
- package/dist/components/pop-manage-page.js.map +1 -0
- package/dist/components/portfolio-sponsorships.cjs +209 -0
- package/dist/components/portfolio-sponsorships.cjs.map +1 -0
- package/dist/components/portfolio-sponsorships.d.cts +5 -0
- package/dist/components/portfolio-sponsorships.d.ts +5 -0
- package/dist/components/portfolio-sponsorships.js +175 -0
- package/dist/components/portfolio-sponsorships.js.map +1 -0
- package/dist/components/sponsorship-offer-page.cjs +181 -0
- package/dist/components/sponsorship-offer-page.cjs.map +1 -0
- package/dist/components/sponsorship-offer-page.d.cts +7 -0
- package/dist/components/sponsorship-offer-page.d.ts +7 -0
- package/dist/components/sponsorship-offer-page.js +147 -0
- package/dist/components/sponsorship-offer-page.js.map +1 -0
- package/dist/components/sponsorship-offers-page.cjs +118 -0
- package/dist/components/sponsorship-offers-page.cjs.map +1 -0
- package/dist/components/sponsorship-offers-page.d.cts +5 -0
- package/dist/components/sponsorship-offers-page.d.ts +5 -0
- package/dist/components/sponsorship-offers-page.js +84 -0
- package/dist/components/sponsorship-offers-page.js.map +1 -0
- package/dist/components/transaction-done.cjs +46 -0
- package/dist/components/transaction-done.cjs.map +1 -0
- package/dist/components/transaction-done.d.cts +18 -0
- package/dist/components/transaction-done.d.ts +18 -0
- package/dist/components/transaction-done.js +22 -0
- package/dist/components/transaction-done.js.map +1 -0
- package/dist/components/transfer-collection-ownership.cjs +137 -0
- package/dist/components/transfer-collection-ownership.cjs.map +1 -0
- package/dist/components/transfer-collection-ownership.d.cts +11 -0
- package/dist/components/transfer-collection-ownership.d.ts +11 -0
- package/dist/components/transfer-collection-ownership.js +113 -0
- package/dist/components/transfer-collection-ownership.js.map +1 -0
- package/dist/index.cjs +27 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/use-transaction.cjs +2 -0
- package/dist/utils/use-transaction.cjs.map +1 -1
- package/dist/utils/use-transaction.d.cts +1 -1
- package/dist/utils/use-transaction.d.ts +1 -1
- package/dist/utils/use-transaction.js +2 -0
- package/dist/utils/use-transaction.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ArrowRight, Check, Handshake } from "lucide-react";
|
|
4
|
+
import { formatAmount, getTokenByAddress } from "@medialane/sdk";
|
|
5
|
+
import { AssetCard, AssetCardSkeleton } from "./asset-card.js";
|
|
6
|
+
import { BackButton } from "./back-button.js";
|
|
7
|
+
import { Button } from "./button.js";
|
|
8
|
+
import Link from "./link.js";
|
|
9
|
+
import { FadeIn, Stagger, StaggerItem } from "./motion-primitives.js";
|
|
10
|
+
import { ServiceHeader } from "./service-header.js";
|
|
11
|
+
import { shortenAddress } from "../utils/address.js";
|
|
12
|
+
import { useSponsorshipOffers } from "../utils/use-sponsorship.js";
|
|
13
|
+
import { useToken } from "../utils/use-tokens.js";
|
|
14
|
+
const FEATURES = [
|
|
15
|
+
"No escrow \u2014 direct settlement",
|
|
16
|
+
"Owner-verified on-chain",
|
|
17
|
+
"Open bidding or one invited sponsor"
|
|
18
|
+
];
|
|
19
|
+
function OfferCard({ offer }) {
|
|
20
|
+
const { token } = useToken(offer.nftContract, offer.tokenId);
|
|
21
|
+
const paymentToken = getTokenByAddress(offer.paymentToken);
|
|
22
|
+
const min = paymentToken ? `Min ${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : `Min ${offer.minAmount}`;
|
|
23
|
+
const days = Math.round(Number(offer.duration) / 86400);
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
AssetCard,
|
|
26
|
+
{
|
|
27
|
+
href: `/launchpad/sponsorship/${offer.offerId}`,
|
|
28
|
+
name: token?.metadata?.name ?? `Token #${offer.tokenId}`,
|
|
29
|
+
image: token?.metadata?.image ?? null,
|
|
30
|
+
subtitle: shortenAddress(offer.nftContract),
|
|
31
|
+
fallbackId: offer.tokenId,
|
|
32
|
+
price: { formatted: `${min} \xB7 ${days}d`, currency: null }
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function SponsorshipOffersPage() {
|
|
37
|
+
const { offers, isLoading } = useSponsorshipOffers();
|
|
38
|
+
const openOffers = offers.filter((o) => o.open);
|
|
39
|
+
return /* @__PURE__ */ jsxs("div", { className: "pb-16 space-y-10", children: [
|
|
40
|
+
/* @__PURE__ */ jsxs("section", { className: "px-4 pt-10 max-w-5xl mx-auto", children: [
|
|
41
|
+
/* @__PURE__ */ jsx(BackButton, {}),
|
|
42
|
+
/* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsx("div", { className: "mt-6", children: /* @__PURE__ */ jsx(
|
|
43
|
+
ServiceHeader,
|
|
44
|
+
{
|
|
45
|
+
plain: true,
|
|
46
|
+
icon: /* @__PURE__ */ jsx(Handshake, { className: "h-4 w-4 text-white" }),
|
|
47
|
+
title: "IP Sponsorship",
|
|
48
|
+
subtitle: "Sponsorship offers anchored to your IP assets \u2014 a sponsor bids, you accept, they receive a license."
|
|
49
|
+
}
|
|
50
|
+
) }) })
|
|
51
|
+
] }),
|
|
52
|
+
/* @__PURE__ */ jsx("section", { className: "px-4 max-w-5xl mx-auto", children: /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2", children: FEATURES.map((f) => /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-muted/40 border border-border/30 text-xs font-medium text-muted-foreground", children: [
|
|
53
|
+
/* @__PURE__ */ jsx(Check, { className: "h-3 w-3 text-brand-rose shrink-0" }),
|
|
54
|
+
f
|
|
55
|
+
] }, f)) }) }) }),
|
|
56
|
+
/* @__PURE__ */ jsx("section", { className: "px-4 max-w-5xl mx-auto", children: /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("div", { className: "rounded-2xl border border-brand-rose/20 bg-brand-rose/5 p-5 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between", children: [
|
|
57
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
|
|
58
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: "Start a sponsorship deal" }),
|
|
59
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Offer one of your assets for sponsors to bid on, or propose terms directly on one you'd like to sponsor." })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ jsx(Button, { asChild: true, size: "sm", className: "shrink-0 bg-brand-rose hover:brightness-110 text-white gap-1.5", children: /* @__PURE__ */ jsxs(Link, { href: "/launchpad/sponsorship/create", children: [
|
|
62
|
+
"Get started",
|
|
63
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })
|
|
64
|
+
] }) })
|
|
65
|
+
] }) }) }),
|
|
66
|
+
/* @__PURE__ */ jsxs("section", { className: "px-4 space-y-4 max-w-5xl mx-auto", children: [
|
|
67
|
+
/* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("div", { children: [
|
|
68
|
+
/* @__PURE__ */ jsx("p", { className: "section-label", children: "Open" }),
|
|
69
|
+
/* @__PURE__ */ jsx("h2", { className: "text-xl font-bold mt-0.5", children: "Sponsorship offers" })
|
|
70
|
+
] }) }),
|
|
71
|
+
isLoading ? /* @__PURE__ */ jsx("div", { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4", children: Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsx(AssetCardSkeleton, {}, i)) }) : openOffers.length === 0 ? /* @__PURE__ */ jsx(FadeIn, { children: /* @__PURE__ */ jsxs("div", { className: "bento-cell border-dashed p-12 text-center space-y-4", children: [
|
|
72
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx("div", { className: "h-16 w-16 rounded-2xl bg-brand-rose/8 flex items-center justify-center", children: /* @__PURE__ */ jsx(Handshake, { className: "h-8 w-8 text-brand-rose/30" }) }) }),
|
|
73
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1", children: [
|
|
74
|
+
/* @__PURE__ */ jsx("p", { className: "font-semibold text-sm", children: "No open sponsorship offers yet" }),
|
|
75
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Creators open offers from their asset pages \u2014 sponsors bid on them here." })
|
|
76
|
+
] })
|
|
77
|
+
] }) }) : /* @__PURE__ */ jsx(Stagger, { className: "grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4", children: openOffers.map((offer) => /* @__PURE__ */ jsx(StaggerItem, { children: /* @__PURE__ */ jsx(OfferCard, { offer }) }, offer.id)) })
|
|
78
|
+
] })
|
|
79
|
+
] });
|
|
80
|
+
}
|
|
81
|
+
export {
|
|
82
|
+
SponsorshipOffersPage
|
|
83
|
+
};
|
|
84
|
+
//# sourceMappingURL=sponsorship-offers-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/sponsorship-offers-page.tsx"],"sourcesContent":["\"use client\";\n\nimport { ArrowRight, Check, Handshake } from \"lucide-react\";\nimport { formatAmount, getTokenByAddress, type ApiSponsorshipOffer } from \"@medialane/sdk\";\nimport { AssetCard, AssetCardSkeleton } from \"./asset-card.js\";\nimport { BackButton } from \"./back-button.js\";\nimport { Button } from \"./button.js\";\nimport Link from \"./link.js\";\nimport { FadeIn, Stagger, StaggerItem } from \"./motion-primitives.js\";\nimport { ServiceHeader } from \"./service-header.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { useSponsorshipOffers } from \"../utils/use-sponsorship.js\";\nimport { useToken } from \"../utils/use-tokens.js\";\n\nconst FEATURES = [\n \"No escrow — direct settlement\",\n \"Owner-verified on-chain\",\n \"Open bidding or one invited sponsor\",\n];\n\nfunction OfferCard({ offer }: { offer: ApiSponsorshipOffer }) {\n const { token } = useToken(offer.nftContract, offer.tokenId);\n const paymentToken = getTokenByAddress(offer.paymentToken);\n const min = paymentToken ? `Min ${formatAmount(offer.minAmount, paymentToken.decimals)} ${paymentToken.symbol}` : `Min ${offer.minAmount}`;\n const days = Math.round(Number(offer.duration) / 86400);\n\n return (\n <AssetCard\n href={`/launchpad/sponsorship/${offer.offerId}`}\n name={token?.metadata?.name ?? `Token #${offer.tokenId}`}\n image={token?.metadata?.image ?? null}\n subtitle={shortenAddress(offer.nftContract)}\n fallbackId={offer.tokenId}\n price={{ formatted: `${min} · ${days}d`, currency: null }}\n />\n );\n}\n\nexport function SponsorshipOffersPage() {\n const { offers, isLoading } = useSponsorshipOffers();\n const openOffers = offers.filter((o) => o.open);\n\n return (\n <div className=\"pb-16 space-y-10\">\n <section className=\"px-4 pt-10 max-w-5xl mx-auto\">\n <BackButton />\n <FadeIn>\n <div className=\"mt-6\">\n <ServiceHeader\n plain\n icon={<Handshake className=\"h-4 w-4 text-white\" />}\n title=\"IP Sponsorship\"\n subtitle=\"Sponsorship offers anchored to your IP assets — a sponsor bids, you accept, they receive a license.\"\n />\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"flex flex-wrap gap-2\">\n {FEATURES.map((f) => (\n <span key={f} className=\"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-muted/40 border border-border/30 text-xs font-medium text-muted-foreground\">\n <Check className=\"h-3 w-3 text-brand-rose shrink-0\" />\n {f}\n </span>\n ))}\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div className=\"rounded-2xl border border-brand-rose/20 bg-brand-rose/5 p-5 flex flex-col sm:flex-row gap-4 items-start sm:items-center justify-between\">\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-semibold\">Start a sponsorship deal</p>\n <p className=\"text-xs text-muted-foreground\">\n Offer one of your assets for sponsors to bid on, or propose terms directly on one you'd like to sponsor.\n </p>\n </div>\n <Button asChild size=\"sm\" className=\"shrink-0 bg-brand-rose hover:brightness-110 text-white gap-1.5\">\n <Link href=\"/launchpad/sponsorship/create\">\n Get started\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </Link>\n </Button>\n </div>\n </FadeIn>\n </section>\n\n <section className=\"px-4 space-y-4 max-w-5xl mx-auto\">\n <FadeIn>\n <div>\n <p className=\"section-label\">Open</p>\n <h2 className=\"text-xl font-bold mt-0.5\">Sponsorship offers</h2>\n </div>\n </FadeIn>\n\n {isLoading ? (\n <div className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {Array.from({ length: 8 }).map((_, i) => <AssetCardSkeleton key={i} />)}\n </div>\n ) : openOffers.length === 0 ? (\n <FadeIn>\n <div className=\"bento-cell border-dashed p-12 text-center space-y-4\">\n <div className=\"flex justify-center\">\n <div className=\"h-16 w-16 rounded-2xl bg-brand-rose/8 flex items-center justify-center\">\n <Handshake className=\"h-8 w-8 text-brand-rose/30\" />\n </div>\n </div>\n <div className=\"space-y-1\">\n <p className=\"font-semibold text-sm\">No open sponsorship offers yet</p>\n <p className=\"text-xs text-muted-foreground\">Creators open offers from their asset pages — sponsors bid on them here.</p>\n </div>\n </div>\n </FadeIn>\n ) : (\n <Stagger className=\"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-4\">\n {openOffers.map((offer) => (\n <StaggerItem key={offer.id}>\n <OfferCard offer={offer} />\n </StaggerItem>\n ))}\n </Stagger>\n )}\n </section>\n </div>\n );\n}\n"],"mappings":";AA2BI,cAiBE,YAjBF;AAzBJ,SAAS,YAAY,OAAO,iBAAiB;AAC7C,SAAS,cAAc,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UACnE,oBAAC,OAAE,WAAU,iCAAgC,2FAAwE;AAAA,WACvH;AAAA,SACF,GACF,IAEA,oBAAC,WAAQ,WAAU,wDAChB,qBAAW,IAAI,CAAC,UACf,oBAAC,eACC,8BAAC,aAAU,OAAc,KADT,MAAM,EAExB,CACD,GACH;AAAA,OAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var transaction_done_exports = {};
|
|
21
|
+
__export(transaction_done_exports, {
|
|
22
|
+
TransactionDone: () => TransactionDone
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(transaction_done_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_marketplace_dialog_primitives = require("./marketplace-dialog-primitives.js");
|
|
27
|
+
var import_explorer_url = require("../utils/explorer-url.js");
|
|
28
|
+
function TransactionDone({ tx, name, title, description, footer }) {
|
|
29
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
30
|
+
import_marketplace_dialog_primitives.MarketplaceSuccessState,
|
|
31
|
+
{
|
|
32
|
+
name,
|
|
33
|
+
title,
|
|
34
|
+
description,
|
|
35
|
+
txHash: tx.txHash,
|
|
36
|
+
explorerUrl: import_explorer_url.EXPLORER_URL,
|
|
37
|
+
footer,
|
|
38
|
+
onDone: tx.reset
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
+
0 && (module.exports = {
|
|
44
|
+
TransactionDone
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=transaction-done.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/transaction-done.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { MarketplaceSuccessState } from \"./marketplace-dialog-primitives.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\nimport type { useTransaction } from \"../utils/use-transaction.js\";\n\nexport interface TransactionDoneProps {\n tx: Pick<ReturnType<typeof useTransaction>, \"txHash\" | \"reset\">;\n name: string;\n title: string;\n description: ReactNode;\n footer?: ReactNode;\n}\n\nexport function TransactionDone({ tx, name, title, description, footer }: TransactionDoneProps) {\n return (\n <MarketplaceSuccessState\n name={name}\n title={title}\n description={description}\n txHash={tx.txHash}\n explorerUrl={EXPLORER_URL}\n footer={footer}\n onDone={tx.reset}\n />\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBI;AAdJ,2CAAwC;AACxC,0BAA6B;AAWtB,SAAS,gBAAgB,EAAE,IAAI,MAAM,OAAO,aAAa,OAAO,GAAyB;AAC9F,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ,GAAG;AAAA,MACX,aAAa;AAAA,MACb;AAAA,MACA,QAAQ,GAAG;AAAA;AAAA,EACb;AAEJ;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { useTransaction } from '../utils/use-transaction.cjs';
|
|
4
|
+
import '@medialane/sdk/starknet';
|
|
5
|
+
import './fast-mint/types.cjs';
|
|
6
|
+
import 'starknet';
|
|
7
|
+
import '@medialane/sdk';
|
|
8
|
+
|
|
9
|
+
interface TransactionDoneProps {
|
|
10
|
+
tx: Pick<ReturnType<typeof useTransaction>, "txHash" | "reset">;
|
|
11
|
+
name: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description: ReactNode;
|
|
14
|
+
footer?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare function TransactionDone({ tx, name, title, description, footer }: TransactionDoneProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
export { TransactionDone, type TransactionDoneProps };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { useTransaction } from '../utils/use-transaction.js';
|
|
4
|
+
import '@medialane/sdk/starknet';
|
|
5
|
+
import './fast-mint/types.js';
|
|
6
|
+
import 'starknet';
|
|
7
|
+
import '@medialane/sdk';
|
|
8
|
+
|
|
9
|
+
interface TransactionDoneProps {
|
|
10
|
+
tx: Pick<ReturnType<typeof useTransaction>, "txHash" | "reset">;
|
|
11
|
+
name: string;
|
|
12
|
+
title: string;
|
|
13
|
+
description: ReactNode;
|
|
14
|
+
footer?: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
declare function TransactionDone({ tx, name, title, description, footer }: TransactionDoneProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
export { TransactionDone, type TransactionDoneProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { MarketplaceSuccessState } from "./marketplace-dialog-primitives.js";
|
|
4
|
+
import { EXPLORER_URL } from "../utils/explorer-url.js";
|
|
5
|
+
function TransactionDone({ tx, name, title, description, footer }) {
|
|
6
|
+
return /* @__PURE__ */ jsx(
|
|
7
|
+
MarketplaceSuccessState,
|
|
8
|
+
{
|
|
9
|
+
name,
|
|
10
|
+
title,
|
|
11
|
+
description,
|
|
12
|
+
txHash: tx.txHash,
|
|
13
|
+
explorerUrl: EXPLORER_URL,
|
|
14
|
+
footer,
|
|
15
|
+
onDone: tx.reset
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
TransactionDone
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=transaction-done.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/transaction-done.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { MarketplaceSuccessState } from \"./marketplace-dialog-primitives.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\nimport type { useTransaction } from \"../utils/use-transaction.js\";\n\nexport interface TransactionDoneProps {\n tx: Pick<ReturnType<typeof useTransaction>, \"txHash\" | \"reset\">;\n name: string;\n title: string;\n description: ReactNode;\n footer?: ReactNode;\n}\n\nexport function TransactionDone({ tx, name, title, description, footer }: TransactionDoneProps) {\n return (\n <MarketplaceSuccessState\n name={name}\n title={title}\n description={description}\n txHash={tx.txHash}\n explorerUrl={EXPLORER_URL}\n footer={footer}\n onDone={tx.reset}\n />\n );\n}\n"],"mappings":";AAiBI;AAdJ,SAAS,+BAA+B;AACxC,SAAS,oBAAoB;AAWtB,SAAS,gBAAgB,EAAE,IAAI,MAAM,OAAO,aAAa,OAAO,GAAyB;AAC9F,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA,QAAQ,GAAG;AAAA,MACX,aAAa;AAAA,MACb;AAAA,MACA,QAAQ,GAAG;AAAA;AAAA,EACb;AAEJ;","names":[]}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
var transfer_collection_ownership_exports = {};
|
|
21
|
+
__export(transfer_collection_ownership_exports, {
|
|
22
|
+
TransferCollectionOwnership: () => TransferCollectionOwnership
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(transfer_collection_ownership_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_react = require("react");
|
|
27
|
+
var import_lucide_react = require("lucide-react");
|
|
28
|
+
var import_sdk = require("@medialane/sdk");
|
|
29
|
+
var import_button = require("./button.js");
|
|
30
|
+
var import_dialog = require("./dialog.js");
|
|
31
|
+
var import_input = require("./input.js");
|
|
32
|
+
var import_label = require("./label.js");
|
|
33
|
+
var import_marketplace_dialog_primitives = require("./marketplace-dialog-primitives.js");
|
|
34
|
+
var import_medialane_app = require("./medialane-app.js");
|
|
35
|
+
var import_transaction_dialog = require("./transaction-dialog.js");
|
|
36
|
+
var import_transaction_done = require("./transaction-done.js");
|
|
37
|
+
var import_address = require("../utils/address.js");
|
|
38
|
+
var import_run_intent_calls = require("../utils/run-intent-calls.js");
|
|
39
|
+
var import_use_transaction = require("../utils/use-transaction.js");
|
|
40
|
+
function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }) {
|
|
41
|
+
const app = (0, import_medialane_app.useMedialaneApp)();
|
|
42
|
+
const tx = (0, import_use_transaction.useTransaction)();
|
|
43
|
+
const [open, setOpen] = (0, import_react.useState)(false);
|
|
44
|
+
const [confirming, setConfirming] = (0, import_react.useState)(false);
|
|
45
|
+
const [newOwner, setNewOwner] = (0, import_react.useState)("");
|
|
46
|
+
const trimmed = newOwner.trim();
|
|
47
|
+
const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);
|
|
48
|
+
const wouldNoop = isValid && (0, import_sdk.normalizeAddress)("STARKNET", trimmed) === (0, import_sdk.normalizeAddress)("STARKNET", currentOwner);
|
|
49
|
+
const close = () => {
|
|
50
|
+
setOpen(false);
|
|
51
|
+
setConfirming(false);
|
|
52
|
+
};
|
|
53
|
+
const transfer = () => {
|
|
54
|
+
close();
|
|
55
|
+
void tx.run(async (signer) => {
|
|
56
|
+
await (0, import_run_intent_calls.runIntentCalls)(
|
|
57
|
+
signer,
|
|
58
|
+
() => app.getClient().api.intents.create("transfer-collection-ownership", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed })
|
|
59
|
+
);
|
|
60
|
+
}).then((ok) => {
|
|
61
|
+
if (ok) onTransferred?.();
|
|
62
|
+
});
|
|
63
|
+
};
|
|
64
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
65
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { variant: "outline", size: "sm", className: "gap-2", onClick: () => {
|
|
66
|
+
setNewOwner("");
|
|
67
|
+
setOpen(true);
|
|
68
|
+
}, children: [
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.UserRoundCog, { className: "h-4 w-4" }),
|
|
70
|
+
"Transfer ownership"
|
|
71
|
+
] }),
|
|
72
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog, { open, onOpenChange: (next) => {
|
|
73
|
+
if (!next) close();
|
|
74
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.DialogContent, { className: "max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl", children: [
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.DialogTitle, { className: "sr-only", children: [
|
|
76
|
+
"Transfer ownership of ",
|
|
77
|
+
collectionName ?? "collection"
|
|
78
|
+
] }),
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogDescription, { className: "sr-only", children: "Transfer the on-chain owner of this collection. Existing tokens are unaffected." }),
|
|
80
|
+
confirming ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
81
|
+
import_marketplace_dialog_primitives.MarketplaceConfirmStep,
|
|
82
|
+
{
|
|
83
|
+
description: `Transfer ownership to ${(0, import_address.shortenAddress)(trimmed)}?`,
|
|
84
|
+
secondaryLabel: "Back",
|
|
85
|
+
onSecondary: () => setConfirming(false),
|
|
86
|
+
primaryLabel: "Transfer ownership",
|
|
87
|
+
onPrimary: transfer,
|
|
88
|
+
primaryIcon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.UserRoundCog, { className: "h-4 w-4" })
|
|
89
|
+
}
|
|
90
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "p-6 space-y-4", children: [
|
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.UserRoundCog, { className: "h-5 w-5" }),
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "font-bold text-lg", children: "Transfer collection ownership" })
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: "The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected." }),
|
|
96
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.Label, { htmlFor: "new-owner", children: "New owner address" }),
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
99
|
+
import_input.Input,
|
|
100
|
+
{
|
|
101
|
+
id: "new-owner",
|
|
102
|
+
placeholder: "0x\u2026",
|
|
103
|
+
value: newOwner,
|
|
104
|
+
onChange: (e) => setNewOwner(e.target.value),
|
|
105
|
+
className: "tabular-nums text-sm",
|
|
106
|
+
spellCheck: false,
|
|
107
|
+
autoComplete: "off"
|
|
108
|
+
}
|
|
109
|
+
),
|
|
110
|
+
trimmed && !isValid && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-red-500", children: "Not a valid Starknet address." }),
|
|
111
|
+
wouldNoop && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-amber-500", children: "This is already the current owner." })
|
|
112
|
+
] }),
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-2 pt-2", children: [
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { variant: "ghost", className: "flex-1", onClick: close, children: "Cancel" }),
|
|
115
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { className: "flex-1", onClick: () => setConfirming(true), disabled: !isValid || wouldNoop || !app.walletAddress, children: "Continue" })
|
|
116
|
+
] })
|
|
117
|
+
] })
|
|
118
|
+
] }) }),
|
|
119
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_transaction_dialog.TransactionDialog, { tx, title: "Transfer ownership", workingLabel: "Transferring ownership\u2026", firstStepLabel: "Prepare transfer", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
120
|
+
import_transaction_done.TransactionDone,
|
|
121
|
+
{
|
|
122
|
+
tx,
|
|
123
|
+
name: collectionName ?? "Collection",
|
|
124
|
+
title: "Ownership transferred",
|
|
125
|
+
description: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "tabular-nums", children: [
|
|
126
|
+
"New owner: ",
|
|
127
|
+
(0, import_address.shortenAddress)(trimmed)
|
|
128
|
+
] })
|
|
129
|
+
}
|
|
130
|
+
) })
|
|
131
|
+
] });
|
|
132
|
+
}
|
|
133
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
134
|
+
0 && (module.exports = {
|
|
135
|
+
TransferCollectionOwnership
|
|
136
|
+
});
|
|
137
|
+
//# sourceMappingURL=transfer-collection-ownership.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionDone } from \"./transaction-done.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"outline\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n Transfer ownership\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">Transfer ownership of {collectionName ?? \"collection\"}</DialogTitle>\n <DialogDescription className=\"sr-only\">Transfer the on-chain owner of this collection. Existing tokens are unaffected.</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={`Transfer ownership to ${shortenAddress(trimmed)}?`}\n secondaryLabel=\"Back\"\n onSecondary={() => setConfirming(false)}\n primaryLabel=\"Transfer ownership\"\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">Transfer collection ownership</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">New owner address</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-red-500\">Not a valid Starknet address.</p>}\n {wouldNoop && <p className=\"text-xs text-amber-500\">This is already the current owner.</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n Cancel\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n Continue\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title=\"Transfer ownership\" workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionDone\n tx={tx}\n name={collectionName ?? \"Collection\"}\n title=\"Ownership transferred\"\n description={<span className=\"tabular-nums\">New owner: {shortenAddress(trimmed)}</span>}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsDI;AApDJ,mBAAyB;AACzB,0BAA6B;AAC7B,iBAAiC;AACjC,oBAAuB;AACvB,oBAAsE;AACtE,mBAAsB;AACtB,mBAAsB;AACtB,2CAAuC;AACvC,2BAAgC;AAChC,gCAAkC;AAClC,8BAAgC;AAChC,qBAA+B;AAC/B,8BAA+B;AAC/B,6BAA+B;AASxB,SAAS,4BAA4B,EAAE,cAAc,cAAc,gBAAgB,cAAc,GAAqC;AAC3I,QAAM,UAAM,sCAAgB;A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UAAK,WAAU,gBAAe;AAAA;AAAA,cAAY,+BAAe,OAAO;AAAA,WAAE;AAAA;AAAA,IAClF,GACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface TransferCollectionOwnershipProps {
|
|
4
|
+
collectionId: string;
|
|
5
|
+
currentOwner: string;
|
|
6
|
+
collectionName?: string | null;
|
|
7
|
+
onTransferred?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { TransferCollectionOwnership, type TransferCollectionOwnershipProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface TransferCollectionOwnershipProps {
|
|
4
|
+
collectionId: string;
|
|
5
|
+
currentOwner: string;
|
|
6
|
+
collectionName?: string | null;
|
|
7
|
+
onTransferred?: () => void;
|
|
8
|
+
}
|
|
9
|
+
declare function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
|
|
11
|
+
export { TransferCollectionOwnership, type TransferCollectionOwnershipProps };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { UserRoundCog } from "lucide-react";
|
|
5
|
+
import { normalizeAddress } from "@medialane/sdk";
|
|
6
|
+
import { Button } from "./button.js";
|
|
7
|
+
import { Dialog, DialogContent, DialogDescription, DialogTitle } from "./dialog.js";
|
|
8
|
+
import { Input } from "./input.js";
|
|
9
|
+
import { Label } from "./label.js";
|
|
10
|
+
import { MarketplaceConfirmStep } from "./marketplace-dialog-primitives.js";
|
|
11
|
+
import { useMedialaneApp } from "./medialane-app.js";
|
|
12
|
+
import { TransactionDialog } from "./transaction-dialog.js";
|
|
13
|
+
import { TransactionDone } from "./transaction-done.js";
|
|
14
|
+
import { shortenAddress } from "../utils/address.js";
|
|
15
|
+
import { runIntentCalls } from "../utils/run-intent-calls.js";
|
|
16
|
+
import { useTransaction } from "../utils/use-transaction.js";
|
|
17
|
+
function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }) {
|
|
18
|
+
const app = useMedialaneApp();
|
|
19
|
+
const tx = useTransaction();
|
|
20
|
+
const [open, setOpen] = useState(false);
|
|
21
|
+
const [confirming, setConfirming] = useState(false);
|
|
22
|
+
const [newOwner, setNewOwner] = useState("");
|
|
23
|
+
const trimmed = newOwner.trim();
|
|
24
|
+
const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);
|
|
25
|
+
const wouldNoop = isValid && normalizeAddress("STARKNET", trimmed) === normalizeAddress("STARKNET", currentOwner);
|
|
26
|
+
const close = () => {
|
|
27
|
+
setOpen(false);
|
|
28
|
+
setConfirming(false);
|
|
29
|
+
};
|
|
30
|
+
const transfer = () => {
|
|
31
|
+
close();
|
|
32
|
+
void tx.run(async (signer) => {
|
|
33
|
+
await runIntentCalls(
|
|
34
|
+
signer,
|
|
35
|
+
() => app.getClient().api.intents.create("transfer-collection-ownership", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed })
|
|
36
|
+
);
|
|
37
|
+
}).then((ok) => {
|
|
38
|
+
if (ok) onTransferred?.();
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
42
|
+
/* @__PURE__ */ jsxs(Button, { variant: "outline", size: "sm", className: "gap-2", onClick: () => {
|
|
43
|
+
setNewOwner("");
|
|
44
|
+
setOpen(true);
|
|
45
|
+
}, children: [
|
|
46
|
+
/* @__PURE__ */ jsx(UserRoundCog, { className: "h-4 w-4" }),
|
|
47
|
+
"Transfer ownership"
|
|
48
|
+
] }),
|
|
49
|
+
/* @__PURE__ */ jsx(Dialog, { open, onOpenChange: (next) => {
|
|
50
|
+
if (!next) close();
|
|
51
|
+
}, children: /* @__PURE__ */ jsxs(DialogContent, { className: "max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl", children: [
|
|
52
|
+
/* @__PURE__ */ jsxs(DialogTitle, { className: "sr-only", children: [
|
|
53
|
+
"Transfer ownership of ",
|
|
54
|
+
collectionName ?? "collection"
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx(DialogDescription, { className: "sr-only", children: "Transfer the on-chain owner of this collection. Existing tokens are unaffected." }),
|
|
57
|
+
confirming ? /* @__PURE__ */ jsx(
|
|
58
|
+
MarketplaceConfirmStep,
|
|
59
|
+
{
|
|
60
|
+
description: `Transfer ownership to ${shortenAddress(trimmed)}?`,
|
|
61
|
+
secondaryLabel: "Back",
|
|
62
|
+
onSecondary: () => setConfirming(false),
|
|
63
|
+
primaryLabel: "Transfer ownership",
|
|
64
|
+
onPrimary: transfer,
|
|
65
|
+
primaryIcon: /* @__PURE__ */ jsx(UserRoundCog, { className: "h-4 w-4" })
|
|
66
|
+
}
|
|
67
|
+
) : /* @__PURE__ */ jsxs("div", { className: "p-6 space-y-4", children: [
|
|
68
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
69
|
+
/* @__PURE__ */ jsx(UserRoundCog, { className: "h-5 w-5" }),
|
|
70
|
+
/* @__PURE__ */ jsx("p", { className: "font-bold text-lg", children: "Transfer collection ownership" })
|
|
71
|
+
] }),
|
|
72
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected." }),
|
|
73
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
74
|
+
/* @__PURE__ */ jsx(Label, { htmlFor: "new-owner", children: "New owner address" }),
|
|
75
|
+
/* @__PURE__ */ jsx(
|
|
76
|
+
Input,
|
|
77
|
+
{
|
|
78
|
+
id: "new-owner",
|
|
79
|
+
placeholder: "0x\u2026",
|
|
80
|
+
value: newOwner,
|
|
81
|
+
onChange: (e) => setNewOwner(e.target.value),
|
|
82
|
+
className: "tabular-nums text-sm",
|
|
83
|
+
spellCheck: false,
|
|
84
|
+
autoComplete: "off"
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
trimmed && !isValid && /* @__PURE__ */ jsx("p", { className: "text-xs text-red-500", children: "Not a valid Starknet address." }),
|
|
88
|
+
wouldNoop && /* @__PURE__ */ jsx("p", { className: "text-xs text-amber-500", children: "This is already the current owner." })
|
|
89
|
+
] }),
|
|
90
|
+
/* @__PURE__ */ jsxs("div", { className: "flex gap-2 pt-2", children: [
|
|
91
|
+
/* @__PURE__ */ jsx(Button, { variant: "ghost", className: "flex-1", onClick: close, children: "Cancel" }),
|
|
92
|
+
/* @__PURE__ */ jsx(Button, { className: "flex-1", onClick: () => setConfirming(true), disabled: !isValid || wouldNoop || !app.walletAddress, children: "Continue" })
|
|
93
|
+
] })
|
|
94
|
+
] })
|
|
95
|
+
] }) }),
|
|
96
|
+
/* @__PURE__ */ jsx(TransactionDialog, { tx, title: "Transfer ownership", workingLabel: "Transferring ownership\u2026", firstStepLabel: "Prepare transfer", children: /* @__PURE__ */ jsx(
|
|
97
|
+
TransactionDone,
|
|
98
|
+
{
|
|
99
|
+
tx,
|
|
100
|
+
name: collectionName ?? "Collection",
|
|
101
|
+
title: "Ownership transferred",
|
|
102
|
+
description: /* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
|
|
103
|
+
"New owner: ",
|
|
104
|
+
shortenAddress(trimmed)
|
|
105
|
+
] })
|
|
106
|
+
}
|
|
107
|
+
) })
|
|
108
|
+
] });
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
TransferCollectionOwnership
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=transfer-collection-ownership.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/transfer-collection-ownership.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { UserRoundCog } from \"lucide-react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Button } from \"./button.js\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { MarketplaceConfirmStep } from \"./marketplace-dialog-primitives.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { TransactionDialog } from \"./transaction-dialog.js\";\nimport { TransactionDone } from \"./transaction-done.js\";\nimport { shortenAddress } from \"../utils/address.js\";\nimport { runIntentCalls } from \"../utils/run-intent-calls.js\";\nimport { useTransaction } from \"../utils/use-transaction.js\";\n\nexport interface TransferCollectionOwnershipProps {\n collectionId: string;\n currentOwner: string;\n collectionName?: string | null;\n onTransferred?: () => void;\n}\n\nexport function TransferCollectionOwnership({ collectionId, currentOwner, collectionName, onTransferred }: TransferCollectionOwnershipProps) {\n const app = useMedialaneApp();\n const tx = useTransaction();\n const [open, setOpen] = useState(false);\n const [confirming, setConfirming] = useState(false);\n const [newOwner, setNewOwner] = useState(\"\");\n\n const trimmed = newOwner.trim();\n const isValid = /^0x[0-9a-fA-F]{1,64}$/.test(trimmed);\n const wouldNoop = isValid && normalizeAddress(\"STARKNET\", trimmed) === normalizeAddress(\"STARKNET\", currentOwner);\n\n const close = () => {\n setOpen(false);\n setConfirming(false);\n };\n\n const transfer = () => {\n close();\n void tx\n .run(async (signer) => {\n await runIntentCalls(signer, () =>\n app.getClient().api.intents.create(\"transfer-collection-ownership\", { owner: signer.address, collectionId: String(collectionId), newOwner: trimmed }),\n );\n })\n .then((ok) => {\n if (ok) onTransferred?.();\n });\n };\n\n return (\n <>\n <Button variant=\"outline\" size=\"sm\" className=\"gap-2\" onClick={() => { setNewOwner(\"\"); setOpen(true); }}>\n <UserRoundCog className=\"h-4 w-4\" />\n Transfer ownership\n </Button>\n\n <Dialog open={open} onOpenChange={(next) => { if (!next) close(); }}>\n <DialogContent className=\"max-w-[calc(100%-6px)] sm:max-w-md p-0 overflow-hidden gap-0 rounded-2xl\">\n <DialogTitle className=\"sr-only\">Transfer ownership of {collectionName ?? \"collection\"}</DialogTitle>\n <DialogDescription className=\"sr-only\">Transfer the on-chain owner of this collection. Existing tokens are unaffected.</DialogDescription>\n\n {confirming ? (\n <MarketplaceConfirmStep\n description={`Transfer ownership to ${shortenAddress(trimmed)}?`}\n secondaryLabel=\"Back\"\n onSecondary={() => setConfirming(false)}\n primaryLabel=\"Transfer ownership\"\n onPrimary={transfer}\n primaryIcon={<UserRoundCog className=\"h-4 w-4\" />}\n />\n ) : (\n <div className=\"p-6 space-y-4\">\n <div className=\"flex items-center gap-2\">\n <UserRoundCog className=\"h-5 w-5\" />\n <p className=\"font-bold text-lg\">Transfer collection ownership</p>\n </div>\n <p className=\"text-sm text-muted-foreground\">\n The new owner will control minting and future ownership transfers for this collection. Existing tokens are unaffected.\n </p>\n <div className=\"space-y-2\">\n <Label htmlFor=\"new-owner\">New owner address</Label>\n <Input\n id=\"new-owner\"\n placeholder=\"0x…\"\n value={newOwner}\n onChange={(e) => setNewOwner(e.target.value)}\n className=\"tabular-nums text-sm\"\n spellCheck={false}\n autoComplete=\"off\"\n />\n {trimmed && !isValid && <p className=\"text-xs text-red-500\">Not a valid Starknet address.</p>}\n {wouldNoop && <p className=\"text-xs text-amber-500\">This is already the current owner.</p>}\n </div>\n <div className=\"flex gap-2 pt-2\">\n <Button variant=\"ghost\" className=\"flex-1\" onClick={close}>\n Cancel\n </Button>\n <Button className=\"flex-1\" onClick={() => setConfirming(true)} disabled={!isValid || wouldNoop || !app.walletAddress}>\n Continue\n </Button>\n </div>\n </div>\n )}\n </DialogContent>\n </Dialog>\n\n <TransactionDialog tx={tx} title=\"Transfer ownership\" workingLabel=\"Transferring ownership…\" firstStepLabel=\"Prepare transfer\">\n <TransactionDone\n tx={tx}\n name={collectionName ?? \"Collection\"}\n title=\"Ownership transferred\"\n description={<span className=\"tabular-nums\">New owner: {shortenAddress(trimmed)}</span>}\n />\n </TransactionDialog>\n </>\n );\n}\n"],"mappings":";AAsDI,mBAEI,KADF,YADF;AApDJ,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,wBAAwB;AACjC,SAAS,cAAc;AACvB,SAAS,QAAQ,eAAe,mBAAmB,mBAAmB;AACtE,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,8BAA8B;AACvC,SAAS,uBAAuB;AAChC,SAAS,yBAAyB;AAClC,SAAS,uBAAuB;AAChC,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AAC/B,SAAS,sBAAsB;AASxB,SAAS,4BAA4B,EAAE,cAAc,cAAc,gBAAgB,cAAc,GAAqC;AAC3I,QAAM,MAAM,gBAAgB;AAC5B,QAAM,KAAK,eAAe;AAC1B,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,KAAK;AACtC,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,EAAE;AAE3C,QAAM,UAAU,SAAS,KAAK;AAC9B,QAAM,UAAU,wBAAwB,KAAK,OAAO;AACpD,QAAM,YAAY,WAAW,iBAAiB,YAAY,OAAO,MAAM,iBAAiB,YAAY,YAAY;AAEhH,QAAM,QAAQ,MAAM;AAClB,YAAQ,KAAK;AACb,kBAAc,KAAK;AAAA,EACrB;AAEA,QAAM,WAAW,MAAM;AACrB,UAAM;AACN,SAAK,GACF,IAAI,OAAO,WAAW;AACrB,YAAM;AAAA,QAAe;AAAA,QAAQ,MAC3B,IAAI,UAAU,EAAE,IAAI,QAAQ,OAAO,iCAAiC,EAAE,OAAO,OAAO,SAAS,cAAc,OAAO,YAAY,GAAG,UAAU,QAAQ,CAAC;AAA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