@medialane/ui 0.286.0 → 0.287.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/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/collection-settings.cjs +350 -0
- package/dist/components/collection-settings.cjs.map +1 -0
- package/dist/components/collection-settings.d.cts +7 -0
- package/dist/components/collection-settings.d.ts +7 -0
- package/dist/components/collection-settings.js +335 -0
- package/dist/components/collection-settings.js.map +1 -0
- package/dist/components/collection-slug-claim.cjs +219 -0
- package/dist/components/collection-slug-claim.cjs.map +1 -0
- package/dist/components/collection-slug-claim.d.cts +10 -0
- package/dist/components/collection-slug-claim.d.ts +10 -0
- package/dist/components/collection-slug-claim.js +185 -0
- package/dist/components/collection-slug-claim.js.map +1 -0
- package/dist/components/fast-mint/fast-mint.d.cts +2 -2
- package/dist/components/fast-mint/fast-mint.d.ts +2 -2
- package/dist/components/medialane-app.cjs.map +1 -1
- package/dist/components/medialane-app.d.cts +1 -0
- package/dist/components/medialane-app.d.ts +1 -0
- package/dist/components/medialane-app.js.map +1 -1
- package/dist/components/settings-section.cjs +65 -0
- package/dist/components/settings-section.cjs.map +1 -0
- package/dist/components/settings-section.d.cts +24 -0
- package/dist/components/settings-section.d.ts +24 -0
- package/dist/components/settings-section.js +38 -0
- package/dist/components/settings-section.js.map +1 -0
- package/dist/components/sheet.d.cts +1 -1
- package/dist/components/sheet.d.ts +1 -1
- package/dist/index.cjs +3 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/utils/collection-settings-form.cjs +77 -0
- package/dist/utils/collection-settings-form.cjs.map +1 -0
- package/dist/utils/collection-settings-form.d.cts +21 -0
- package/dist/utils/collection-settings-form.d.ts +21 -0
- package/dist/utils/collection-settings-form.js +51 -0
- package/dist/utils/collection-settings-form.js.map +1 -0
- package/dist/utils/use-collection-settings.cjs +83 -0
- package/dist/utils/use-collection-settings.cjs.map +1 -0
- package/dist/utils/use-collection-settings.d.cts +58 -0
- package/dist/utils/use-collection-settings.d.ts +58 -0
- package/dist/utils/use-collection-settings.js +59 -0
- package/dist/utils/use-collection-settings.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare function CollectionSlugClaimSection({ contract, profile, }: {
|
|
4
|
+
contract: string;
|
|
5
|
+
profile: {
|
|
6
|
+
slug?: string | null;
|
|
7
|
+
} | null;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { CollectionSlugClaimSection };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
declare function CollectionSlugClaimSection({ contract, profile, }: {
|
|
4
|
+
contract: string;
|
|
5
|
+
profile: {
|
|
6
|
+
slug?: string | null;
|
|
7
|
+
} | null;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { CollectionSlugClaimSection };
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState, useEffect, useRef } from "react";
|
|
4
|
+
import { normalizeAddress } from "@medialane/sdk";
|
|
5
|
+
import { Gem } from "lucide-react";
|
|
6
|
+
import { Button } from "./button.js";
|
|
7
|
+
import { Badge } from "./badge.js";
|
|
8
|
+
import Link from "./link.js";
|
|
9
|
+
import { useMedialaneApp } from "./medialane-app.js";
|
|
10
|
+
import { SectionCard, SectionHeader } from "./settings-section.js";
|
|
11
|
+
import { describeError } from "../utils/describe-error.js";
|
|
12
|
+
function CollectionSlugClaimSection({
|
|
13
|
+
contract,
|
|
14
|
+
profile
|
|
15
|
+
}) {
|
|
16
|
+
const { getClient, ensureSignedIn, verifyEmailHref } = useMedialaneApp();
|
|
17
|
+
const [slugInput, setSlugInput] = useState("");
|
|
18
|
+
const [checkState, setCheckState] = useState("idle");
|
|
19
|
+
const [checkReason, setCheckReason] = useState(null);
|
|
20
|
+
const [submitState, setSubmitState] = useState("idle");
|
|
21
|
+
const [submitError, setSubmitError] = useState(null);
|
|
22
|
+
const [pendingSlug, setPendingSlug] = useState(null);
|
|
23
|
+
const loadedRef = useRef(false);
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (loadedRef.current) return;
|
|
26
|
+
loadedRef.current = true;
|
|
27
|
+
(async () => {
|
|
28
|
+
try {
|
|
29
|
+
const { claims } = await getClient().api.collections.mySlugClaims();
|
|
30
|
+
const match = claims.find(
|
|
31
|
+
(c) => normalizeAddress("STARKNET", c.contractAddress) === normalizeAddress("STARKNET", contract) && c.status === "PENDING"
|
|
32
|
+
);
|
|
33
|
+
if (match) setPendingSlug(match.slug);
|
|
34
|
+
} catch {
|
|
35
|
+
}
|
|
36
|
+
})();
|
|
37
|
+
}, [contract, getClient]);
|
|
38
|
+
const handleCheck = async () => {
|
|
39
|
+
const slug = slugInput.toLowerCase().trim();
|
|
40
|
+
if (!slug) return;
|
|
41
|
+
setCheckState("checking");
|
|
42
|
+
setCheckReason(null);
|
|
43
|
+
try {
|
|
44
|
+
const result = await getClient().api.collections.slugAvailability(slug);
|
|
45
|
+
setCheckState(result.available ? "available" : "taken");
|
|
46
|
+
if (!result.available) setCheckReason(result.reason ?? "That slug is not available.");
|
|
47
|
+
} catch {
|
|
48
|
+
setCheckState("invalid");
|
|
49
|
+
setCheckReason("Unable to check availability. Try again.");
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const handleSubmit = async () => {
|
|
53
|
+
const slug = slugInput.toLowerCase().trim();
|
|
54
|
+
if (!slug || checkState !== "available") return;
|
|
55
|
+
setSubmitState("submitting");
|
|
56
|
+
setSubmitError(null);
|
|
57
|
+
try {
|
|
58
|
+
await ensureSignedIn?.();
|
|
59
|
+
const { claim } = await getClient().api.collections.submitSlugClaim(contract, slug);
|
|
60
|
+
setPendingSlug(claim.slug);
|
|
61
|
+
setSubmitState("done");
|
|
62
|
+
} catch (err) {
|
|
63
|
+
const msg = describeError(err).message;
|
|
64
|
+
setSubmitError(msg);
|
|
65
|
+
setSubmitState("error");
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
if (profile?.slug) {
|
|
69
|
+
return /* @__PURE__ */ jsxs(SectionCard, { className: "border-emerald-500/20 bg-emerald-500/[0.02]", children: [
|
|
70
|
+
/* @__PURE__ */ jsx(
|
|
71
|
+
SectionHeader,
|
|
72
|
+
{
|
|
73
|
+
icon: Gem,
|
|
74
|
+
title: "Collection URL",
|
|
75
|
+
description: `medialane.io/collection/${profile.slug}`,
|
|
76
|
+
iconClass: "text-emerald-500",
|
|
77
|
+
bgClass: "bg-emerald-500/15",
|
|
78
|
+
badge: /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-2xs h-4 px-1.5 text-emerald-600 border-emerald-500/30", children: "Active" })
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx("div", { className: "pt-1 border-t border-border", children: /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
82
|
+
"Your collection is accessible at",
|
|
83
|
+
" ",
|
|
84
|
+
/* @__PURE__ */ jsxs("span", { className: "tabular-nums text-foreground", children: [
|
|
85
|
+
"medialane.io/collection/",
|
|
86
|
+
profile.slug
|
|
87
|
+
] })
|
|
88
|
+
] }) })
|
|
89
|
+
] });
|
|
90
|
+
}
|
|
91
|
+
if (pendingSlug) {
|
|
92
|
+
return /* @__PURE__ */ jsxs(SectionCard, { className: "border-primary/20 bg-primary/[0.02]", children: [
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
SectionHeader,
|
|
95
|
+
{
|
|
96
|
+
icon: Gem,
|
|
97
|
+
title: "Claim your collection URL",
|
|
98
|
+
description: `medialane.io/collection/${pendingSlug}`,
|
|
99
|
+
iconClass: "text-primary",
|
|
100
|
+
bgClass: "bg-primary/15",
|
|
101
|
+
badge: /* @__PURE__ */ jsx(Badge, { variant: "outline", className: "text-2xs h-4 px-1.5 text-amber-600 border-amber-500/30", children: "Pending review" })
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ jsx("div", { className: "pt-1 border-t border-border", children: /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
|
|
105
|
+
"Your claim for",
|
|
106
|
+
" ",
|
|
107
|
+
/* @__PURE__ */ jsxs("span", { className: "tabular-nums text-foreground", children: [
|
|
108
|
+
"medialane.io/collection/",
|
|
109
|
+
pendingSlug
|
|
110
|
+
] }),
|
|
111
|
+
" is under review. You'll be notified once it's approved."
|
|
112
|
+
] }) })
|
|
113
|
+
] });
|
|
114
|
+
}
|
|
115
|
+
return /* @__PURE__ */ jsxs(SectionCard, { className: "border-primary/20 bg-primary/[0.02]", children: [
|
|
116
|
+
/* @__PURE__ */ jsx(
|
|
117
|
+
SectionHeader,
|
|
118
|
+
{
|
|
119
|
+
icon: Gem,
|
|
120
|
+
title: "Claim your collection URL",
|
|
121
|
+
description: "Reserve a unique URL \u2014 medialane.io/collection/your-name",
|
|
122
|
+
iconClass: "text-primary",
|
|
123
|
+
bgClass: "bg-primary/15"
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ jsxs("div", { className: "pt-3 border-t border-border space-y-3", children: [
|
|
127
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
128
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 flex items-center rounded-lg border border-border bg-muted/40 px-3 py-2", children: [
|
|
129
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-muted-foreground whitespace-nowrap shrink-0", children: "medialane.io/collection/" }),
|
|
130
|
+
/* @__PURE__ */ jsx(
|
|
131
|
+
"input",
|
|
132
|
+
{
|
|
133
|
+
type: "text",
|
|
134
|
+
className: "flex-1 bg-transparent text-xs text-foreground outline-none placeholder:text-muted-foreground/50 min-w-0",
|
|
135
|
+
placeholder: "your-name",
|
|
136
|
+
value: slugInput,
|
|
137
|
+
onChange: (e) => {
|
|
138
|
+
setSlugInput(e.target.value.toLowerCase().replace(/[^a-z0-9_-]/g, ""));
|
|
139
|
+
setCheckState("idle");
|
|
140
|
+
},
|
|
141
|
+
onKeyDown: (e) => {
|
|
142
|
+
if (e.key === "Enter") handleCheck();
|
|
143
|
+
},
|
|
144
|
+
maxLength: 20
|
|
145
|
+
}
|
|
146
|
+
)
|
|
147
|
+
] }),
|
|
148
|
+
/* @__PURE__ */ jsx(
|
|
149
|
+
Button,
|
|
150
|
+
{
|
|
151
|
+
variant: "outline",
|
|
152
|
+
size: "sm",
|
|
153
|
+
onClick: handleCheck,
|
|
154
|
+
disabled: !slugInput.trim() || checkState === "checking",
|
|
155
|
+
className: "shrink-0",
|
|
156
|
+
children: checkState === "checking" ? "Checking\u2026" : "Check"
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
] }),
|
|
160
|
+
checkState === "available" && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between gap-3", children: [
|
|
161
|
+
/* @__PURE__ */ jsxs("p", { className: "text-xs text-emerald-600 font-medium truncate", children: [
|
|
162
|
+
"\u2713 Available \u2014 ",
|
|
163
|
+
/* @__PURE__ */ jsxs("span", { className: "tabular-nums", children: [
|
|
164
|
+
"medialane.io/collection/",
|
|
165
|
+
slugInput
|
|
166
|
+
] })
|
|
167
|
+
] }),
|
|
168
|
+
/* @__PURE__ */ jsx(Button, { size: "sm", onClick: handleSubmit, disabled: submitState === "submitting", className: "shrink-0", children: submitState === "submitting" ? "Claiming\u2026" : "Claim this URL" })
|
|
169
|
+
] }),
|
|
170
|
+
(checkState === "taken" || checkState === "invalid") && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: checkReason ?? "That slug is not available." }),
|
|
171
|
+
submitState === "error" && /* @__PURE__ */ jsxs("p", { className: "text-xs text-destructive", children: [
|
|
172
|
+
submitError,
|
|
173
|
+
verifyEmailHref && submitError === "Verify your email to claim a collection." && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
174
|
+
" ",
|
|
175
|
+
/* @__PURE__ */ jsx(Link, { href: verifyEmailHref, className: "underline font-medium hover:text-foreground", children: "Verify email" })
|
|
176
|
+
] })
|
|
177
|
+
] }),
|
|
178
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: "3\u201320 characters, lowercase letters, numbers, underscores or hyphens. Claims are reviewed before going live." })
|
|
179
|
+
] })
|
|
180
|
+
] });
|
|
181
|
+
}
|
|
182
|
+
export {
|
|
183
|
+
CollectionSlugClaimSection
|
|
184
|
+
};
|
|
185
|
+
//# sourceMappingURL=collection-slug-claim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/collection-slug-claim.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, useEffect, useRef } from \"react\";\nimport { normalizeAddress } from \"@medialane/sdk\";\nimport { Gem } from \"lucide-react\";\nimport { Button } from \"./button.js\";\nimport { Badge } from \"./badge.js\";\nimport Link from \"./link.js\";\nimport { useMedialaneApp } from \"./medialane-app.js\";\nimport { SectionCard, SectionHeader } from \"./settings-section.js\";\nimport { describeError } from \"../utils/describe-error.js\";\n\nexport function CollectionSlugClaimSection({\n contract,\n profile,\n}: {\n contract: string;\n profile: { slug?: string | null } | null;\n}) {\n const { getClient, ensureSignedIn, verifyEmailHref } = useMedialaneApp();\n const [slugInput, setSlugInput] = useState(\"\");\n const [checkState, setCheckState] = useState<\"idle\" | \"checking\" | \"available\" | \"taken\" | \"invalid\">(\"idle\");\n const [checkReason, setCheckReason] = useState<string | null>(null);\n const [submitState, setSubmitState] = useState<\"idle\" | \"submitting\" | \"done\" | \"error\">(\"idle\");\n const [submitError, setSubmitError] = useState<string | null>(null);\n const [pendingSlug, setPendingSlug] = useState<string | null>(null);\n const loadedRef = useRef(false);\n\n useEffect(() => {\n if (loadedRef.current) return;\n loadedRef.current = true;\n (async () => {\n try {\n const { claims } = await getClient().api.collections.mySlugClaims();\n const match = claims.find(\n (c) => normalizeAddress(\"STARKNET\", c.contractAddress) === normalizeAddress(\"STARKNET\", contract) && c.status === \"PENDING\"\n );\n if (match) setPendingSlug(match.slug);\n } catch {}\n })();\n }, [contract, getClient]);\n\n const handleCheck = async () => {\n const slug = slugInput.toLowerCase().trim();\n if (!slug) return;\n setCheckState(\"checking\");\n setCheckReason(null);\n try {\n const result = await getClient().api.collections.slugAvailability(slug);\n setCheckState(result.available ? \"available\" : \"taken\");\n if (!result.available) setCheckReason(result.reason ?? \"That slug is not available.\");\n } catch {\n setCheckState(\"invalid\");\n setCheckReason(\"Unable to check availability. Try again.\");\n }\n };\n\n const handleSubmit = async () => {\n const slug = slugInput.toLowerCase().trim();\n if (!slug || checkState !== \"available\") return;\n setSubmitState(\"submitting\");\n setSubmitError(null);\n try {\n await ensureSignedIn?.();\n const { claim } = await getClient().api.collections.submitSlugClaim(contract, slug);\n setPendingSlug(claim.slug);\n setSubmitState(\"done\");\n } catch (err: unknown) {\n const msg = describeError(err).message;\n setSubmitError(msg);\n setSubmitState(\"error\");\n }\n };\n\n if (profile?.slug) {\n return (\n <SectionCard className=\"border-emerald-500/20 bg-emerald-500/[0.02]\">\n <SectionHeader\n icon={Gem}\n title=\"Collection URL\"\n description={`medialane.io/collection/${profile.slug}`}\n iconClass=\"text-emerald-500\"\n bgClass=\"bg-emerald-500/15\"\n badge={\n <Badge variant=\"outline\" className=\"text-2xs h-4 px-1.5 text-emerald-600 border-emerald-500/30\">\n Active\n </Badge>\n }\n />\n <div className=\"pt-1 border-t border-border\">\n <p className=\"text-xs text-muted-foreground\">\n Your collection is accessible at{\" \"}\n <span className=\"tabular-nums text-foreground\">medialane.io/collection/{profile.slug}</span>\n </p>\n </div>\n </SectionCard>\n );\n }\n\n if (pendingSlug) {\n return (\n <SectionCard className=\"border-primary/20 bg-primary/[0.02]\">\n <SectionHeader\n icon={Gem}\n title=\"Claim your collection URL\"\n description={`medialane.io/collection/${pendingSlug}`}\n iconClass=\"text-primary\"\n bgClass=\"bg-primary/15\"\n badge={\n <Badge variant=\"outline\" className=\"text-2xs h-4 px-1.5 text-amber-600 border-amber-500/30\">\n Pending review\n </Badge>\n }\n />\n <div className=\"pt-1 border-t border-border\">\n <p className=\"text-xs text-muted-foreground\">\n Your claim for{\" \"}\n <span className=\"tabular-nums text-foreground\">medialane.io/collection/{pendingSlug}</span> is under\n review. You'll be notified once it's approved.\n </p>\n </div>\n </SectionCard>\n );\n }\n\n return (\n <SectionCard className=\"border-primary/20 bg-primary/[0.02]\">\n <SectionHeader\n icon={Gem}\n title=\"Claim your collection URL\"\n description=\"Reserve a unique URL — medialane.io/collection/your-name\"\n iconClass=\"text-primary\"\n bgClass=\"bg-primary/15\"\n />\n <div className=\"pt-3 border-t border-border space-y-3\">\n <div className=\"flex items-center gap-2\">\n <div className=\"flex-1 flex items-center rounded-lg border border-border bg-muted/40 px-3 py-2\">\n <span className=\"text-xs text-muted-foreground whitespace-nowrap shrink-0\">\n medialane.io/collection/\n </span>\n <input\n type=\"text\"\n className=\"flex-1 bg-transparent text-xs text-foreground outline-none placeholder:text-muted-foreground/50 min-w-0\"\n placeholder=\"your-name\"\n value={slugInput}\n onChange={(e) => {\n setSlugInput(e.target.value.toLowerCase().replace(/[^a-z0-9_-]/g, \"\"));\n setCheckState(\"idle\");\n }}\n onKeyDown={(e) => { if (e.key === \"Enter\") handleCheck(); }}\n maxLength={20}\n />\n </div>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={handleCheck}\n disabled={!slugInput.trim() || checkState === \"checking\"}\n className=\"shrink-0\"\n >\n {checkState === \"checking\" ? \"Checking…\" : \"Check\"}\n </Button>\n </div>\n\n {checkState === \"available\" && (\n <div className=\"flex items-center justify-between gap-3\">\n <p className=\"text-xs text-emerald-600 font-medium truncate\">\n ✓ Available — <span className=\"tabular-nums\">medialane.io/collection/{slugInput}</span>\n </p>\n <Button size=\"sm\" onClick={handleSubmit} disabled={submitState === \"submitting\"} className=\"shrink-0\">\n {submitState === \"submitting\" ? \"Claiming…\" : \"Claim this URL\"}\n </Button>\n </div>\n )}\n\n {(checkState === \"taken\" || checkState === \"invalid\") && (\n <p className=\"text-xs text-destructive\">{checkReason ?? \"That slug is not available.\"}</p>\n )}\n\n {submitState === \"error\" && (\n <p className=\"text-xs text-destructive\">\n {submitError}\n {verifyEmailHref && submitError === \"Verify your email to claim a collection.\" && (\n <>\n {\" \"}\n <Link href={verifyEmailHref} className=\"underline font-medium hover:text-foreground\">\n Verify email\n </Link>\n </>\n )}\n </p>\n )}\n\n <p className=\"text-xs text-muted-foreground\">\n 3–20 characters, lowercase letters, numbers, underscores or hyphens. Claims are reviewed before\n going live.\n </p>\n </div>\n </SectionCard>\n );\n}\n"],"mappings":";AAoFY,SAmGE,UAnGF,KAQA,YARA;AAlFZ,SAAS,UAAU,WAAW,cAAc;AAC5C,SAAS,wBAAwB;AACjC,SAAS,WAAW;AACpB,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,OAAO,UAAU;AACjB,SAAS,uBAAuB;AAChC,SAAS,aAAa,qBAAqB;AAC3C,SAAS,qBAAqB;AAEvB,SAAS,2BAA2B;AAAA,EACzC;AAAA,EACA;AACF,GAGG;AACD,QAAM,EAAE,WAAW,gBAAgB,gBAAgB,IAAI,gBAAgB;AACvE,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,EAAE;AAC7C,QAAM,CAAC,YAAY,aAAa,IAAI,SAAkE,MAAM;AAC5G,QAAM,CAAC,aAAa,cAAc,IAAI,SAAwB,IAAI;AAClE,QAAM,CAAC,aAAa,cAAc,IAAI,SAAmD,MAAM;AAC/F,QAAM,CAAC,aAAa,cAAc,IAAI,SAAwB,IAAI;AAClE,QAAM,CAAC,aAA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7C;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { FastMintProps } from './types.cjs';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
import '@medialane/sdk';
|
|
6
6
|
import '@medialane/sdk/starknet';
|
|
7
7
|
|
|
8
|
-
declare function FastMint(props: FastMintProps): string | number | bigint | boolean |
|
|
8
|
+
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
9
9
|
|
|
10
10
|
export { FastMint };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
3
|
import { FastMintProps } from './types.js';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
import '@medialane/sdk';
|
|
6
6
|
import '@medialane/sdk/starknet';
|
|
7
7
|
|
|
8
|
-
declare function FastMint(props: FastMintProps): string | number | bigint | boolean |
|
|
8
|
+
declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
|
|
9
9
|
|
|
10
10
|
export { FastMint };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/medialane-app.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, type ComponentType, type ElementType, type ReactNode } from \"react\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { FastMintSigner } from \"./fast-mint/types.js\";\nimport type { ApiToken } from \"@medialane/sdk\";\nimport type { ImageResolver } from \"../utils/ipfs.js\";\n\nexport type AssetRef = Pick<ApiToken, \"chain\" | \"contractAddress\" | \"tokenId\">;\n\nexport interface CompanionApp {\n title: string;\n description: string;\n icon: ElementType;\n origin: string;\n}\n\nexport type ReportTarget =\n | { type: \"TOKEN\"; contract: string; tokenId: string; name?: string }\n | { type: \"COLLECTION\"; contract: string; name?: string }\n | { type: \"CREATOR\"; address: string; name?: string }\n | { type: \"COMMENT\"; commentId: string };\n\nexport type ReportDialogSlot = ComponentType<{ open: boolean; onOpenChange: (open: boolean) => void; target: ReportTarget }>;\n\nexport interface MedialaneApp {\n getClient: () => MedialaneClient;\n getSigner: () => Promise<FastMintSigner> | FastMintSigner;\n walletAddress: string | null;\n walletLoading?: boolean;\n onRequireWallet: () => void;\n releaseSigner?: () => void;\n ensureSignedIn?: () => Promise<void>;\n connectLabel?: string;\n companion?: CompanionApp;\n ReportDialog?: ReportDialogSlot;\n resolveImage?: ImageResolver;\n}\n\nexport const MedialaneAppContext = createContext<MedialaneApp | null>(null);\n\nexport function MedialaneAppProvider({ value, children }: { value: MedialaneApp; children: ReactNode }) {\n return <MedialaneAppContext.Provider value={value}>{children}</MedialaneAppContext.Provider>;\n}\n\nexport function useMedialaneApp(): MedialaneApp {\n const app = useContext(MedialaneAppContext);\n if (!app) throw new Error(\"MedialaneAppProvider missing\");\n return app;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../../src/components/medialane-app.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, type ComponentType, type ElementType, type ReactNode } from \"react\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { FastMintSigner } from \"./fast-mint/types.js\";\nimport type { ApiToken } from \"@medialane/sdk\";\nimport type { ImageResolver } from \"../utils/ipfs.js\";\n\nexport type AssetRef = Pick<ApiToken, \"chain\" | \"contractAddress\" | \"tokenId\">;\n\nexport interface CompanionApp {\n title: string;\n description: string;\n icon: ElementType;\n origin: string;\n}\n\nexport type ReportTarget =\n | { type: \"TOKEN\"; contract: string; tokenId: string; name?: string }\n | { type: \"COLLECTION\"; contract: string; name?: string }\n | { type: \"CREATOR\"; address: string; name?: string }\n | { type: \"COMMENT\"; commentId: string };\n\nexport type ReportDialogSlot = ComponentType<{ open: boolean; onOpenChange: (open: boolean) => void; target: ReportTarget }>;\n\nexport interface MedialaneApp {\n getClient: () => MedialaneClient;\n getSigner: () => Promise<FastMintSigner> | FastMintSigner;\n walletAddress: string | null;\n walletLoading?: boolean;\n onRequireWallet: () => void;\n releaseSigner?: () => void;\n ensureSignedIn?: () => Promise<void>;\n connectLabel?: string;\n verifyEmailHref?: string;\n companion?: CompanionApp;\n ReportDialog?: ReportDialogSlot;\n resolveImage?: ImageResolver;\n}\n\nexport const MedialaneAppContext = createContext<MedialaneApp | null>(null);\n\nexport function MedialaneAppProvider({ value, children }: { value: MedialaneApp; children: ReactNode }) {\n return <MedialaneAppContext.Provider value={value}>{children}</MedialaneAppContext.Provider>;\n}\n\nexport function useMedialaneApp(): MedialaneApp {\n const app = useContext(MedialaneAppContext);\n if (!app) throw new Error(\"MedialaneAppProvider missing\");\n return app;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2CS;AAzCT,mBAAgG;AAsCzF,MAAM,0BAAsB,4BAAmC,IAAI;AAEnE,SAAS,qBAAqB,EAAE,OAAO,SAAS,GAAiD;AACtG,SAAO,4CAAC,oBAAoB,UAApB,EAA6B,OAAe,UAAS;AAC/D;AAEO,SAAS,kBAAgC;AAC9C,QAAM,UAAM,yBAAW,mBAAmB;AAC1C,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,8BAA8B;AACxD,SAAO;AACT;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/medialane-app.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, type ComponentType, type ElementType, type ReactNode } from \"react\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { FastMintSigner } from \"./fast-mint/types.js\";\nimport type { ApiToken } from \"@medialane/sdk\";\nimport type { ImageResolver } from \"../utils/ipfs.js\";\n\nexport type AssetRef = Pick<ApiToken, \"chain\" | \"contractAddress\" | \"tokenId\">;\n\nexport interface CompanionApp {\n title: string;\n description: string;\n icon: ElementType;\n origin: string;\n}\n\nexport type ReportTarget =\n | { type: \"TOKEN\"; contract: string; tokenId: string; name?: string }\n | { type: \"COLLECTION\"; contract: string; name?: string }\n | { type: \"CREATOR\"; address: string; name?: string }\n | { type: \"COMMENT\"; commentId: string };\n\nexport type ReportDialogSlot = ComponentType<{ open: boolean; onOpenChange: (open: boolean) => void; target: ReportTarget }>;\n\nexport interface MedialaneApp {\n getClient: () => MedialaneClient;\n getSigner: () => Promise<FastMintSigner> | FastMintSigner;\n walletAddress: string | null;\n walletLoading?: boolean;\n onRequireWallet: () => void;\n releaseSigner?: () => void;\n ensureSignedIn?: () => Promise<void>;\n connectLabel?: string;\n companion?: CompanionApp;\n ReportDialog?: ReportDialogSlot;\n resolveImage?: ImageResolver;\n}\n\nexport const MedialaneAppContext = createContext<MedialaneApp | null>(null);\n\nexport function MedialaneAppProvider({ value, children }: { value: MedialaneApp; children: ReactNode }) {\n return <MedialaneAppContext.Provider value={value}>{children}</MedialaneAppContext.Provider>;\n}\n\nexport function useMedialaneApp(): MedialaneApp {\n const app = useContext(MedialaneAppContext);\n if (!app) throw new Error(\"MedialaneAppProvider missing\");\n return app;\n}\n"],"mappings":";
|
|
1
|
+
{"version":3,"sources":["../../src/components/medialane-app.tsx"],"sourcesContent":["\"use client\";\n\nimport { createContext, useContext, type ComponentType, type ElementType, type ReactNode } from \"react\";\nimport type { MedialaneClient } from \"@medialane/sdk/starknet\";\nimport type { FastMintSigner } from \"./fast-mint/types.js\";\nimport type { ApiToken } from \"@medialane/sdk\";\nimport type { ImageResolver } from \"../utils/ipfs.js\";\n\nexport type AssetRef = Pick<ApiToken, \"chain\" | \"contractAddress\" | \"tokenId\">;\n\nexport interface CompanionApp {\n title: string;\n description: string;\n icon: ElementType;\n origin: string;\n}\n\nexport type ReportTarget =\n | { type: \"TOKEN\"; contract: string; tokenId: string; name?: string }\n | { type: \"COLLECTION\"; contract: string; name?: string }\n | { type: \"CREATOR\"; address: string; name?: string }\n | { type: \"COMMENT\"; commentId: string };\n\nexport type ReportDialogSlot = ComponentType<{ open: boolean; onOpenChange: (open: boolean) => void; target: ReportTarget }>;\n\nexport interface MedialaneApp {\n getClient: () => MedialaneClient;\n getSigner: () => Promise<FastMintSigner> | FastMintSigner;\n walletAddress: string | null;\n walletLoading?: boolean;\n onRequireWallet: () => void;\n releaseSigner?: () => void;\n ensureSignedIn?: () => Promise<void>;\n connectLabel?: string;\n verifyEmailHref?: string;\n companion?: CompanionApp;\n ReportDialog?: ReportDialogSlot;\n resolveImage?: ImageResolver;\n}\n\nexport const MedialaneAppContext = createContext<MedialaneApp | null>(null);\n\nexport function MedialaneAppProvider({ value, children }: { value: MedialaneApp; children: ReactNode }) {\n return <MedialaneAppContext.Provider value={value}>{children}</MedialaneAppContext.Provider>;\n}\n\nexport function useMedialaneApp(): MedialaneApp {\n const app = useContext(MedialaneAppContext);\n if (!app) throw new Error(\"MedialaneAppProvider missing\");\n return app;\n}\n"],"mappings":";AA2CS;AAzCT,SAAS,eAAe,kBAAwE;AAsCzF,MAAM,sBAAsB,cAAmC,IAAI;AAEnE,SAAS,qBAAqB,EAAE,OAAO,SAAS,GAAiD;AACtG,SAAO,oBAAC,oBAAoB,UAApB,EAA6B,OAAe,UAAS;AAC/D;AAEO,SAAS,kBAAgC;AAC9C,QAAM,MAAM,WAAW,mBAAmB;AAC1C,MAAI,CAAC,IAAK,OAAM,IAAI,MAAM,8BAA8B;AACxD,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,65 @@
|
|
|
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 settings_section_exports = {};
|
|
21
|
+
__export(settings_section_exports, {
|
|
22
|
+
FieldRow: () => FieldRow,
|
|
23
|
+
HelperText: () => HelperText,
|
|
24
|
+
SectionCard: () => SectionCard,
|
|
25
|
+
SectionHeader: () => SectionHeader
|
|
26
|
+
});
|
|
27
|
+
module.exports = __toCommonJS(settings_section_exports);
|
|
28
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
29
|
+
var import_cn = require("../utils/cn.js");
|
|
30
|
+
function SectionCard({ children, className, id }) {
|
|
31
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { id, className: (0, import_cn.cn)("bg-card border border-border rounded-xl p-5 space-y-4", className), children });
|
|
32
|
+
}
|
|
33
|
+
function SectionHeader({
|
|
34
|
+
icon: Icon,
|
|
35
|
+
title,
|
|
36
|
+
description,
|
|
37
|
+
badge,
|
|
38
|
+
iconClass = "text-muted-foreground",
|
|
39
|
+
bgClass = "bg-muted"
|
|
40
|
+
}) {
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-start gap-3 pb-1", children: [
|
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("h-8 w-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5", bgClass), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: (0, import_cn.cn)("h-4 w-4", iconClass) }) }),
|
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
44
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
45
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
46
|
+
badge
|
|
47
|
+
] }),
|
|
48
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground mt-0.5 leading-relaxed", children: description })
|
|
49
|
+
] })
|
|
50
|
+
] });
|
|
51
|
+
}
|
|
52
|
+
function FieldRow({ children }) {
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-1.5", children });
|
|
54
|
+
}
|
|
55
|
+
function HelperText({ children }) {
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground leading-relaxed", children });
|
|
57
|
+
}
|
|
58
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
+
0 && (module.exports = {
|
|
60
|
+
FieldRow,
|
|
61
|
+
HelperText,
|
|
62
|
+
SectionCard,
|
|
63
|
+
SectionHeader
|
|
64
|
+
});
|
|
65
|
+
//# sourceMappingURL=settings-section.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/settings-section.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, ReactNode } from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport function SectionCard({ children, className, id }: { children: ReactNode; className?: string; id?: string }) {\n return (\n <div id={id} className={cn(\"bg-card border border-border rounded-xl p-5 space-y-4\", className)}>\n {children}\n </div>\n );\n}\n\nexport function SectionHeader({\n icon: Icon,\n title,\n description,\n badge,\n iconClass = \"text-muted-foreground\",\n bgClass = \"bg-muted\",\n}: {\n icon: ElementType;\n title: string;\n description?: string;\n badge?: ReactNode;\n iconClass?: string;\n bgClass?: string;\n}) {\n return (\n <div className=\"flex items-start gap-3 pb-1\">\n <div className={cn(\"h-8 w-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5\", bgClass)}>\n <Icon className={cn(\"h-4 w-4\", iconClass)} />\n </div>\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"text-sm font-semibold text-foreground\">{title}</h3>\n {badge}\n </div>\n {description && <p className=\"text-xs text-muted-foreground mt-0.5 leading-relaxed\">{description}</p>}\n </div>\n </div>\n );\n}\n\nexport function FieldRow({ children }: { children: ReactNode }) {\n return <div className=\"space-y-1.5\">{children}</div>;\n}\n\nexport function HelperText({ children }: { children: ReactNode }) {\n return <p className=\"text-xs text-muted-foreground leading-relaxed\">{children}</p>;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOI;AAJJ,gBAAmB;AAEZ,SAAS,YAAY,EAAE,UAAU,WAAW,GAAG,GAA6D;AACjH,SACE,4CAAC,SAAI,IAAQ,eAAW,cAAG,yDAAyD,SAAS,GAC1F,UACH;AAEJ;AAEO,SAAS,cAAc;AAAA,EAC5B,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,UAAU;AACZ,GAOG;AACD,SACE,6CAAC,SAAI,WAAU,+BACb;AAAA,gDAAC,SAAI,eAAW,cAAG,uEAAuE,OAAO,GAC/F,sDAAC,QAAK,eAAW,cAAG,WAAW,SAAS,GAAG,GAC7C;AAAA,IACA,6CAAC,SAAI,WAAU,kBACb;AAAA,mDAAC,SAAI,WAAU,qCACb;AAAA,oDAAC,QAAG,WAAU,yCAAyC,iBAAM;AAAA,QAC5D;AAAA,SACH;AAAA,MACC,eAAe,4CAAC,OAAE,WAAU,wDAAwD,uBAAY;AAAA,OACnG;AAAA,KACF;AAEJ;AAEO,SAAS,SAAS,EAAE,SAAS,GAA4B;AAC9D,SAAO,4CAAC,SAAI,WAAU,eAAe,UAAS;AAChD;AAEO,SAAS,WAAW,EAAE,SAAS,GAA4B;AAChE,SAAO,4CAAC,OAAE,WAAU,iDAAiD,UAAS;AAChF;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, ElementType } from 'react';
|
|
3
|
+
|
|
4
|
+
declare function SectionCard({ children, className, id }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function SectionHeader({ icon: Icon, title, description, badge, iconClass, bgClass, }: {
|
|
10
|
+
icon: ElementType;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
badge?: ReactNode;
|
|
14
|
+
iconClass?: string;
|
|
15
|
+
bgClass?: string;
|
|
16
|
+
}): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function FieldRow({ children }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function HelperText({ children }: {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}): react_jsx_runtime.JSX.Element;
|
|
23
|
+
|
|
24
|
+
export { FieldRow, HelperText, SectionCard, SectionHeader };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, ElementType } from 'react';
|
|
3
|
+
|
|
4
|
+
declare function SectionCard({ children, className, id }: {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
}): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function SectionHeader({ icon: Icon, title, description, badge, iconClass, bgClass, }: {
|
|
10
|
+
icon: ElementType;
|
|
11
|
+
title: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
badge?: ReactNode;
|
|
14
|
+
iconClass?: string;
|
|
15
|
+
bgClass?: string;
|
|
16
|
+
}): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function FieldRow({ children }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}): react_jsx_runtime.JSX.Element;
|
|
20
|
+
declare function HelperText({ children }: {
|
|
21
|
+
children: ReactNode;
|
|
22
|
+
}): react_jsx_runtime.JSX.Element;
|
|
23
|
+
|
|
24
|
+
export { FieldRow, HelperText, SectionCard, SectionHeader };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../utils/cn.js";
|
|
4
|
+
function SectionCard({ children, className, id }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", { id, className: cn("bg-card border border-border rounded-xl p-5 space-y-4", className), children });
|
|
6
|
+
}
|
|
7
|
+
function SectionHeader({
|
|
8
|
+
icon: Icon,
|
|
9
|
+
title,
|
|
10
|
+
description,
|
|
11
|
+
badge,
|
|
12
|
+
iconClass = "text-muted-foreground",
|
|
13
|
+
bgClass = "bg-muted"
|
|
14
|
+
}) {
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 pb-1", children: [
|
|
16
|
+
/* @__PURE__ */ jsx("div", { className: cn("h-8 w-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5", bgClass), children: /* @__PURE__ */ jsx(Icon, { className: cn("h-4 w-4", iconClass) }) }),
|
|
17
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
18
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-wrap", children: [
|
|
19
|
+
/* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-foreground", children: title }),
|
|
20
|
+
badge
|
|
21
|
+
] }),
|
|
22
|
+
description && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground mt-0.5 leading-relaxed", children: description })
|
|
23
|
+
] })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
function FieldRow({ children }) {
|
|
27
|
+
return /* @__PURE__ */ jsx("div", { className: "space-y-1.5", children });
|
|
28
|
+
}
|
|
29
|
+
function HelperText({ children }) {
|
|
30
|
+
return /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground leading-relaxed", children });
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
FieldRow,
|
|
34
|
+
HelperText,
|
|
35
|
+
SectionCard,
|
|
36
|
+
SectionHeader
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=settings-section.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/settings-section.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType, ReactNode } from \"react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport function SectionCard({ children, className, id }: { children: ReactNode; className?: string; id?: string }) {\n return (\n <div id={id} className={cn(\"bg-card border border-border rounded-xl p-5 space-y-4\", className)}>\n {children}\n </div>\n );\n}\n\nexport function SectionHeader({\n icon: Icon,\n title,\n description,\n badge,\n iconClass = \"text-muted-foreground\",\n bgClass = \"bg-muted\",\n}: {\n icon: ElementType;\n title: string;\n description?: string;\n badge?: ReactNode;\n iconClass?: string;\n bgClass?: string;\n}) {\n return (\n <div className=\"flex items-start gap-3 pb-1\">\n <div className={cn(\"h-8 w-8 rounded-lg flex items-center justify-center shrink-0 mt-0.5\", bgClass)}>\n <Icon className={cn(\"h-4 w-4\", iconClass)} />\n </div>\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 flex-wrap\">\n <h3 className=\"text-sm font-semibold text-foreground\">{title}</h3>\n {badge}\n </div>\n {description && <p className=\"text-xs text-muted-foreground mt-0.5 leading-relaxed\">{description}</p>}\n </div>\n </div>\n );\n}\n\nexport function FieldRow({ children }: { children: ReactNode }) {\n return <div className=\"space-y-1.5\">{children}</div>;\n}\n\nexport function HelperText({ children }: { children: ReactNode }) {\n return <p className=\"text-xs text-muted-foreground leading-relaxed\">{children}</p>;\n}\n"],"mappings":";AAOI,cA2BI,YA3BJ;AAJJ,SAAS,UAAU;AAEZ,SAAS,YAAY,EAAE,UAAU,WAAW,GAAG,GAA6D;AACjH,SACE,oBAAC,SAAI,IAAQ,WAAW,GAAG,yDAAyD,SAAS,GAC1F,UACH;AAEJ;AAEO,SAAS,cAAc;AAAA,EAC5B,MAAM;AAAA,EACN;AAAA,EACA;AAAA,EACA;AAAA,EACA,YAAY;AAAA,EACZ,UAAU;AACZ,GAOG;AACD,SACE,qBAAC,SAAI,WAAU,+BACb;AAAA,wBAAC,SAAI,WAAW,GAAG,uEAAuE,OAAO,GAC/F,8BAAC,QAAK,WAAW,GAAG,WAAW,SAAS,GAAG,GAC7C;AAAA,IACA,qBAAC,SAAI,WAAU,kBACb;AAAA,2BAAC,SAAI,WAAU,qCACb;AAAA,4BAAC,QAAG,WAAU,yCAAyC,iBAAM;AAAA,QAC5D;AAAA,SACH;AAAA,MACC,eAAe,oBAAC,OAAE,WAAU,wDAAwD,uBAAY;AAAA,OACnG;AAAA,KACF;AAEJ;AAEO,SAAS,SAAS,EAAE,SAAS,GAA4B;AAC9D,SAAO,oBAAC,SAAI,WAAU,eAAe,UAAS;AAChD;AAEO,SAAS,WAAW,EAAE,SAAS,GAA4B;AAChE,SAAO,oBAAC,OAAE,WAAU,iDAAiD,UAAS;AAChF;","names":[]}
|
|
@@ -10,7 +10,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
|
|
|
10
10
|
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
11
11
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const sheetVariants: (props?: ({
|
|
13
|
-
side?: "
|
|
13
|
+
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
15
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
16
16
|
overlayClassName?: string;
|
|
@@ -10,7 +10,7 @@ declare const SheetClose: React.ForwardRefExoticComponent<SheetPrimitive.DialogC
|
|
|
10
10
|
declare const SheetPortal: React.FC<SheetPrimitive.DialogPortalProps>;
|
|
11
11
|
declare const SheetOverlay: React.ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const sheetVariants: (props?: ({
|
|
13
|
-
side?: "
|
|
13
|
+
side?: "left" | "right" | "bottom" | "top" | null | undefined;
|
|
14
14
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
15
15
|
interface SheetContentProps extends React.ComponentPropsWithoutRef<typeof SheetPrimitive.Content>, VariantProps<typeof sheetVariants> {
|
|
16
16
|
overlayClassName?: string;
|
package/dist/index.cjs
CHANGED
|
@@ -103,6 +103,7 @@ __export(index_exports, {
|
|
|
103
103
|
CollectionNameClaim: () => import_collection_name_claim.CollectionNameClaim,
|
|
104
104
|
CollectionPage: () => import_collection_page.CollectionPage,
|
|
105
105
|
CollectionPicker: () => import_collection_picker.CollectionPicker,
|
|
106
|
+
CollectionSettings: () => import_collection_settings.CollectionSettings,
|
|
106
107
|
CollectionTraitsTab: () => import_collection_traits_tab.CollectionTraitsTab,
|
|
107
108
|
CollectionTypeChoices: () => import_new_collection_menu.CollectionTypeChoices,
|
|
108
109
|
CollectionsPage: () => import_collections_page.CollectionsPage,
|
|
@@ -707,6 +708,7 @@ var import_portfolio_shell = require("./components/portfolio-shell.js");
|
|
|
707
708
|
var import_rewards_dashboard = require("./components/rewards/rewards-dashboard.js");
|
|
708
709
|
var import_leaderboard_panel = require("./components/rewards/leaderboard-panel.js");
|
|
709
710
|
var import_collection_name_claim = require("./components/collection-name-claim.js");
|
|
711
|
+
var import_collection_settings = require("./components/collection-settings.js");
|
|
710
712
|
var import_discover_page = require("./components/discover-page.js");
|
|
711
713
|
var import_discover_community_section = require("./components/discover-community-section.js");
|
|
712
714
|
var import_ip_type_nav = require("./components/ip-type-nav.js");
|
|
@@ -954,6 +956,7 @@ var import_asset_accents = require("./utils/asset-accents.js");
|
|
|
954
956
|
CollectionNameClaim,
|
|
955
957
|
CollectionPage,
|
|
956
958
|
CollectionPicker,
|
|
959
|
+
CollectionSettings,
|
|
957
960
|
CollectionTraitsTab,
|
|
958
961
|
CollectionTypeChoices,
|
|
959
962
|
CollectionsPage,
|