@medialane/ui 0.183.0 → 0.185.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/drop/create/artwork-section.cjs +115 -0
- package/dist/components/drop/create/artwork-section.cjs.map +1 -0
- package/dist/components/drop/create/artwork-section.d.cts +23 -0
- package/dist/components/drop/create/artwork-section.d.ts +23 -0
- package/dist/components/drop/create/artwork-section.js +79 -0
- package/dist/components/drop/create/artwork-section.js.map +1 -0
- package/dist/components/drop/create/details-section.cjs +110 -0
- package/dist/components/drop/create/details-section.cjs.map +1 -0
- package/dist/components/drop/create/details-section.d.cts +11 -0
- package/dist/components/drop/create/details-section.d.ts +11 -0
- package/dist/components/drop/create/details-section.js +86 -0
- package/dist/components/drop/create/details-section.js.map +1 -0
- package/dist/components/drop/create/drop-create.cjs +114 -0
- package/dist/components/drop/create/drop-create.cjs.map +1 -0
- package/dist/components/drop/create/drop-create.d.cts +20 -0
- package/dist/components/drop/create/drop-create.d.ts +20 -0
- package/dist/components/drop/create/drop-create.js +79 -0
- package/dist/components/drop/create/drop-create.js.map +1 -0
- package/dist/components/drop/create/exclusive-fields.cjs +45 -0
- package/dist/components/drop/create/exclusive-fields.cjs.map +1 -0
- package/dist/components/drop/create/exclusive-fields.d.cts +14 -0
- package/dist/components/drop/create/exclusive-fields.d.ts +14 -0
- package/dist/components/drop/create/exclusive-fields.js +21 -0
- package/dist/components/drop/create/exclusive-fields.js.map +1 -0
- package/dist/components/drop/create/launch-dialog.cjs +196 -0
- package/dist/components/drop/create/launch-dialog.cjs.map +1 -0
- package/dist/components/drop/create/launch-dialog.d.cts +21 -0
- package/dist/components/drop/create/launch-dialog.d.ts +21 -0
- package/dist/components/drop/create/launch-dialog.js +171 -0
- package/dist/components/drop/create/launch-dialog.js.map +1 -0
- package/dist/components/drop/create/list-section.cjs +67 -0
- package/dist/components/drop/create/list-section.cjs.map +1 -0
- package/dist/components/drop/create/list-section.d.cts +11 -0
- package/dist/components/drop/create/list-section.d.ts +11 -0
- package/dist/components/drop/create/list-section.js +43 -0
- package/dist/components/drop/create/list-section.js.map +1 -0
- package/dist/components/drop/create/sale-section.cjs +78 -0
- package/dist/components/drop/create/sale-section.cjs.map +1 -0
- package/dist/components/drop/create/sale-section.d.cts +13 -0
- package/dist/components/drop/create/sale-section.d.ts +13 -0
- package/dist/components/drop/create/sale-section.js +54 -0
- package/dist/components/drop/create/sale-section.js.map +1 -0
- package/dist/components/drop/drop-card.cjs +81 -0
- package/dist/components/drop/drop-card.cjs.map +1 -0
- package/dist/components/drop/drop-card.d.cts +18 -0
- package/dist/components/drop/drop-card.d.ts +18 -0
- package/dist/components/drop/drop-card.js +45 -0
- package/dist/components/drop/drop-card.js.map +1 -0
- package/dist/components/drop/drop-features.cjs +44 -0
- package/dist/components/drop/drop-features.cjs.map +1 -0
- package/dist/components/drop/drop-features.d.cts +5 -0
- package/dist/components/drop/drop-features.d.ts +5 -0
- package/dist/components/drop/drop-features.js +20 -0
- package/dist/components/drop/drop-features.js.map +1 -0
- package/dist/components/drop/drop-listing.cjs +79 -0
- package/dist/components/drop/drop-listing.cjs.map +1 -0
- package/dist/components/drop/drop-listing.d.cts +10 -0
- package/dist/components/drop/drop-listing.d.ts +10 -0
- package/dist/components/drop/drop-listing.js +45 -0
- package/dist/components/drop/drop-listing.js.map +1 -0
- package/dist/components/{drop-status-display.cjs → drop/drop-status.cjs} +12 -43
- package/dist/components/drop/drop-status.cjs.map +1 -0
- package/dist/components/drop/drop-status.d.cts +13 -0
- package/dist/components/drop/drop-status.d.ts +13 -0
- package/dist/components/drop/drop-status.js +47 -0
- package/dist/components/drop/drop-status.js.map +1 -0
- package/dist/components/drop/drop-token-link.cjs +63 -0
- package/dist/components/drop/drop-token-link.cjs.map +1 -0
- package/dist/components/drop/drop-token-link.d.cts +9 -0
- package/dist/components/drop/drop-token-link.d.ts +9 -0
- package/dist/components/drop/drop-token-link.js +29 -0
- package/dist/components/drop/drop-token-link.js.map +1 -0
- package/dist/components/drop/my-drops.cjs +71 -0
- package/dist/components/drop/my-drops.cjs.map +1 -0
- package/dist/components/drop/my-drops.d.cts +12 -0
- package/dist/components/drop/my-drops.d.ts +12 -0
- package/dist/components/drop/my-drops.js +37 -0
- package/dist/components/drop/my-drops.js.map +1 -0
- package/dist/components/drop/page/drop-action-box.cjs +63 -0
- package/dist/components/drop/page/drop-action-box.cjs.map +1 -0
- package/dist/components/drop/page/drop-action-box.d.cts +15 -0
- package/dist/components/drop/page/drop-action-box.d.ts +15 -0
- package/dist/components/drop/page/drop-action-box.js +39 -0
- package/dist/components/drop/page/drop-action-box.js.map +1 -0
- package/dist/components/drop/page/drop-activity.cjs +42 -0
- package/dist/components/drop/page/drop-activity.cjs.map +1 -0
- package/dist/components/drop/page/drop-activity.d.cts +8 -0
- package/dist/components/drop/page/drop-activity.d.ts +8 -0
- package/dist/components/drop/page/drop-activity.js +18 -0
- package/dist/components/drop/page/drop-activity.js.map +1 -0
- package/dist/components/drop/page/drop-manage.cjs +161 -0
- package/dist/components/drop/page/drop-manage.cjs.map +1 -0
- package/dist/components/drop/page/drop-manage.d.cts +24 -0
- package/dist/components/drop/page/drop-manage.d.ts +24 -0
- package/dist/components/drop/page/drop-manage.js +137 -0
- package/dist/components/drop/page/drop-manage.js.map +1 -0
- package/dist/components/drop/page/drop-mint-dialog.cjs +97 -0
- package/dist/components/drop/page/drop-mint-dialog.cjs.map +1 -0
- package/dist/components/drop/page/drop-mint-dialog.d.cts +15 -0
- package/dist/components/drop/page/drop-mint-dialog.d.ts +15 -0
- package/dist/components/drop/page/drop-mint-dialog.js +73 -0
- package/dist/components/drop/page/drop-mint-dialog.js.map +1 -0
- package/dist/components/drop/page/drop-page.cjs +167 -0
- package/dist/components/drop/page/drop-page.cjs.map +1 -0
- package/dist/components/drop/page/drop-page.d.cts +15 -0
- package/dist/components/drop/page/drop-page.d.ts +15 -0
- package/dist/components/drop/page/drop-page.js +133 -0
- package/dist/components/drop/page/drop-page.js.map +1 -0
- package/dist/components/image.d.cts +2 -0
- package/dist/components/image.d.ts +2 -0
- package/dist/index.cjs +54 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -11
- package/dist/index.d.ts +21 -11
- package/dist/index.js +34 -25
- package/dist/index.js.map +1 -1
- package/dist/utils/drop/actions.cjs +76 -0
- package/dist/utils/drop/actions.cjs.map +1 -0
- package/dist/utils/drop/actions.d.cts +46 -0
- package/dist/utils/drop/actions.d.ts +46 -0
- package/dist/utils/drop/actions.js +49 -0
- package/dist/utils/drop/actions.js.map +1 -0
- package/dist/utils/drop/allowlist.cjs +50 -0
- package/dist/utils/drop/allowlist.cjs.map +1 -0
- package/dist/utils/drop/allowlist.d.cts +10 -0
- package/dist/utils/drop/allowlist.d.ts +10 -0
- package/dist/utils/drop/allowlist.js +26 -0
- package/dist/utils/drop/allowlist.js.map +1 -0
- package/dist/utils/drop/chain.cjs +37 -0
- package/dist/utils/drop/chain.cjs.map +1 -0
- package/dist/utils/drop/chain.d.cts +5 -0
- package/dist/utils/drop/chain.d.ts +5 -0
- package/dist/utils/drop/chain.js +13 -0
- package/dist/utils/drop/chain.js.map +1 -0
- package/dist/utils/drop/claim-proof.cjs +48 -0
- package/dist/utils/drop/claim-proof.cjs.map +1 -0
- package/dist/utils/drop/claim-proof.d.cts +9 -0
- package/dist/utils/drop/claim-proof.d.ts +9 -0
- package/dist/utils/drop/claim-proof.js +24 -0
- package/dist/utils/drop/claim-proof.js.map +1 -0
- package/dist/utils/drop/draft.cjs +87 -0
- package/dist/utils/drop/draft.cjs.map +1 -0
- package/dist/utils/drop/draft.d.cts +32 -0
- package/dist/utils/drop/draft.d.ts +32 -0
- package/dist/utils/drop/draft.js +61 -0
- package/dist/utils/drop/draft.js.map +1 -0
- package/dist/utils/drop/metadata.cjs +70 -0
- package/dist/utils/drop/metadata.cjs.map +1 -0
- package/dist/utils/drop/metadata.d.cts +34 -0
- package/dist/utils/drop/metadata.d.ts +34 -0
- package/dist/utils/drop/metadata.js +43 -0
- package/dist/utils/drop/metadata.js.map +1 -0
- package/dist/utils/{drop-status.cjs → drop/preview.cjs} +14 -14
- package/dist/utils/drop/preview.cjs.map +1 -0
- package/dist/utils/drop/preview.d.cts +4 -0
- package/dist/utils/drop/preview.d.ts +4 -0
- package/dist/utils/drop/preview.js +13 -0
- package/dist/utils/drop/preview.js.map +1 -0
- package/dist/utils/drop/receipt.cjs +39 -0
- package/dist/utils/drop/receipt.cjs.map +1 -0
- package/dist/utils/drop/receipt.d.cts +6 -0
- package/dist/utils/drop/receipt.d.ts +6 -0
- package/dist/utils/drop/receipt.js +15 -0
- package/dist/utils/drop/receipt.js.map +1 -0
- package/dist/utils/drop/sale.cjs +108 -0
- package/dist/utils/drop/sale.cjs.map +1 -0
- package/dist/utils/drop/sale.d.cts +52 -0
- package/dist/utils/drop/sale.d.ts +52 -0
- package/dist/utils/drop/sale.js +78 -0
- package/dist/utils/drop/sale.js.map +1 -0
- package/dist/utils/drop/types.cjs +17 -0
- package/dist/utils/drop/types.cjs.map +1 -0
- package/dist/utils/drop/types.d.cts +20 -0
- package/dist/utils/drop/types.d.ts +20 -0
- package/dist/utils/drop/types.js +1 -0
- package/dist/utils/drop/types.js.map +1 -0
- package/dist/utils/drop/upload.cjs +48 -0
- package/dist/utils/drop/upload.cjs.map +1 -0
- package/dist/utils/drop/upload.d.cts +11 -0
- package/dist/utils/drop/upload.d.ts +11 -0
- package/dist/utils/drop/upload.js +24 -0
- package/dist/utils/drop/upload.js.map +1 -0
- package/dist/utils/drop/use-now.cjs +38 -0
- package/dist/utils/drop/use-now.cjs.map +1 -0
- package/dist/utils/drop/use-now.d.cts +4 -0
- package/dist/utils/drop/use-now.d.ts +4 -0
- package/dist/utils/drop/use-now.js +14 -0
- package/dist/utils/drop/use-now.js.map +1 -0
- package/dist/utils/drop/view.cjs +89 -0
- package/dist/utils/drop/view.cjs.map +1 -0
- package/dist/utils/drop/view.d.cts +34 -0
- package/dist/utils/drop/view.d.ts +34 -0
- package/dist/utils/drop/view.js +64 -0
- package/dist/utils/drop/view.js.map +1 -0
- package/dist/utils/launchpad-defaults.cjs +0 -22
- package/dist/utils/launchpad-defaults.cjs.map +1 -1
- package/dist/utils/launchpad-defaults.d.cts +1 -7
- package/dist/utils/launchpad-defaults.d.ts +1 -7
- package/dist/utils/launchpad-defaults.js +0 -21
- package/dist/utils/launchpad-defaults.js.map +1 -1
- package/dist/utils/use-drops.cjs +48 -45
- package/dist/utils/use-drops.cjs.map +1 -1
- package/dist/utils/use-drops.d.cts +33 -23
- package/dist/utils/use-drops.d.ts +33 -23
- package/dist/utils/use-drops.js +41 -40
- package/dist/utils/use-drops.js.map +1 -1
- package/package.json +3 -3
- package/dist/components/account/account.test.cjs +0 -86
- package/dist/components/account/account.test.cjs.map +0 -1
- package/dist/components/account/account.test.d.cts +0 -2
- package/dist/components/account/account.test.d.ts +0 -2
- package/dist/components/account/account.test.js +0 -85
- package/dist/components/account/account.test.js.map +0 -1
- package/dist/components/drop-create-form.cjs +0 -341
- package/dist/components/drop-create-form.cjs.map +0 -1
- package/dist/components/drop-create-form.d.cts +0 -39
- package/dist/components/drop-create-form.d.ts +0 -39
- package/dist/components/drop-create-form.js +0 -322
- package/dist/components/drop-create-form.js.map +0 -1
- package/dist/components/drop-preview-card.cjs +0 -106
- package/dist/components/drop-preview-card.cjs.map +0 -1
- package/dist/components/drop-preview-card.d.cts +0 -17
- package/dist/components/drop-preview-card.d.ts +0 -17
- package/dist/components/drop-preview-card.js +0 -82
- package/dist/components/drop-preview-card.js.map +0 -1
- package/dist/components/drop-preview-card.test.cjs +0 -84
- package/dist/components/drop-preview-card.test.cjs.map +0 -1
- package/dist/components/drop-preview-card.test.d.cts +0 -3
- package/dist/components/drop-preview-card.test.d.ts +0 -3
- package/dist/components/drop-preview-card.test.js +0 -83
- package/dist/components/drop-preview-card.test.js.map +0 -1
- package/dist/components/drop-status-display.cjs.map +0 -1
- package/dist/components/drop-status-display.d.cts +0 -15
- package/dist/components/drop-status-display.d.ts +0 -15
- package/dist/components/drop-status-display.js +0 -77
- package/dist/components/drop-status-display.js.map +0 -1
- package/dist/components/drop-status-display.test.cjs +0 -29
- package/dist/components/drop-status-display.test.cjs.map +0 -1
- package/dist/components/drop-status-display.test.d.cts +0 -2
- package/dist/components/drop-status-display.test.d.ts +0 -2
- package/dist/components/drop-status-display.test.js +0 -28
- package/dist/components/drop-status-display.test.js.map +0 -1
- package/dist/components/exclusive-content-section.cjs +0 -88
- package/dist/components/exclusive-content-section.cjs.map +0 -1
- package/dist/components/exclusive-content-section.d.cts +0 -10
- package/dist/components/exclusive-content-section.d.ts +0 -10
- package/dist/components/exclusive-content-section.js +0 -64
- package/dist/components/exclusive-content-section.js.map +0 -1
- package/dist/data/drop-create-schema.cjs +0 -92
- package/dist/data/drop-create-schema.cjs.map +0 -1
- package/dist/data/drop-create-schema.d.cts +0 -131
- package/dist/data/drop-create-schema.d.ts +0 -131
- package/dist/data/drop-create-schema.js +0 -58
- package/dist/data/drop-create-schema.js.map +0 -1
- package/dist/utils/drop-status.cjs.map +0 -1
- package/dist/utils/drop-status.d.cts +0 -12
- package/dist/utils/drop-status.d.ts +0 -12
- package/dist/utils/drop-status.js +0 -13
- package/dist/utils/drop-status.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { DropPhase } from '../../utils/drop/view.cjs';
|
|
3
|
+
import '@medialane/sdk/starknet';
|
|
4
|
+
|
|
5
|
+
declare function DropStatusBadge({ phase }: {
|
|
6
|
+
phase: DropPhase;
|
|
7
|
+
}): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function DropSupplyProgress({ minted, max }: {
|
|
9
|
+
minted: number;
|
|
10
|
+
max: number;
|
|
11
|
+
}): react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { DropStatusBadge, DropSupplyProgress };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { DropPhase } from '../../utils/drop/view.js';
|
|
3
|
+
import '@medialane/sdk/starknet';
|
|
4
|
+
|
|
5
|
+
declare function DropStatusBadge({ phase }: {
|
|
6
|
+
phase: DropPhase;
|
|
7
|
+
}): react_jsx_runtime.JSX.Element;
|
|
8
|
+
declare function DropSupplyProgress({ minted, max }: {
|
|
9
|
+
minted: number;
|
|
10
|
+
max: number;
|
|
11
|
+
}): react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { DropStatusBadge, DropSupplyProgress };
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../../utils/cn.js";
|
|
4
|
+
function DropStatusBadge({ phase }) {
|
|
5
|
+
const map = {
|
|
6
|
+
live: { label: "Live", cls: "text-green-400 bg-green-500/10" },
|
|
7
|
+
upcoming: { label: "Upcoming", cls: "text-brand-blue bg-brand-blue/10" },
|
|
8
|
+
ended: { label: "Ended", cls: "text-muted-foreground bg-muted" },
|
|
9
|
+
"sold-out": { label: "Sold out", cls: "text-brand-orange bg-brand-orange/10" }
|
|
10
|
+
};
|
|
11
|
+
const { label, cls } = map[phase];
|
|
12
|
+
return /* @__PURE__ */ jsxs("span", { className: cn("inline-flex items-center gap-1 text-xs font-bold uppercase tracking-widest rounded-full px-3 py-1", cls), children: [
|
|
13
|
+
phase === "live" && /* @__PURE__ */ jsx("span", { className: "h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse" }),
|
|
14
|
+
label
|
|
15
|
+
] });
|
|
16
|
+
}
|
|
17
|
+
function DropSupplyProgress({ minted, max }) {
|
|
18
|
+
const pct = max > 0 ? Math.min(100, minted / max * 100) : 0;
|
|
19
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { className: "flex justify-between text-xs text-muted-foreground", children: [
|
|
21
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
22
|
+
minted.toLocaleString(),
|
|
23
|
+
" minted"
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
26
|
+
"of ",
|
|
27
|
+
max.toLocaleString()
|
|
28
|
+
] })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ jsx("div", { className: "h-2 rounded-full bg-muted overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: "h-full rounded-full bg-brand-orange transition-all duration-500",
|
|
34
|
+
style: { width: `${pct}%` }
|
|
35
|
+
}
|
|
36
|
+
) }),
|
|
37
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
38
|
+
pct.toFixed(1),
|
|
39
|
+
"% claimed"
|
|
40
|
+
] })
|
|
41
|
+
] });
|
|
42
|
+
}
|
|
43
|
+
export {
|
|
44
|
+
DropStatusBadge,
|
|
45
|
+
DropSupplyProgress
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=drop-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/drop/drop-status.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../../utils/cn.js\";\nimport type { DropPhase } from \"../../utils/drop/view.js\";\n\nexport function DropStatusBadge({ phase }: { phase: DropPhase }) {\n const map = {\n live: { label: \"Live\", cls: \"text-green-400 bg-green-500/10\" },\n upcoming: { label: \"Upcoming\", cls: \"text-brand-blue bg-brand-blue/10\" },\n ended: { label: \"Ended\", cls: \"text-muted-foreground bg-muted\" },\n \"sold-out\": { label: \"Sold out\", cls: \"text-brand-orange bg-brand-orange/10\" },\n } as const;\n const { label, cls } = map[phase];\n return (\n <span className={cn(\"inline-flex items-center gap-1 text-xs font-bold uppercase tracking-widest rounded-full px-3 py-1\", cls)}>\n {phase === \"live\" && <span className=\"h-1.5 w-1.5 rounded-full bg-green-400 animate-pulse\" />}\n {label}\n </span>\n );\n}\n\nexport function DropSupplyProgress({ minted, max }: { minted: number; max: number }) {\n const pct = max > 0 ? Math.min(100, (minted / max) * 100) : 0;\n return (\n <div className=\"space-y-1.5\">\n <div className=\"flex justify-between text-xs text-muted-foreground\">\n <span>{minted.toLocaleString()} minted</span>\n <span>of {max.toLocaleString()}</span>\n </div>\n <div className=\"h-2 rounded-full bg-muted overflow-hidden\">\n <div\n className=\"h-full rounded-full bg-brand-orange transition-all duration-500\"\n style={{ width: `${pct}%` }}\n />\n </div>\n <p className=\"text-xs text-muted-foreground\">{pct.toFixed(1)}% claimed</p>\n </div>\n );\n}\n"],"mappings":";AAcI,SACuB,KADvB;AAZJ,SAAS,UAAU;AAGZ,SAAS,gBAAgB,EAAE,MAAM,GAAyB;AAC/D,QAAM,MAAM;AAAA,IACV,MAAY,EAAE,OAAO,QAAY,KAAK,iCAAiC;AAAA,IACvE,UAAY,EAAE,OAAO,YAAY,KAAK,mCAAmC;AAAA,IACzE,OAAY,EAAE,OAAO,SAAY,KAAK,iCAAiC;AAAA,IACvE,YAAY,EAAE,OAAO,YAAY,KAAK,uCAAuC;AAAA,EAC/E;AACA,QAAM,EAAE,OAAO,IAAI,IAAI,IAAI,KAAK;AAChC,SACE,qBAAC,UAAK,WAAW,GAAG,qGAAqG,GAAG,GACzH;AAAA,cAAU,UAAU,oBAAC,UAAK,WAAU,uDAAsD;AAAA,IAC1F;AAAA,KACH;AAEJ;AAEO,SAAS,mBAAmB,EAAE,QAAQ,IAAI,GAAoC;AACnF,QAAM,MAAM,MAAM,IAAI,KAAK,IAAI,KAAM,SAAS,MAAO,GAAG,IAAI;AAC5D,SACE,qBAAC,SAAI,WAAU,eACb;AAAA,yBAAC,SAAI,WAAU,sDACb;AAAA,2BAAC,UAAM;AAAA,eAAO,eAAe;AAAA,QAAE;AAAA,SAAO;AAAA,MACtC,qBAAC,UAAK;AAAA;AAAA,QAAI,IAAI,eAAe;AAAA,SAAE;AAAA,OACjC;AAAA,IACA,oBAAC,SAAI,WAAU,6CACb;AAAA,MAAC;AAAA;AAAA,QACC,WAAU;AAAA,QACV,OAAO,EAAE,OAAO,GAAG,GAAG,IAAI;AAAA;AAAA,IAC5B,GACF;AAAA,IACA,qBAAC,OAAE,WAAU,iCAAiC;AAAA,UAAI,QAAQ,CAAC;AAAA,MAAE;AAAA,OAAS;AAAA,KACxE;AAEJ;","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var drop_token_link_exports = {};
|
|
31
|
+
__export(drop_token_link_exports, {
|
|
32
|
+
DropTokenLink: () => DropTokenLink
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(drop_token_link_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_lucide_react = require("lucide-react");
|
|
37
|
+
var import_sdk = require("@medialane/sdk");
|
|
38
|
+
var import_link = __toESM(require("../link.js"), 1);
|
|
39
|
+
function DropTokenLink({ contract, name }) {
|
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
41
|
+
import_link.default,
|
|
42
|
+
{
|
|
43
|
+
href: (0, import_sdk.dropHref)(contract),
|
|
44
|
+
className: "flex items-center justify-between gap-3 rounded-xl border border-border px-4 py-3 transition-colors hover:bg-muted/40",
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex min-w-0 items-center gap-2 text-sm", children: [
|
|
47
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Package, { className: "h-4 w-4 shrink-0 text-brand-orange" }),
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground", children: "From the drop" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "truncate font-semibold", children: name ?? "Drop" })
|
|
50
|
+
] }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex shrink-0 items-center gap-1 text-sm font-semibold text-primary", children: [
|
|
52
|
+
"View drop ",
|
|
53
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRight, { className: "h-3.5 w-3.5" })
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
DropTokenLink
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=drop-token-link.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/drop/drop-token-link.tsx"],"sourcesContent":["\"use client\";\n\nimport { ArrowRight, Package } from \"lucide-react\";\nimport { dropHref } from \"@medialane/sdk\";\nimport Link from \"../link.js\";\n\n/** On a token page: where the token was minted. */\nexport function DropTokenLink({ contract, name }: { contract: string; name: string | null }) {\n return (\n <Link\n href={dropHref(contract)}\n className=\"flex items-center justify-between gap-3 rounded-xl border border-border px-4 py-3 transition-colors hover:bg-muted/40\"\n >\n <span className=\"flex min-w-0 items-center gap-2 text-sm\">\n <Package className=\"h-4 w-4 shrink-0 text-brand-orange\" />\n <span className=\"text-muted-foreground\">From the drop</span>\n <span className=\"truncate font-semibold\">{name ?? \"Drop\"}</span>\n </span>\n <span className=\"flex shrink-0 items-center gap-1 text-sm font-semibold text-primary\">\n View drop <ArrowRight className=\"h-3.5 w-3.5\" />\n </span>\n </Link>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaM;AAXN,0BAAoC;AACpC,iBAAyB;AACzB,kBAAiB;AAGV,SAAS,cAAc,EAAE,UAAU,KAAK,GAA8C;AAC3F,SACE;AAAA,IAAC,YAAAA;AAAA,IAAA;AAAA,MACC,UAAM,qBAAS,QAAQ;AAAA,MACvB,WAAU;AAAA,MAEV;AAAA,qDAAC,UAAK,WAAU,2CACd;AAAA,sDAAC,+BAAQ,WAAU,sCAAqC;AAAA,UACxD,4CAAC,UAAK,WAAU,yBAAwB,2BAAa;AAAA,UACrD,4CAAC,UAAK,WAAU,0BAA0B,kBAAQ,QAAO;AAAA,WAC3D;AAAA,QACA,6CAAC,UAAK,WAAU,uEAAsE;AAAA;AAAA,UAC1E,4CAAC,kCAAW,WAAU,eAAc;AAAA,WAChD;AAAA;AAAA;AAAA,EACF;AAEJ;","names":["Link"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/** On a token page: where the token was minted. */
|
|
4
|
+
declare function DropTokenLink({ contract, name }: {
|
|
5
|
+
contract: string;
|
|
6
|
+
name: string | null;
|
|
7
|
+
}): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { DropTokenLink };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/** On a token page: where the token was minted. */
|
|
4
|
+
declare function DropTokenLink({ contract, name }: {
|
|
5
|
+
contract: string;
|
|
6
|
+
name: string | null;
|
|
7
|
+
}): react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { DropTokenLink };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ArrowRight, Package } from "lucide-react";
|
|
4
|
+
import { dropHref } from "@medialane/sdk";
|
|
5
|
+
import Link from "../link.js";
|
|
6
|
+
function DropTokenLink({ contract, name }) {
|
|
7
|
+
return /* @__PURE__ */ jsxs(
|
|
8
|
+
Link,
|
|
9
|
+
{
|
|
10
|
+
href: dropHref(contract),
|
|
11
|
+
className: "flex items-center justify-between gap-3 rounded-xl border border-border px-4 py-3 transition-colors hover:bg-muted/40",
|
|
12
|
+
children: [
|
|
13
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-2 text-sm", children: [
|
|
14
|
+
/* @__PURE__ */ jsx(Package, { className: "h-4 w-4 shrink-0 text-brand-orange" }),
|
|
15
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "From the drop" }),
|
|
16
|
+
/* @__PURE__ */ jsx("span", { className: "truncate font-semibold", children: name ?? "Drop" })
|
|
17
|
+
] }),
|
|
18
|
+
/* @__PURE__ */ jsxs("span", { className: "flex shrink-0 items-center gap-1 text-sm font-semibold text-primary", children: [
|
|
19
|
+
"View drop ",
|
|
20
|
+
/* @__PURE__ */ jsx(ArrowRight, { className: "h-3.5 w-3.5" })
|
|
21
|
+
] })
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
DropTokenLink
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=drop-token-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/drop/drop-token-link.tsx"],"sourcesContent":["\"use client\";\n\nimport { ArrowRight, Package } from \"lucide-react\";\nimport { dropHref } from \"@medialane/sdk\";\nimport Link from \"../link.js\";\n\n/** On a token page: where the token was minted. */\nexport function DropTokenLink({ contract, name }: { contract: string; name: string | null }) {\n return (\n <Link\n href={dropHref(contract)}\n className=\"flex items-center justify-between gap-3 rounded-xl border border-border px-4 py-3 transition-colors hover:bg-muted/40\"\n >\n <span className=\"flex min-w-0 items-center gap-2 text-sm\">\n <Package className=\"h-4 w-4 shrink-0 text-brand-orange\" />\n <span className=\"text-muted-foreground\">From the drop</span>\n <span className=\"truncate font-semibold\">{name ?? \"Drop\"}</span>\n </span>\n <span className=\"flex shrink-0 items-center gap-1 text-sm font-semibold text-primary\">\n View drop <ArrowRight className=\"h-3.5 w-3.5\" />\n </span>\n </Link>\n );\n}\n"],"mappings":";AAaM,SACE,KADF;AAXN,SAAS,YAAY,eAAe;AACpC,SAAS,gBAAgB;AACzB,OAAO,UAAU;AAGV,SAAS,cAAc,EAAE,UAAU,KAAK,GAA8C;AAC3F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,SAAS,QAAQ;AAAA,MACvB,WAAU;AAAA,MAEV;AAAA,6BAAC,UAAK,WAAU,2CACd;AAAA,8BAAC,WAAQ,WAAU,sCAAqC;AAAA,UACxD,oBAAC,UAAK,WAAU,yBAAwB,2BAAa;AAAA,UACrD,oBAAC,UAAK,WAAU,0BAA0B,kBAAQ,QAAO;AAAA,WAC3D;AAAA,QACA,qBAAC,UAAK,WAAU,uEAAsE;AAAA;AAAA,UAC1E,oBAAC,cAAW,WAAU,eAAc;AAAA,WAChD;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var my_drops_exports = {};
|
|
31
|
+
__export(my_drops_exports, {
|
|
32
|
+
MyDrops: () => MyDrops
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(my_drops_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_lucide_react = require("lucide-react");
|
|
37
|
+
var import_link = __toESM(require("../link.js"), 1);
|
|
38
|
+
var import_button = require("../button.js");
|
|
39
|
+
var import_tab_empty_state = require("../tab-empty-state.js");
|
|
40
|
+
var import_drop_card = require("./drop-card.js");
|
|
41
|
+
var import_use_drops = require("../../utils/use-drops.js");
|
|
42
|
+
var import_use_now = require("../../utils/drop/use-now.js");
|
|
43
|
+
function MyDrops({
|
|
44
|
+
getClient,
|
|
45
|
+
walletAddress,
|
|
46
|
+
onRequireWallet,
|
|
47
|
+
connectLabel = "Sign in",
|
|
48
|
+
createHref = "/launchpad/drop/create"
|
|
49
|
+
}) {
|
|
50
|
+
const { drops, isLoading } = (0, import_use_drops.useMyDrops)(getClient, walletAddress);
|
|
51
|
+
const now = (0, import_use_now.useNow)(6e4);
|
|
52
|
+
if (!walletAddress) {
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4 py-16 text-center", children: [
|
|
54
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: "Sign in to see the drops you launched." }),
|
|
55
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { onClick: onRequireWallet, children: connectLabel })
|
|
56
|
+
] });
|
|
57
|
+
}
|
|
58
|
+
if (isLoading) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_card.DropGridSkeleton, {});
|
|
59
|
+
if (drops.length === 0) {
|
|
60
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4", children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tab_empty_state.TabEmptyState, { icon: import_lucide_react.Package, heading: "No drops yet", body: "Launch an edition or a collection and it will show here." }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_link.default, { href: createHref, className: "text-sm font-semibold text-primary", children: "Create a drop" }) })
|
|
63
|
+
] });
|
|
64
|
+
}
|
|
65
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_card.DropGrid, { drops, now, manage: true });
|
|
66
|
+
}
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
MyDrops
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=my-drops.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/drop/my-drops.tsx"],"sourcesContent":["\"use client\";\n\nimport { Package } from \"lucide-react\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport Link from \"../link.js\";\nimport { Button } from \"../button.js\";\nimport { TabEmptyState } from \"../tab-empty-state.js\";\nimport { DropGrid, DropGridSkeleton } from \"./drop-card.js\";\nimport { useMyDrops } from \"../../utils/use-drops.js\";\nimport { useNow } from \"../../utils/drop/use-now.js\";\n\nexport function MyDrops({\n getClient, walletAddress, onRequireWallet, connectLabel = \"Sign in\", createHref = \"/launchpad/drop/create\",\n}: {\n getClient: () => MedialaneClient;\n walletAddress: string | null;\n onRequireWallet: () => void;\n connectLabel?: string;\n createHref?: string;\n}) {\n const { drops, isLoading } = useMyDrops(getClient, walletAddress);\n const now = useNow(60_000);\n if (!walletAddress) {\n return (\n <div className=\"space-y-4 py-16 text-center\">\n <p className=\"text-sm text-muted-foreground\">Sign in to see the drops you launched.</p>\n <Button onClick={onRequireWallet}>{connectLabel}</Button>\n </div>\n );\n }\n if (isLoading) return <DropGridSkeleton />;\n if (drops.length === 0) {\n return (\n <div className=\"space-y-4\">\n <TabEmptyState icon={Package} heading=\"No drops yet\" body=\"Launch an edition or a collection and it will show here.\" />\n <div className=\"text-center\"><Link href={createHref} className=\"text-sm font-semibold text-primary\">Create a drop</Link></div>\n </div>\n );\n }\n return <DropGrid drops={drops} now={now} manage />;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwBM;AAtBN,0BAAwB;AAExB,kBAAiB;AACjB,oBAAuB;AACvB,6BAA8B;AAC9B,uBAA2C;AAC3C,uBAA2B;AAC3B,qBAAuB;AAEhB,SAAS,QAAQ;AAAA,EACtB;AAAA,EAAW;AAAA,EAAe;AAAA,EAAiB,eAAe;AAAA,EAAW,aAAa;AACpF,GAMG;AACD,QAAM,EAAE,OAAO,UAAU,QAAI,6BAAW,WAAW,aAAa;AAChE,QAAM,UAAM,uBAAO,GAAM;AACzB,MAAI,CAAC,eAAe;AAClB,WACE,6CAAC,SAAI,WAAU,+BACb;AAAA,kDAAC,OAAE,WAAU,iCAAgC,oDAAsC;AAAA,MACnF,4CAAC,wBAAO,SAAS,iBAAkB,wBAAa;AAAA,OAClD;AAAA,EAEJ;AACA,MAAI,UAAW,QAAO,4CAAC,qCAAiB;AACxC,MAAI,MAAM,WAAW,GAAG;AACtB,WACE,6CAAC,SAAI,WAAU,aACb;AAAA,kDAAC,wCAAc,MAAM,6BAAS,SAAQ,gBAAe,MAAK,4DAA2D;AAAA,MACrH,4CAAC,SAAI,WAAU,eAAc,sDAAC,YAAAA,SAAA,EAAK,MAAM,YAAY,WAAU,sCAAqC,2BAAa,GAAO;AAAA,OAC1H;AAAA,EAEJ;AACA,SAAO,4CAAC,6BAAS,OAAc,KAAU,QAAM,MAAC;AAClD;","names":["Link"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
3
|
+
|
|
4
|
+
declare function MyDrops({ getClient, walletAddress, onRequireWallet, connectLabel, createHref, }: {
|
|
5
|
+
getClient: () => MedialaneClient;
|
|
6
|
+
walletAddress: string | null;
|
|
7
|
+
onRequireWallet: () => void;
|
|
8
|
+
connectLabel?: string;
|
|
9
|
+
createHref?: string;
|
|
10
|
+
}): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { MyDrops };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { MedialaneClient } from '@medialane/sdk/starknet';
|
|
3
|
+
|
|
4
|
+
declare function MyDrops({ getClient, walletAddress, onRequireWallet, connectLabel, createHref, }: {
|
|
5
|
+
getClient: () => MedialaneClient;
|
|
6
|
+
walletAddress: string | null;
|
|
7
|
+
onRequireWallet: () => void;
|
|
8
|
+
connectLabel?: string;
|
|
9
|
+
createHref?: string;
|
|
10
|
+
}): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { MyDrops };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Package } from "lucide-react";
|
|
4
|
+
import Link from "../link.js";
|
|
5
|
+
import { Button } from "../button.js";
|
|
6
|
+
import { TabEmptyState } from "../tab-empty-state.js";
|
|
7
|
+
import { DropGrid, DropGridSkeleton } from "./drop-card.js";
|
|
8
|
+
import { useMyDrops } from "../../utils/use-drops.js";
|
|
9
|
+
import { useNow } from "../../utils/drop/use-now.js";
|
|
10
|
+
function MyDrops({
|
|
11
|
+
getClient,
|
|
12
|
+
walletAddress,
|
|
13
|
+
onRequireWallet,
|
|
14
|
+
connectLabel = "Sign in",
|
|
15
|
+
createHref = "/launchpad/drop/create"
|
|
16
|
+
}) {
|
|
17
|
+
const { drops, isLoading } = useMyDrops(getClient, walletAddress);
|
|
18
|
+
const now = useNow(6e4);
|
|
19
|
+
if (!walletAddress) {
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4 py-16 text-center", children: [
|
|
21
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: "Sign in to see the drops you launched." }),
|
|
22
|
+
/* @__PURE__ */ jsx(Button, { onClick: onRequireWallet, children: connectLabel })
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
if (isLoading) return /* @__PURE__ */ jsx(DropGridSkeleton, {});
|
|
26
|
+
if (drops.length === 0) {
|
|
27
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
28
|
+
/* @__PURE__ */ jsx(TabEmptyState, { icon: Package, heading: "No drops yet", body: "Launch an edition or a collection and it will show here." }),
|
|
29
|
+
/* @__PURE__ */ jsx("div", { className: "text-center", children: /* @__PURE__ */ jsx(Link, { href: createHref, className: "text-sm font-semibold text-primary", children: "Create a drop" }) })
|
|
30
|
+
] });
|
|
31
|
+
}
|
|
32
|
+
return /* @__PURE__ */ jsx(DropGrid, { drops, now, manage: true });
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
MyDrops
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=my-drops.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/drop/my-drops.tsx"],"sourcesContent":["\"use client\";\n\nimport { Package } from \"lucide-react\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport Link from \"../link.js\";\nimport { Button } from \"../button.js\";\nimport { TabEmptyState } from \"../tab-empty-state.js\";\nimport { DropGrid, DropGridSkeleton } from \"./drop-card.js\";\nimport { useMyDrops } from \"../../utils/use-drops.js\";\nimport { useNow } from \"../../utils/drop/use-now.js\";\n\nexport function MyDrops({\n getClient, walletAddress, onRequireWallet, connectLabel = \"Sign in\", createHref = \"/launchpad/drop/create\",\n}: {\n getClient: () => MedialaneClient;\n walletAddress: string | null;\n onRequireWallet: () => void;\n connectLabel?: string;\n createHref?: string;\n}) {\n const { drops, isLoading } = useMyDrops(getClient, walletAddress);\n const now = useNow(60_000);\n if (!walletAddress) {\n return (\n <div className=\"space-y-4 py-16 text-center\">\n <p className=\"text-sm text-muted-foreground\">Sign in to see the drops you launched.</p>\n <Button onClick={onRequireWallet}>{connectLabel}</Button>\n </div>\n );\n }\n if (isLoading) return <DropGridSkeleton />;\n if (drops.length === 0) {\n return (\n <div className=\"space-y-4\">\n <TabEmptyState icon={Package} heading=\"No drops yet\" body=\"Launch an edition or a collection and it will show here.\" />\n <div className=\"text-center\"><Link href={createHref} className=\"text-sm font-semibold text-primary\">Create a drop</Link></div>\n </div>\n );\n }\n return <DropGrid drops={drops} now={now} manage />;\n}\n"],"mappings":";AAwBM,SACE,KADF;AAtBN,SAAS,eAAe;AAExB,OAAO,UAAU;AACjB,SAAS,cAAc;AACvB,SAAS,qBAAqB;AAC9B,SAAS,UAAU,wBAAwB;AAC3C,SAAS,kBAAkB;AAC3B,SAAS,cAAc;AAEhB,SAAS,QAAQ;AAAA,EACtB;AAAA,EAAW;AAAA,EAAe;AAAA,EAAiB,eAAe;AAAA,EAAW,aAAa;AACpF,GAMG;AACD,QAAM,EAAE,OAAO,UAAU,IAAI,WAAW,WAAW,aAAa;AAChE,QAAM,MAAM,OAAO,GAAM;AACzB,MAAI,CAAC,eAAe;AAClB,WACE,qBAAC,SAAI,WAAU,+BACb;AAAA,0BAAC,OAAE,WAAU,iCAAgC,oDAAsC;AAAA,MACnF,oBAAC,UAAO,SAAS,iBAAkB,wBAAa;AAAA,OAClD;AAAA,EAEJ;AACA,MAAI,UAAW,QAAO,oBAAC,oBAAiB;AACxC,MAAI,MAAM,WAAW,GAAG;AACtB,WACE,qBAAC,SAAI,WAAU,aACb;AAAA,0BAAC,iBAAc,MAAM,SAAS,SAAQ,gBAAe,MAAK,4DAA2D;AAAA,MACrH,oBAAC,SAAI,WAAU,eAAc,8BAAC,QAAK,MAAM,YAAY,WAAU,sCAAqC,2BAAa,GAAO;AAAA,OAC1H;AAAA,EAEJ;AACA,SAAO,oBAAC,YAAS,OAAc,KAAU,QAAM,MAAC;AAClD;","names":[]}
|
|
@@ -0,0 +1,63 @@
|
|
|
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 drop_action_box_exports = {};
|
|
21
|
+
__export(drop_action_box_exports, {
|
|
22
|
+
DropActionBox: () => DropActionBox
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(drop_action_box_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_lucide_react = require("lucide-react");
|
|
27
|
+
var import_drop_countdown = require("../../drop-countdown.js");
|
|
28
|
+
var import_drop_status = require("../drop-status.js");
|
|
29
|
+
var import_gradient_button = require("../../gradient-button.js");
|
|
30
|
+
function DropActionBox({ view, minted, maxSupply, quantity, onQuantity, onAction }) {
|
|
31
|
+
const canPick = view.button.action === "mint" && view.maxQuantity > 1n;
|
|
32
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-5 rounded-2xl border border-border bg-card p-5", children: [
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between gap-3", children: [
|
|
34
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_status.DropStatusBadge, { phase: view.phase }),
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-xs text-muted-foreground", children: view.statusText })
|
|
36
|
+
] }),
|
|
37
|
+
view.countdown && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_countdown.DropCountdown, { targetTs: view.countdown.target, label: view.countdown.label }),
|
|
38
|
+
maxSupply > 0n ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_status.DropSupplyProgress, { minted: Number(minted), max: Number(maxSupply) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm text-muted-foreground", children: [
|
|
39
|
+
Number(minted).toLocaleString("en-US"),
|
|
40
|
+
" minted"
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-end justify-between gap-3", children: [
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: "Price" }),
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xl font-bold", children: view.priceText })
|
|
46
|
+
] }),
|
|
47
|
+
canPick && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2", "aria-label": "Quantity", children: [
|
|
48
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: "Quantity" }),
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "rounded-md border border-border p-2", disabled: quantity <= 1n, onClick: () => onQuantity(quantity - 1n), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Minus, { className: "h-3.5 w-3.5" }) }),
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "w-8 text-center font-semibold tabular-nums", children: quantity.toString() }),
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { type: "button", className: "rounded-md border border-border p-2", disabled: quantity >= view.maxQuantity, onClick: () => onQuantity(quantity + 1n), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Plus, { className: "h-3.5 w-3.5" }) })
|
|
52
|
+
] })
|
|
53
|
+
] }),
|
|
54
|
+
view.totalText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground", children: view.totalText }),
|
|
55
|
+
view.eligibility && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm", children: view.eligibility }),
|
|
56
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_gradient_button.GradientButton, { big: true, disabled: view.button.action === "none", onClick: onAction, className: "disabled:opacity-50", children: view.button.label })
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
DropActionBox
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=drop-action-box.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/drop/page/drop-action-box.tsx"],"sourcesContent":["\"use client\";\n\nimport { Minus, Plus } from \"lucide-react\";\nimport { DropCountdown } from \"../../drop-countdown.js\";\nimport { DropStatusBadge, DropSupplyProgress } from \"../drop-status.js\";\nimport { GradientButton } from \"../../gradient-button.js\";\nimport type { ActionBoxView } from \"../../../utils/drop/view.js\";\n\nexport interface DropActionBoxProps {\n view: ActionBoxView;\n minted: bigint;\n maxSupply: bigint;\n quantity: bigint;\n onQuantity: (q: bigint) => void;\n onAction: () => void;\n}\n\nexport function DropActionBox({ view, minted, maxSupply, quantity, onQuantity, onAction }: DropActionBoxProps) {\n const canPick = view.button.action === \"mint\" && view.maxQuantity > 1n;\n return (\n <div className=\"space-y-5 rounded-2xl border border-border bg-card p-5\">\n <div className=\"flex items-center justify-between gap-3\">\n <DropStatusBadge phase={view.phase} />\n <span className=\"text-xs text-muted-foreground\">{view.statusText}</span>\n </div>\n {view.countdown && <DropCountdown targetTs={view.countdown.target} label={view.countdown.label} />}\n {maxSupply > 0n\n ? <DropSupplyProgress minted={Number(minted)} max={Number(maxSupply)} />\n : <p className=\"text-sm text-muted-foreground\">{Number(minted).toLocaleString(\"en-US\")} minted</p>}\n <div className=\"flex items-end justify-between gap-3\">\n <div>\n <p className=\"text-xs text-muted-foreground\">Price</p>\n <p className=\"text-xl font-bold\">{view.priceText}</p>\n </div>\n {canPick && (\n <div className=\"flex items-center gap-2\" aria-label=\"Quantity\">\n <span className=\"sr-only\">Quantity</span>\n <button type=\"button\" className=\"rounded-md border border-border p-2\" disabled={quantity <= 1n} onClick={() => onQuantity(quantity - 1n)}><Minus className=\"h-3.5 w-3.5\" /></button>\n <span className=\"w-8 text-center font-semibold tabular-nums\">{quantity.toString()}</span>\n <button type=\"button\" className=\"rounded-md border border-border p-2\" disabled={quantity >= view.maxQuantity} onClick={() => onQuantity(quantity + 1n)}><Plus className=\"h-3.5 w-3.5\" /></button>\n </div>\n )}\n </div>\n {view.totalText && <p className=\"text-sm text-muted-foreground\">{view.totalText}</p>}\n {view.eligibility && <p className=\"text-sm\">{view.eligibility}</p>}\n <GradientButton big disabled={view.button.action === \"none\"} onClick={onAction} className=\"disabled:opacity-50\">\n {view.button.label}\n </GradientButton>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBM;AAnBN,0BAA4B;AAC5B,4BAA8B;AAC9B,yBAAoD;AACpD,6BAA+B;AAYxB,SAAS,cAAc,EAAE,MAAM,QAAQ,WAAW,UAAU,YAAY,SAAS,GAAuB;AAC7G,QAAM,UAAU,KAAK,OAAO,WAAW,UAAU,KAAK,cAAc;AACpE,SACE,6CAAC,SAAI,WAAU,0DACb;AAAA,iDAAC,SAAI,WAAU,2CACb;AAAA,kDAAC,sCAAgB,OAAO,KAAK,OAAO;AAAA,MACpC,4CAAC,UAAK,WAAU,iCAAiC,eAAK,YAAW;AAAA,OACnE;AAAA,IACC,KAAK,aAAa,4CAAC,uCAAc,UAAU,KAAK,UAAU,QAAQ,OAAO,KAAK,UAAU,OAAO;AAAA,IAC/F,YAAY,KACT,4CAAC,yCAAmB,QAAQ,OAAO,MAAM,GAAG,KAAK,OAAO,SAAS,GAAG,IACpE,6CAAC,OAAE,WAAU,iCAAiC;AAAA,aAAO,MAAM,EAAE,eAAe,OAAO;AAAA,MAAE;AAAA,OAAO;AAAA,IAChG,6CAAC,SAAI,WAAU,wCACb;AAAA,mDAAC,SACC;AAAA,oDAAC,OAAE,WAAU,iCAAgC,mBAAK;AAAA,QAClD,4CAAC,OAAE,WAAU,qBAAqB,eAAK,WAAU;AAAA,SACnD;AAAA,MACC,WACC,6CAAC,SAAI,WAAU,2BAA0B,cAAW,YAClD;AAAA,oDAAC,UAAK,WAAU,WAAU,sBAAQ;AAAA,QAClC,4CAAC,YAAO,MAAK,UAAS,WAAU,uCAAsC,UAAU,YAAY,IAAI,SAAS,MAAM,WAAW,WAAW,EAAE,GAAG,sDAAC,6BAAM,WAAU,eAAc,GAAE;AAAA,QAC3K,4CAAC,UAAK,WAAU,8CAA8C,mBAAS,SAAS,GAAE;AAAA,QAClF,4CAAC,YAAO,MAAK,UAAS,WAAU,uCAAsC,UAAU,YAAY,KAAK,aAAa,SAAS,MAAM,WAAW,WAAW,EAAE,GAAG,sDAAC,4BAAK,WAAU,eAAc,GAAE;AAAA,SAC1L;AAAA,OAEJ;AAAA,IACC,KAAK,aAAa,4CAAC,OAAE,WAAU,iCAAiC,eAAK,WAAU;AAAA,IAC/E,KAAK,eAAe,4CAAC,OAAE,WAAU,WAAW,eAAK,aAAY;AAAA,IAC9D,4CAAC,yCAAe,KAAG,MAAC,UAAU,KAAK,OAAO,WAAW,QAAQ,SAAS,UAAU,WAAU,uBACvF,eAAK,OAAO,OACf;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ActionBoxView } from '../../../utils/drop/view.cjs';
|
|
3
|
+
import '@medialane/sdk/starknet';
|
|
4
|
+
|
|
5
|
+
interface DropActionBoxProps {
|
|
6
|
+
view: ActionBoxView;
|
|
7
|
+
minted: bigint;
|
|
8
|
+
maxSupply: bigint;
|
|
9
|
+
quantity: bigint;
|
|
10
|
+
onQuantity: (q: bigint) => void;
|
|
11
|
+
onAction: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare function DropActionBox({ view, minted, maxSupply, quantity, onQuantity, onAction }: DropActionBoxProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { DropActionBox, type DropActionBoxProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ActionBoxView } from '../../../utils/drop/view.js';
|
|
3
|
+
import '@medialane/sdk/starknet';
|
|
4
|
+
|
|
5
|
+
interface DropActionBoxProps {
|
|
6
|
+
view: ActionBoxView;
|
|
7
|
+
minted: bigint;
|
|
8
|
+
maxSupply: bigint;
|
|
9
|
+
quantity: bigint;
|
|
10
|
+
onQuantity: (q: bigint) => void;
|
|
11
|
+
onAction: () => void;
|
|
12
|
+
}
|
|
13
|
+
declare function DropActionBox({ view, minted, maxSupply, quantity, onQuantity, onAction }: DropActionBoxProps): react_jsx_runtime.JSX.Element;
|
|
14
|
+
|
|
15
|
+
export { DropActionBox, type DropActionBoxProps };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Minus, Plus } from "lucide-react";
|
|
4
|
+
import { DropCountdown } from "../../drop-countdown.js";
|
|
5
|
+
import { DropStatusBadge, DropSupplyProgress } from "../drop-status.js";
|
|
6
|
+
import { GradientButton } from "../../gradient-button.js";
|
|
7
|
+
function DropActionBox({ view, minted, maxSupply, quantity, onQuantity, onAction }) {
|
|
8
|
+
const canPick = view.button.action === "mint" && view.maxQuantity > 1n;
|
|
9
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-5 rounded-2xl border border-border bg-card p-5", children: [
|
|
10
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
11
|
+
/* @__PURE__ */ jsx(DropStatusBadge, { phase: view.phase }),
|
|
12
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground", children: view.statusText })
|
|
13
|
+
] }),
|
|
14
|
+
view.countdown && /* @__PURE__ */ jsx(DropCountdown, { targetTs: view.countdown.target, label: view.countdown.label }),
|
|
15
|
+
maxSupply > 0n ? /* @__PURE__ */ jsx(DropSupplyProgress, { minted: Number(minted), max: Number(maxSupply) }) : /* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground", children: [
|
|
16
|
+
Number(minted).toLocaleString("en-US"),
|
|
17
|
+
" minted"
|
|
18
|
+
] }),
|
|
19
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-end justify-between gap-3", children: [
|
|
20
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
21
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "Price" }),
|
|
22
|
+
/* @__PURE__ */ jsx("p", { className: "text-xl font-bold", children: view.priceText })
|
|
23
|
+
] }),
|
|
24
|
+
canPick && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", "aria-label": "Quantity", children: [
|
|
25
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Quantity" }),
|
|
26
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "rounded-md border border-border p-2", disabled: quantity <= 1n, onClick: () => onQuantity(quantity - 1n), children: /* @__PURE__ */ jsx(Minus, { className: "h-3.5 w-3.5" }) }),
|
|
27
|
+
/* @__PURE__ */ jsx("span", { className: "w-8 text-center font-semibold tabular-nums", children: quantity.toString() }),
|
|
28
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "rounded-md border border-border p-2", disabled: quantity >= view.maxQuantity, onClick: () => onQuantity(quantity + 1n), children: /* @__PURE__ */ jsx(Plus, { className: "h-3.5 w-3.5" }) })
|
|
29
|
+
] })
|
|
30
|
+
] }),
|
|
31
|
+
view.totalText && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: view.totalText }),
|
|
32
|
+
view.eligibility && /* @__PURE__ */ jsx("p", { className: "text-sm", children: view.eligibility }),
|
|
33
|
+
/* @__PURE__ */ jsx(GradientButton, { big: true, disabled: view.button.action === "none", onClick: onAction, className: "disabled:opacity-50", children: view.button.label })
|
|
34
|
+
] });
|
|
35
|
+
}
|
|
36
|
+
export {
|
|
37
|
+
DropActionBox
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=drop-action-box.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/drop/page/drop-action-box.tsx"],"sourcesContent":["\"use client\";\n\nimport { Minus, Plus } from \"lucide-react\";\nimport { DropCountdown } from \"../../drop-countdown.js\";\nimport { DropStatusBadge, DropSupplyProgress } from \"../drop-status.js\";\nimport { GradientButton } from \"../../gradient-button.js\";\nimport type { ActionBoxView } from \"../../../utils/drop/view.js\";\n\nexport interface DropActionBoxProps {\n view: ActionBoxView;\n minted: bigint;\n maxSupply: bigint;\n quantity: bigint;\n onQuantity: (q: bigint) => void;\n onAction: () => void;\n}\n\nexport function DropActionBox({ view, minted, maxSupply, quantity, onQuantity, onAction }: DropActionBoxProps) {\n const canPick = view.button.action === \"mint\" && view.maxQuantity > 1n;\n return (\n <div className=\"space-y-5 rounded-2xl border border-border bg-card p-5\">\n <div className=\"flex items-center justify-between gap-3\">\n <DropStatusBadge phase={view.phase} />\n <span className=\"text-xs text-muted-foreground\">{view.statusText}</span>\n </div>\n {view.countdown && <DropCountdown targetTs={view.countdown.target} label={view.countdown.label} />}\n {maxSupply > 0n\n ? <DropSupplyProgress minted={Number(minted)} max={Number(maxSupply)} />\n : <p className=\"text-sm text-muted-foreground\">{Number(minted).toLocaleString(\"en-US\")} minted</p>}\n <div className=\"flex items-end justify-between gap-3\">\n <div>\n <p className=\"text-xs text-muted-foreground\">Price</p>\n <p className=\"text-xl font-bold\">{view.priceText}</p>\n </div>\n {canPick && (\n <div className=\"flex items-center gap-2\" aria-label=\"Quantity\">\n <span className=\"sr-only\">Quantity</span>\n <button type=\"button\" className=\"rounded-md border border-border p-2\" disabled={quantity <= 1n} onClick={() => onQuantity(quantity - 1n)}><Minus className=\"h-3.5 w-3.5\" /></button>\n <span className=\"w-8 text-center font-semibold tabular-nums\">{quantity.toString()}</span>\n <button type=\"button\" className=\"rounded-md border border-border p-2\" disabled={quantity >= view.maxQuantity} onClick={() => onQuantity(quantity + 1n)}><Plus className=\"h-3.5 w-3.5\" /></button>\n </div>\n )}\n </div>\n {view.totalText && <p className=\"text-sm text-muted-foreground\">{view.totalText}</p>}\n {view.eligibility && <p className=\"text-sm\">{view.eligibility}</p>}\n <GradientButton big disabled={view.button.action === \"none\"} onClick={onAction} className=\"disabled:opacity-50\">\n {view.button.label}\n </GradientButton>\n </div>\n );\n}\n"],"mappings":";AAqBM,SACE,KADF;AAnBN,SAAS,OAAO,YAAY;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,iBAAiB,0BAA0B;AACpD,SAAS,sBAAsB;AAYxB,SAAS,cAAc,EAAE,MAAM,QAAQ,WAAW,UAAU,YAAY,SAAS,GAAuB;AAC7G,QAAM,UAAU,KAAK,OAAO,WAAW,UAAU,KAAK,cAAc;AACpE,SACE,qBAAC,SAAI,WAAU,0DACb;AAAA,yBAAC,SAAI,WAAU,2CACb;AAAA,0BAAC,mBAAgB,OAAO,KAAK,OAAO;AAAA,MACpC,oBAAC,UAAK,WAAU,iCAAiC,eAAK,YAAW;AAAA,OACnE;AAAA,IACC,KAAK,aAAa,oBAAC,iBAAc,UAAU,KAAK,UAAU,QAAQ,OAAO,KAAK,UAAU,OAAO;AAAA,IAC/F,YAAY,KACT,oBAAC,sBAAmB,QAAQ,OAAO,MAAM,GAAG,KAAK,OAAO,SAAS,GAAG,IACpE,qBAAC,OAAE,WAAU,iCAAiC;AAAA,aAAO,MAAM,EAAE,eAAe,OAAO;AAAA,MAAE;AAAA,OAAO;AAAA,IAChG,qBAAC,SAAI,WAAU,wCACb;AAAA,2BAAC,SACC;AAAA,4BAAC,OAAE,WAAU,iCAAgC,mBAAK;AAAA,QAClD,oBAAC,OAAE,WAAU,qBAAqB,eAAK,WAAU;AAAA,SACnD;AAAA,MACC,WACC,qBAAC,SAAI,WAAU,2BAA0B,cAAW,YAClD;AAAA,4BAAC,UAAK,WAAU,WAAU,sBAAQ;AAAA,QAClC,oBAAC,YAAO,MAAK,UAAS,WAAU,uCAAsC,UAAU,YAAY,IAAI,SAAS,MAAM,WAAW,WAAW,EAAE,GAAG,8BAAC,SAAM,WAAU,eAAc,GAAE;AAAA,QAC3K,oBAAC,UAAK,WAAU,8CAA8C,mBAAS,SAAS,GAAE;AAAA,QAClF,oBAAC,YAAO,MAAK,UAAS,WAAU,uCAAsC,UAAU,YAAY,KAAK,aAAa,SAAS,MAAM,WAAW,WAAW,EAAE,GAAG,8BAAC,QAAK,WAAU,eAAc,GAAE;AAAA,SAC1L;AAAA,OAEJ;AAAA,IACC,KAAK,aAAa,oBAAC,OAAE,WAAU,iCAAiC,eAAK,WAAU;AAAA,IAC/E,KAAK,eAAe,oBAAC,OAAE,WAAU,WAAW,eAAK,aAAY;AAAA,IAC9D,oBAAC,kBAAe,KAAG,MAAC,UAAU,KAAK,OAAO,WAAW,QAAQ,SAAS,UAAU,WAAU,uBACvF,eAAK,OAAO,OACf;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 drop_activity_exports = {};
|
|
21
|
+
__export(drop_activity_exports, {
|
|
22
|
+
DropActivityList: () => DropActivityList
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(drop_activity_exports);
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import_address_display = require("../../address-display.js");
|
|
27
|
+
var import_time = require("../../../utils/time.js");
|
|
28
|
+
function DropActivityList({ mints }) {
|
|
29
|
+
if (mints.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "py-8 text-center text-sm text-muted-foreground", children: "No mints yet." });
|
|
30
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ul", { className: "divide-y divide-border/60", children: mints.map((m) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("li", { className: "flex items-center justify-between gap-3 py-3 text-sm", children: [
|
|
31
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
32
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address: m.wallet, chars: 4, showCopy: false }),
|
|
33
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground", children: m.kind === "claim" ? `minted ${m.quantity}` : `received ${m.quantity} as a gift` })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "shrink-0 text-xs text-muted-foreground", children: (0, import_time.timeAgo)(m.createdAt) })
|
|
36
|
+
] }, `${m.txHash}-${m.firstTokenId}`)) });
|
|
37
|
+
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
DropActivityList
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=drop-activity.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/drop/page/drop-activity.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ApiDropMint } from \"@medialane/sdk\";\nimport { AddressDisplay } from \"../../address-display.js\";\nimport { timeAgo } from \"../../../utils/time.js\";\n\nexport function DropActivityList({ mints }: { mints: ApiDropMint[] }) {\n if (mints.length === 0) return <p className=\"py-8 text-center text-sm text-muted-foreground\">No mints yet.</p>;\n return (\n <ul className=\"divide-y divide-border/60\">\n {mints.map((m) => (\n <li key={`${m.txHash}-${m.firstTokenId}`} className=\"flex items-center justify-between gap-3 py-3 text-sm\">\n <span className=\"flex min-w-0 items-center gap-1.5\">\n <AddressDisplay address={m.wallet} chars={4} showCopy={false} />\n <span className=\"text-muted-foreground\">{m.kind === \"claim\" ? `minted ${m.quantity}` : `received ${m.quantity} as a gift`}</span>\n </span>\n <span className=\"shrink-0 text-xs text-muted-foreground\">{timeAgo(m.createdAt)}</span>\n </li>\n ))}\n </ul>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOiC;AAJjC,6BAA+B;AAC/B,kBAAwB;AAEjB,SAAS,iBAAiB,EAAE,MAAM,GAA6B;AACpE,MAAI,MAAM,WAAW,EAAG,QAAO,4CAAC,OAAE,WAAU,kDAAiD,2BAAa;AAC1G,SACE,4CAAC,QAAG,WAAU,6BACX,gBAAM,IAAI,CAAC,MACV,6CAAC,QAAyC,WAAU,wDAClD;AAAA,iDAAC,UAAK,WAAU,qCACd;AAAA,kDAAC,yCAAe,SAAS,EAAE,QAAQ,OAAO,GAAG,UAAU,OAAO;AAAA,MAC9D,4CAAC,UAAK,WAAU,yBAAyB,YAAE,SAAS,UAAU,UAAU,EAAE,QAAQ,KAAK,YAAY,EAAE,QAAQ,cAAa;AAAA,OAC5H;AAAA,IACA,4CAAC,UAAK,WAAU,0CAA0C,mCAAQ,EAAE,SAAS,GAAE;AAAA,OALxE,GAAG,EAAE,MAAM,IAAI,EAAE,YAAY,EAMtC,CACD,GACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { AddressDisplay } from "../../address-display.js";
|
|
4
|
+
import { timeAgo } from "../../../utils/time.js";
|
|
5
|
+
function DropActivityList({ mints }) {
|
|
6
|
+
if (mints.length === 0) return /* @__PURE__ */ jsx("p", { className: "py-8 text-center text-sm text-muted-foreground", children: "No mints yet." });
|
|
7
|
+
return /* @__PURE__ */ jsx("ul", { className: "divide-y divide-border/60", children: mints.map((m) => /* @__PURE__ */ jsxs("li", { className: "flex items-center justify-between gap-3 py-3 text-sm", children: [
|
|
8
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
|
|
9
|
+
/* @__PURE__ */ jsx(AddressDisplay, { address: m.wallet, chars: 4, showCopy: false }),
|
|
10
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: m.kind === "claim" ? `minted ${m.quantity}` : `received ${m.quantity} as a gift` })
|
|
11
|
+
] }),
|
|
12
|
+
/* @__PURE__ */ jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: timeAgo(m.createdAt) })
|
|
13
|
+
] }, `${m.txHash}-${m.firstTokenId}`)) });
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
DropActivityList
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=drop-activity.js.map
|