@medialane/ui 0.388.0 → 0.390.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/alert.d.cts +1 -1
- package/dist/components/alert.d.ts +1 -1
- package/dist/components/badge.d.cts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/claim-rail.cjs +2 -2
- package/dist/components/claim-rail.cjs.map +1 -1
- package/dist/components/claim-rail.d.cts +3 -2
- package/dist/components/claim-rail.d.ts +3 -2
- package/dist/components/claim-rail.js +2 -2
- package/dist/components/claim-rail.js.map +1 -1
- package/dist/components/create-form-primitives.cjs +1 -1
- package/dist/components/create-form-primitives.cjs.map +1 -1
- package/dist/components/create-form-primitives.js +1 -1
- package/dist/components/create-form-primitives.js.map +1 -1
- package/dist/components/drop/create/drop-create.cjs +118 -68
- package/dist/components/drop/create/drop-create.cjs.map +1 -1
- package/dist/components/drop/create/drop-create.d.cts +16 -7
- package/dist/components/drop/create/drop-create.d.ts +16 -7
- package/dist/components/drop/create/drop-create.js +115 -58
- package/dist/components/drop/create/drop-create.js.map +1 -1
- package/dist/components/drop/create/drop-fields.cjs +289 -0
- package/dist/components/drop/create/drop-fields.cjs.map +1 -0
- package/dist/components/drop/create/drop-fields.d.cts +43 -0
- package/dist/components/drop/create/drop-fields.d.ts +43 -0
- package/dist/components/drop/create/drop-fields.js +247 -0
- package/dist/components/drop/create/drop-fields.js.map +1 -0
- package/dist/components/drop/create/launch-dialog.d.cts +0 -1
- package/dist/components/drop/create/launch-dialog.d.ts +0 -1
- package/dist/i18n/catalog/pt.cjs +12 -21
- package/dist/i18n/catalog/pt.cjs.map +1 -1
- package/dist/i18n/catalog/pt.js +12 -21
- package/dist/i18n/catalog/pt.js.map +1 -1
- package/dist/index.cjs +0 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/utils/drop/draft.cjs.map +1 -1
- package/dist/utils/drop/draft.d.cts +9 -3
- package/dist/utils/drop/draft.d.ts +9 -3
- package/dist/utils/drop/draft.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/drop/create/artwork-section.cjs +0 -116
- package/dist/components/drop/create/artwork-section.cjs.map +0 -1
- package/dist/components/drop/create/artwork-section.d.cts +0 -25
- package/dist/components/drop/create/artwork-section.d.ts +0 -25
- package/dist/components/drop/create/artwork-section.js +0 -80
- package/dist/components/drop/create/artwork-section.js.map +0 -1
- package/dist/components/drop/create/details-section.cjs +0 -115
- package/dist/components/drop/create/details-section.cjs.map +0 -1
- package/dist/components/drop/create/details-section.d.cts +0 -13
- package/dist/components/drop/create/details-section.d.ts +0 -13
- package/dist/components/drop/create/details-section.js +0 -91
- package/dist/components/drop/create/details-section.js.map +0 -1
- package/dist/components/drop/create/list-section.cjs +0 -67
- package/dist/components/drop/create/list-section.cjs.map +0 -1
- package/dist/components/drop/create/list-section.d.cts +0 -13
- package/dist/components/drop/create/list-section.d.ts +0 -13
- package/dist/components/drop/create/list-section.js +0 -43
- package/dist/components/drop/create/list-section.js.map +0 -1
- package/dist/components/drop/create/sale-section.cjs +0 -80
- package/dist/components/drop/create/sale-section.cjs.map +0 -1
- package/dist/components/drop/create/sale-section.d.cts +0 -15
- package/dist/components/drop/create/sale-section.d.ts +0 -15
- package/dist/components/drop/create/sale-section.js +0 -56
- package/dist/components/drop/create/sale-section.js.map +0 -1
- package/dist/components/drop-item-list.cjs +0 -123
- package/dist/components/drop-item-list.cjs.map +0 -1
- package/dist/components/drop-item-list.d.cts +0 -19
- package/dist/components/drop-item-list.d.ts +0 -19
- package/dist/components/drop-item-list.js +0 -89
- package/dist/components/drop-item-list.js.map +0 -1
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
9
9
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
7
7
|
} & class_variance_authority_types.ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
9
9
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "default" | "destructive" | "soft" | "secondary" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
10
10
|
}
|
|
@@ -4,7 +4,7 @@ import * as React from 'react';
|
|
|
4
4
|
import { VariantProps } from 'class-variance-authority';
|
|
5
5
|
|
|
6
6
|
declare const badgeVariants: (props?: ({
|
|
7
|
-
variant?: "
|
|
7
|
+
variant?: "default" | "destructive" | "soft" | "secondary" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
10
10
|
}
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "link" | "default" | "destructive" | "soft" | "secondary" | "ghost" | "tonal" | null | undefined;
|
|
7
7
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
|
|
3
3
|
import { VariantProps } from 'class-variance-authority';
|
|
4
4
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "link" | "default" | "destructive" | "soft" | "secondary" | "ghost" | "tonal" | null | undefined;
|
|
7
7
|
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
8
8
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9
9
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
@@ -52,10 +52,10 @@ function ClaimRail({
|
|
|
52
52
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm text-foreground/90", children: label })
|
|
53
53
|
] }, label)) })
|
|
54
54
|
] }),
|
|
55
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "p-5 bg-muted/40 flex items-start gap-3", children: [
|
|
55
|
+
trust && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "p-5 bg-muted/40 flex items-start gap-3", children: [
|
|
56
56
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(TrustIcon, { className: "h-5 w-5 shrink-0 mt-0.5 text-primary" }),
|
|
57
57
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm text-muted-foreground leading-relaxed", children: [
|
|
58
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-semibold text-foreground", children: trustLead }),
|
|
58
|
+
trustLead && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-semibold text-foreground", children: trustLead }),
|
|
59
59
|
" ",
|
|
60
60
|
trust
|
|
61
61
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/claim-rail.tsx"],"sourcesContent":["\"use client\";\n\nimport { ShieldCheck, type LucideIcon } from \"lucide-react\";\nimport { useT } from \"../i18n/provider.js\";\nimport { IconTile } from \"./icon-tile.js\";\n\nexport interface ClaimRailProps {\n\n included?: { icon: LucideIcon; title: string; desc: string }[];\n\n steps: string[];\n\n trustLead
|
|
1
|
+
{"version":3,"sources":["../../src/components/claim-rail.tsx"],"sourcesContent":["\"use client\";\n\nimport { ShieldCheck, type LucideIcon } from \"lucide-react\";\nimport { useT } from \"../i18n/provider.js\";\nimport { IconTile } from \"./icon-tile.js\";\n\nexport interface ClaimRailProps {\n\n included?: { icon: LucideIcon; title: string; desc: string }[];\n\n steps: string[];\n\n /** Optional closing note; omitted, the rail ends with the steps. */\n trustLead?: string;\n trust?: string;\n\n trustIcon?: LucideIcon;\n}\n\nexport function ClaimRail({\n included,\n steps,\n trustLead,\n trust,\n trustIcon: TrustIcon = ShieldCheck,\n}: ClaimRailProps) {\n const t = useT();\n return (\n <div className=\"rounded-2xl bg-muted/50 dark:bg-card divide-y divide-border/60 overflow-hidden\">\n {included && included.length > 0 && (\n <section className=\"p-5\">\n <p className=\"section-label\">{t(\"What's included\")}</p>\n <ul className=\"mt-4 space-y-4\">\n {included.map(({ icon: Icon, title, desc }) => (\n <li key={title} className=\"flex items-start gap-3\">\n <IconTile size=\"sm\">\n <Icon />\n </IconTile>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-semibold text-foreground\">{title}</p>\n <p className=\"text-sm text-muted-foreground leading-relaxed mt-0.5\">{desc}</p>\n </div>\n </li>\n ))}\n </ul>\n </section>\n )}\n\n <section className=\"p-5\">\n <p className=\"section-label\">{t(\"How it works\")}</p>\n <ol className=\"mt-4 space-y-3\">\n {steps.map((label, i) => (\n <li key={label} className=\"flex items-center gap-3\">\n <IconTile size=\"sm\" className=\"tabular-nums\">\n {i + 1}\n </IconTile>\n <span className=\"text-sm text-foreground/90\">{label}</span>\n </li>\n ))}\n </ol>\n </section>\n\n {trust && (\n <section className=\"p-5 bg-muted/40 flex items-start gap-3\">\n <TrustIcon className=\"h-5 w-5 shrink-0 mt-0.5 text-primary\" />\n <p className=\"text-sm text-muted-foreground leading-relaxed\">\n {trustLead && <span className=\"font-semibold text-foreground\">{trustLead}</span>} {trust}\n </p>\n </section>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+BU;AA7BV,0BAA6C;AAC7C,sBAAqB;AACrB,uBAAyB;AAelB,SAAS,UAAU;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW,YAAY;AACzB,GAAmB;AACjB,QAAM,QAAI,sBAAK;AACf,SACE,6CAAC,SAAI,WAAU,kFACZ;AAAA,gBAAY,SAAS,SAAS,KAC7B,6CAAC,aAAQ,WAAU,OACjB;AAAA,kDAAC,OAAE,WAAU,iBAAiB,YAAE,iBAAiB,GAAE;AAAA,MACnD,4CAAC,QAAG,WAAU,kBACX,mBAAS,IAAI,CAAC,EAAE,MAAM,MAAM,OAAO,KAAK,MACvC,6CAAC,QAAe,WAAU,0BACxB;AAAA,oDAAC,6BAAS,MAAK,MACb,sDAAC,QAAK,GACR;AAAA,QACA,6CAAC,SAAI,WAAU,WACb;AAAA,sDAAC,OAAE,WAAU,yCAAyC,iBAAM;AAAA,UAC5D,4CAAC,OAAE,WAAU,wDAAwD,gBAAK;AAAA,WAC5E;AAAA,WAPO,KAQT,CACD,GACH;AAAA,OACF;AAAA,IAGF,6CAAC,aAAQ,WAAU,OACjB;AAAA,kDAAC,OAAE,WAAU,iBAAiB,YAAE,cAAc,GAAE;AAAA,MAChD,4CAAC,QAAG,WAAU,kBACX,gBAAM,IAAI,CAAC,OAAO,MACjB,6CAAC,QAAe,WAAU,2BACxB;AAAA,oDAAC,6BAAS,MAAK,MAAK,WAAU,gBAC3B,cAAI,GACP;AAAA,QACA,4CAAC,UAAK,WAAU,8BAA8B,iBAAM;AAAA,WAJ7C,KAKT,CACD,GACH;AAAA,OACF;AAAA,IAEC,SACC,6CAAC,aAAQ,WAAU,0CACjB;AAAA,kDAAC,aAAU,WAAU,wCAAuC;AAAA,MAC5D,6CAAC,OAAE,WAAU,iDACV;AAAA,qBAAa,4CAAC,UAAK,WAAU,iCAAiC,qBAAU;AAAA,QAAQ;AAAA,QAAE;AAAA,SACrF;AAAA,OACF;AAAA,KAEJ;AAEJ;","names":[]}
|
|
@@ -8,8 +8,9 @@ interface ClaimRailProps {
|
|
|
8
8
|
desc: string;
|
|
9
9
|
}[];
|
|
10
10
|
steps: string[];
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/** Optional closing note; omitted, the rail ends with the steps. */
|
|
12
|
+
trustLead?: string;
|
|
13
|
+
trust?: string;
|
|
13
14
|
trustIcon?: LucideIcon;
|
|
14
15
|
}
|
|
15
16
|
declare function ClaimRail({ included, steps, trustLead, trust, trustIcon: TrustIcon, }: ClaimRailProps): react_jsx_runtime.JSX.Element;
|
|
@@ -8,8 +8,9 @@ interface ClaimRailProps {
|
|
|
8
8
|
desc: string;
|
|
9
9
|
}[];
|
|
10
10
|
steps: string[];
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
/** Optional closing note; omitted, the rail ends with the steps. */
|
|
12
|
+
trustLead?: string;
|
|
13
|
+
trust?: string;
|
|
13
14
|
trustIcon?: LucideIcon;
|
|
14
15
|
}
|
|
15
16
|
declare function ClaimRail({ included, steps, trustLead, trust, trustIcon: TrustIcon, }: ClaimRailProps): react_jsx_runtime.JSX.Element;
|
|
@@ -29,10 +29,10 @@ function ClaimRail({
|
|
|
29
29
|
/* @__PURE__ */ jsx("span", { className: "text-sm text-foreground/90", children: label })
|
|
30
30
|
] }, label)) })
|
|
31
31
|
] }),
|
|
32
|
-
/* @__PURE__ */ jsxs("section", { className: "p-5 bg-muted/40 flex items-start gap-3", children: [
|
|
32
|
+
trust && /* @__PURE__ */ jsxs("section", { className: "p-5 bg-muted/40 flex items-start gap-3", children: [
|
|
33
33
|
/* @__PURE__ */ jsx(TrustIcon, { className: "h-5 w-5 shrink-0 mt-0.5 text-primary" }),
|
|
34
34
|
/* @__PURE__ */ jsxs("p", { className: "text-sm text-muted-foreground leading-relaxed", children: [
|
|
35
|
-
/* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground", children: trustLead }),
|
|
35
|
+
trustLead && /* @__PURE__ */ jsx("span", { className: "font-semibold text-foreground", children: trustLead }),
|
|
36
36
|
" ",
|
|
37
37
|
trust
|
|
38
38
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/claim-rail.tsx"],"sourcesContent":["\"use client\";\n\nimport { ShieldCheck, type LucideIcon } from \"lucide-react\";\nimport { useT } from \"../i18n/provider.js\";\nimport { IconTile } from \"./icon-tile.js\";\n\nexport interface ClaimRailProps {\n\n included?: { icon: LucideIcon; title: string; desc: string }[];\n\n steps: string[];\n\n trustLead
|
|
1
|
+
{"version":3,"sources":["../../src/components/claim-rail.tsx"],"sourcesContent":["\"use client\";\n\nimport { ShieldCheck, type LucideIcon } from \"lucide-react\";\nimport { useT } from \"../i18n/provider.js\";\nimport { IconTile } from \"./icon-tile.js\";\n\nexport interface ClaimRailProps {\n\n included?: { icon: LucideIcon; title: string; desc: string }[];\n\n steps: string[];\n\n /** Optional closing note; omitted, the rail ends with the steps. */\n trustLead?: string;\n trust?: string;\n\n trustIcon?: LucideIcon;\n}\n\nexport function ClaimRail({\n included,\n steps,\n trustLead,\n trust,\n trustIcon: TrustIcon = ShieldCheck,\n}: ClaimRailProps) {\n const t = useT();\n return (\n <div className=\"rounded-2xl bg-muted/50 dark:bg-card divide-y divide-border/60 overflow-hidden\">\n {included && included.length > 0 && (\n <section className=\"p-5\">\n <p className=\"section-label\">{t(\"What's included\")}</p>\n <ul className=\"mt-4 space-y-4\">\n {included.map(({ icon: Icon, title, desc }) => (\n <li key={title} className=\"flex items-start gap-3\">\n <IconTile size=\"sm\">\n <Icon />\n </IconTile>\n <div className=\"min-w-0\">\n <p className=\"text-sm font-semibold text-foreground\">{title}</p>\n <p className=\"text-sm text-muted-foreground leading-relaxed mt-0.5\">{desc}</p>\n </div>\n </li>\n ))}\n </ul>\n </section>\n )}\n\n <section className=\"p-5\">\n <p className=\"section-label\">{t(\"How it works\")}</p>\n <ol className=\"mt-4 space-y-3\">\n {steps.map((label, i) => (\n <li key={label} className=\"flex items-center gap-3\">\n <IconTile size=\"sm\" className=\"tabular-nums\">\n {i + 1}\n </IconTile>\n <span className=\"text-sm text-foreground/90\">{label}</span>\n </li>\n ))}\n </ol>\n </section>\n\n {trust && (\n <section className=\"p-5 bg-muted/40 flex items-start gap-3\">\n <TrustIcon className=\"h-5 w-5 shrink-0 mt-0.5 text-primary\" />\n <p className=\"text-sm text-muted-foreground leading-relaxed\">\n {trustLead && <span className=\"font-semibold text-foreground\">{trustLead}</span>} {trust}\n </p>\n </section>\n )}\n </div>\n );\n}\n"],"mappings":";AA+BU,cAOM,YAPN;AA7BV,SAAS,mBAAoC;AAC7C,SAAS,YAAY;AACrB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LABELS = {
|
|
|
38
38
|
Free: (0, import_translate.msg)("Free"),
|
|
39
39
|
Paid: (0, import_translate.msg)("Paid"),
|
|
40
40
|
Everyone: (0, import_translate.msg)("Everyone"),
|
|
41
|
-
"
|
|
41
|
+
"Invited wallets": (0, import_translate.msg)("Invited wallets"),
|
|
42
42
|
Edition: (0, import_translate.msg)("Edition"),
|
|
43
43
|
Collection: (0, import_translate.msg)("Collection")
|
|
44
44
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/create-form-primitives.tsx"],"sourcesContent":["import { cn } from \"../utils/cn.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\n\nconst OPTION_LABELS: Record<string, string> = {\n Allowed: msg(\"Allowed\"),\n \"Not Allowed\": msg(\"Not Allowed\"),\n \"Share-Alike\": msg(\"Share-Alike\"),\n \"Training Only\": msg(\"Training Only\"),\n Required: msg(\"Required\"),\n \"Not Required\": msg(\"Not Required\"),\n Yes: msg(\"Yes\"),\n No: msg(\"No\"),\n Free: msg(\"Free\"),\n Paid: msg(\"Paid\"),\n Everyone: msg(\"Everyone\"),\n \"
|
|
1
|
+
{"version":3,"sources":["../../src/components/create-form-primitives.tsx"],"sourcesContent":["import { cn } from \"../utils/cn.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\n\nconst OPTION_LABELS: Record<string, string> = {\n Allowed: msg(\"Allowed\"),\n \"Not Allowed\": msg(\"Not Allowed\"),\n \"Share-Alike\": msg(\"Share-Alike\"),\n \"Training Only\": msg(\"Training Only\"),\n Required: msg(\"Required\"),\n \"Not Required\": msg(\"Not Required\"),\n Yes: msg(\"Yes\"),\n No: msg(\"No\"),\n Free: msg(\"Free\"),\n Paid: msg(\"Paid\"),\n Everyone: msg(\"Everyone\"),\n \"Invited wallets\": msg(\"Invited wallets\"),\n Edition: msg(\"Edition\"),\n Collection: msg(\"Collection\"),\n};\n\nexport function ToggleGroup({\n value, options, onChange,\n}: { value: string; options: readonly string[]; onChange: (v: string) => void }) {\n const t = useT();\n return (\n <div className=\"flex rounded-2xl overflow-hidden w-full bg-muted/40\">\n {options.map((opt, i) => (\n <button\n key={opt}\n type=\"button\"\n onClick={() => onChange(opt)}\n className={cn(\n \"flex-1 px-3 py-2 text-sm transition-colors\",\n i > 0 && \"border-l border-border\",\n value === opt\n ? \"bg-primary text-primary-foreground font-medium\"\n : \"bg-background hover:bg-muted text-muted-foreground\",\n )}\n >\n {t(OPTION_LABELS[opt] ?? opt)}\n </button>\n ))}\n </div>\n );\n}\n\nexport function Section({ title, icon, children }: {\n title: string; icon: React.ReactNode; children: React.ReactNode;\n}) {\n return (\n <div className=\"panel p-5 space-y-4\">\n <div className=\"flex items-center gap-2 text-sm font-semibold\">\n <span className=\"text-primary\">{icon}</span>\n {title}\n </div>\n {children}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4BQ;AA5BR,gBAAmB;AACnB,sBAAqB;AACrB,uBAAoB;AAEpB,MAAM,gBAAwC;AAAA,EAC5C,aAAS,sBAAI,SAAS;AAAA,EACtB,mBAAe,sBAAI,aAAa;AAAA,EAChC,mBAAe,sBAAI,aAAa;AAAA,EAChC,qBAAiB,sBAAI,eAAe;AAAA,EACpC,cAAU,sBAAI,UAAU;AAAA,EACxB,oBAAgB,sBAAI,cAAc;AAAA,EAClC,SAAK,sBAAI,KAAK;AAAA,EACd,QAAI,sBAAI,IAAI;AAAA,EACZ,UAAM,sBAAI,MAAM;AAAA,EAChB,UAAM,sBAAI,MAAM;AAAA,EAChB,cAAU,sBAAI,UAAU;AAAA,EACxB,uBAAmB,sBAAI,iBAAiB;AAAA,EACxC,aAAS,sBAAI,SAAS;AAAA,EACtB,gBAAY,sBAAI,YAAY;AAC9B;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EAAO;AAAA,EAAS;AAClB,GAAiF;AAC/E,QAAM,QAAI,sBAAK;AACf,SACE,4CAAC,SAAI,WAAU,uDACZ,kBAAQ,IAAI,CAAC,KAAK,MACjB;AAAA,IAAC;AAAA;AAAA,MAEC,MAAK;AAAA,MACL,SAAS,MAAM,SAAS,GAAG;AAAA,MAC3B,eAAW;AAAA,QACT;AAAA,QACA,IAAI,KAAK;AAAA,QACT,UAAU,MACN,mDACA;AAAA,MACN;AAAA,MAEC,YAAE,cAAc,GAAG,KAAK,GAAG;AAAA;AAAA,IAXvB;AAAA,EAYP,CACD,GACH;AAEJ;AAEO,SAAS,QAAQ,EAAE,OAAO,MAAM,SAAS,GAE7C;AACD,SACE,6CAAC,SAAI,WAAU,uBACb;AAAA,iDAAC,SAAI,WAAU,iDACb;AAAA,kDAAC,UAAK,WAAU,gBAAgB,gBAAK;AAAA,MACpC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/create-form-primitives.tsx"],"sourcesContent":["import { cn } from \"../utils/cn.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\n\nconst OPTION_LABELS: Record<string, string> = {\n Allowed: msg(\"Allowed\"),\n \"Not Allowed\": msg(\"Not Allowed\"),\n \"Share-Alike\": msg(\"Share-Alike\"),\n \"Training Only\": msg(\"Training Only\"),\n Required: msg(\"Required\"),\n \"Not Required\": msg(\"Not Required\"),\n Yes: msg(\"Yes\"),\n No: msg(\"No\"),\n Free: msg(\"Free\"),\n Paid: msg(\"Paid\"),\n Everyone: msg(\"Everyone\"),\n \"
|
|
1
|
+
{"version":3,"sources":["../../src/components/create-form-primitives.tsx"],"sourcesContent":["import { cn } from \"../utils/cn.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { msg } from \"../i18n/translate.js\";\n\nconst OPTION_LABELS: Record<string, string> = {\n Allowed: msg(\"Allowed\"),\n \"Not Allowed\": msg(\"Not Allowed\"),\n \"Share-Alike\": msg(\"Share-Alike\"),\n \"Training Only\": msg(\"Training Only\"),\n Required: msg(\"Required\"),\n \"Not Required\": msg(\"Not Required\"),\n Yes: msg(\"Yes\"),\n No: msg(\"No\"),\n Free: msg(\"Free\"),\n Paid: msg(\"Paid\"),\n Everyone: msg(\"Everyone\"),\n \"Invited wallets\": msg(\"Invited wallets\"),\n Edition: msg(\"Edition\"),\n Collection: msg(\"Collection\"),\n};\n\nexport function ToggleGroup({\n value, options, onChange,\n}: { value: string; options: readonly string[]; onChange: (v: string) => void }) {\n const t = useT();\n return (\n <div className=\"flex rounded-2xl overflow-hidden w-full bg-muted/40\">\n {options.map((opt, i) => (\n <button\n key={opt}\n type=\"button\"\n onClick={() => onChange(opt)}\n className={cn(\n \"flex-1 px-3 py-2 text-sm transition-colors\",\n i > 0 && \"border-l border-border\",\n value === opt\n ? \"bg-primary text-primary-foreground font-medium\"\n : \"bg-background hover:bg-muted text-muted-foreground\",\n )}\n >\n {t(OPTION_LABELS[opt] ?? opt)}\n </button>\n ))}\n </div>\n );\n}\n\nexport function Section({ title, icon, children }: {\n title: string; icon: React.ReactNode; children: React.ReactNode;\n}) {\n return (\n <div className=\"panel p-5 space-y-4\">\n <div className=\"flex items-center gap-2 text-sm font-semibold\">\n <span className=\"text-primary\">{icon}</span>\n {title}\n </div>\n {children}\n </div>\n );\n}\n"],"mappings":"AA4BQ,cAwBF,YAxBE;AA5BR,SAAS,UAAU;AACnB,SAAS,YAAY;AACrB,SAAS,WAAW;AAEpB,MAAM,gBAAwC;AAAA,EAC5C,SAAS,IAAI,SAAS;AAAA,EACtB,eAAe,IAAI,aAAa;AAAA,EAChC,eAAe,IAAI,aAAa;AAAA,EAChC,iBAAiB,IAAI,eAAe;AAAA,EACpC,UAAU,IAAI,UAAU;AAAA,EACxB,gBAAgB,IAAI,cAAc;AAAA,EAClC,KAAK,IAAI,KAAK;AAAA,EACd,IAAI,IAAI,IAAI;AAAA,EACZ,MAAM,IAAI,MAAM;AAAA,EAChB,MAAM,IAAI,MAAM;AAAA,EAChB,UAAU,IAAI,UAAU;AAAA,EACxB,mBAAmB,IAAI,iBAAiB;AAAA,EACxC,SAAS,IAAI,SAAS;AAAA,EACtB,YAAY,IAAI,YAAY;AAC9B;AAEO,SAAS,YAAY;AAAA,EAC1B;AAAA,EAAO;AAAA,EAAS;AAClB,GAAiF;AAC/E,QAAM,IAAI,KAAK;AACf,SACE,oBAAC,SAAI,WAAU,uDACZ,kBAAQ,IAAI,CAAC,KAAK,MACjB;AAAA,IAAC;AAAA;AAAA,MAEC,MAAK;AAAA,MACL,SAAS,MAAM,SAAS,GAAG;AAAA,MAC3B,WAAW;AAAA,QACT;AAAA,QACA,IAAI,KAAK;AAAA,QACT,UAAU,MACN,mDACA;AAAA,MACN;AAAA,MAEC,YAAE,cAAc,GAAG,KAAK,GAAG;AAAA;AAAA,IAXvB;AAAA,EAYP,CACD,GACH;AAEJ;AAEO,SAAS,QAAQ,EAAE,OAAO,MAAM,SAAS,GAE7C;AACD,SACE,qBAAC,SAAI,WAAU,uBACb;AAAA,yBAAC,SAAI,WAAU,iDACb;AAAA,0BAAC,UAAK,WAAU,gBAAgB,gBAAK;AAAA,MACpC;AAAA,OACH;AAAA,IACC;AAAA,KACH;AAEJ;","names":[]}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
var __create = Object.create;
|
|
4
3
|
var __defProp = Object.defineProperty;
|
|
5
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
8
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
7
|
var __export = (target, all) => {
|
|
10
8
|
for (var name in all)
|
|
@@ -18,104 +16,156 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
16
|
}
|
|
19
17
|
return to;
|
|
20
18
|
};
|
|
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
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
20
|
var drop_create_exports = {};
|
|
31
21
|
__export(drop_create_exports, {
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
DropCreate: () => DropCreate,
|
|
23
|
+
draftFiles: () => draftFiles,
|
|
24
|
+
dropSymbol: () => dropSymbol,
|
|
25
|
+
withArtwork: () => withArtwork,
|
|
26
|
+
withoutArtwork: () => withoutArtwork
|
|
34
27
|
});
|
|
35
28
|
module.exports = __toCommonJS(drop_create_exports);
|
|
36
29
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
30
|
var import_react = require("react");
|
|
38
31
|
var import_lucide_react = require("lucide-react");
|
|
39
|
-
var
|
|
32
|
+
var import_sdk = require("@medialane/sdk");
|
|
40
33
|
var import_action_button = require("../../action-button.js");
|
|
41
34
|
var import_collapsible_section = require("../../collapsible-section.js");
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var import_list_section = require("./list-section.js");
|
|
35
|
+
var import_claim_route_shell = require("../../claim-route-shell.js");
|
|
36
|
+
var import_medialane_collection_card = require("../../medialane-collection-card.js");
|
|
37
|
+
var import_drop_fields = require("./drop-fields.js");
|
|
46
38
|
var import_exclusive_fields = require("./exclusive-fields.js");
|
|
47
39
|
var import_launch_dialog = require("./launch-dialog.js");
|
|
48
|
-
var import_artwork_section2 = require("./artwork-section.js");
|
|
49
40
|
var import_draft = require("../../../utils/drop/draft.js");
|
|
50
|
-
var import_sale = require("../../../utils/drop/sale.js");
|
|
51
41
|
var import_preview = require("../../../utils/drop/preview.js");
|
|
42
|
+
var import_launchpad_defaults = require("../../../utils/launchpad-defaults.js");
|
|
52
43
|
var import_medialane_app = require("../../medialane-app.js");
|
|
53
44
|
var import_use_drops = require("../../../utils/use-drops.js");
|
|
45
|
+
var import_translate = require("../../../i18n/translate.js");
|
|
54
46
|
var import_provider = require("../../../i18n/provider.js");
|
|
55
47
|
var import_use_format = require("../../../i18n/use-format.js");
|
|
56
|
-
|
|
48
|
+
const toItem = (file) => ({ id: crypto.randomUUID(), file, previewUrl: URL.createObjectURL(file), name: "", description: "" });
|
|
49
|
+
function draftFiles(draft) {
|
|
50
|
+
return draft.kind === "edition" ? draft.edition ? [draft.edition] : [] : draft.items.map((it) => it.file);
|
|
51
|
+
}
|
|
52
|
+
function withArtwork(draft, files) {
|
|
53
|
+
const current = draft.kind === "edition" ? draft.edition ? [toItem(draft.edition)] : [] : draft.items;
|
|
54
|
+
const items = [...current, ...files.map(toItem)];
|
|
55
|
+
if (items.length === 1) return { kind: "edition", edition: items[0].file, items: [] };
|
|
56
|
+
return { kind: "collection", edition: null, items };
|
|
57
|
+
}
|
|
58
|
+
function withoutArtwork(draft, file) {
|
|
59
|
+
if (draft.kind === "edition") return { edition: null };
|
|
60
|
+
const items = draft.items.filter((it) => it.file !== file);
|
|
61
|
+
if (items.length === 1) return { kind: "edition", edition: items[0].file, items: [] };
|
|
62
|
+
return { items };
|
|
63
|
+
}
|
|
64
|
+
function dropSymbol(name) {
|
|
65
|
+
return (0, import_launchpad_defaults.suggestLaunchpadSymbol)(name) || "DROP";
|
|
66
|
+
}
|
|
67
|
+
function DropCreate({ aside }) {
|
|
57
68
|
const t = (0, import_provider.useT)();
|
|
69
|
+
const intl = (0, import_use_format.useFormat)();
|
|
58
70
|
const app = (0, import_medialane_app.useMedialaneApp)();
|
|
59
71
|
const feeBps = (0, import_use_drops.useDropFee)();
|
|
60
72
|
const [draft, setDraftState] = (0, import_react.useState)(import_draft.EMPTY_DRAFT);
|
|
61
73
|
const [tried, setTried] = (0, import_react.useState)(false);
|
|
62
74
|
const [launching, setLaunching] = (0, import_react.useState)(false);
|
|
75
|
+
const [licenseOpen, setLicenseOpen] = (0, import_react.useState)(false);
|
|
63
76
|
const setDraft = (patch) => setDraftState((d) => ({ ...d, ...patch }));
|
|
64
77
|
const errors = tried ? (0, import_draft.validateDropDraft)(draft, Math.floor(Date.now() / 1e3)) : {};
|
|
78
|
+
const files = draftFiles(draft);
|
|
79
|
+
const supply = (0, import_draft.draftSupply)(draft);
|
|
80
|
+
const wallet = app.walletAddress;
|
|
65
81
|
const launch = () => {
|
|
66
|
-
if (!
|
|
82
|
+
if (!wallet) return app.onRequireWallet();
|
|
67
83
|
setTried(true);
|
|
68
84
|
if (Object.keys((0, import_draft.validateDropDraft)(draft, Math.floor(Date.now() / 1e3))).length === 0) setLaunching(true);
|
|
69
85
|
};
|
|
70
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
86
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
87
|
+
import_claim_route_shell.ClaimRouteShell,
|
|
88
|
+
{
|
|
89
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Package, { className: "h-4 w-4 text-white" }),
|
|
90
|
+
title: (0, import_translate.msg)("Collection drop"),
|
|
91
|
+
subtitle: (0, import_translate.msg)("Release your work to collectors at a price and time you choose. Collectors mint straight from your drop page."),
|
|
92
|
+
aside: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
93
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
94
|
+
import_medialane_collection_card.MedialaneCollectionCard,
|
|
95
|
+
{
|
|
96
|
+
image: files[0] ? (0, import_preview.previewUrl)(files[0]) : null,
|
|
97
|
+
name: draft.name,
|
|
98
|
+
collection: files.length > 0 && Number.isFinite(supply) && supply > 0 ? (0, import_draft.supplyLabel)(t, draft.kind, supply, intl.number(supply)) : void 0,
|
|
99
|
+
creator: wallet ? `${wallet.slice(0, 6)}\u2026${wallet.slice(-4)}` : void 0,
|
|
100
|
+
creatorHref: wallet ? (0, import_sdk.profileHref)({ address: wallet }) : void 0
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
aside
|
|
104
|
+
] }),
|
|
105
|
+
children: [
|
|
106
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-6", children: [
|
|
107
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
108
|
+
import_drop_fields.ArtworkUpload,
|
|
109
|
+
{
|
|
110
|
+
files,
|
|
111
|
+
error: errors.artwork,
|
|
112
|
+
onAdd: (picked) => setDraftState((d) => ({ ...d, ...withArtwork(d, picked) })),
|
|
113
|
+
onRemove: (file) => setDraftState((d) => ({ ...d, ...withoutArtwork(d, file) }))
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
117
|
+
import_drop_fields.NameFields,
|
|
118
|
+
{
|
|
119
|
+
draft,
|
|
120
|
+
setDraft,
|
|
121
|
+
errors,
|
|
122
|
+
onNameChange: (name) => setDraft({ name, symbol: dropSymbol(name) })
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_fields.PriceFields, { draft, setDraft, errors, feeBps }),
|
|
126
|
+
draft.kind === "edition" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_fields.CopiesField, { draft, setDraft, errors }),
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_fields.AccessFields, { draft, setDraft, errors }),
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_fields.TimingFields, { draft, setDraft, errors }),
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
130
|
+
import_collapsible_section.CollapsibleSection,
|
|
131
|
+
{
|
|
132
|
+
open: licenseOpen,
|
|
133
|
+
onOpenChange: setLicenseOpen,
|
|
134
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShieldCheck, { className: "h-4 w-4 text-primary" }),
|
|
135
|
+
label: t("License terms"),
|
|
136
|
+
hint: t("Optional \xB7 Berne Convention"),
|
|
137
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_fields.LicenseFields, { draft, setDraft })
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
141
|
+
import_collapsible_section.CollapsibleSection,
|
|
142
|
+
{
|
|
143
|
+
open: draft.gated.enabled,
|
|
144
|
+
onOpenChange: (enabled) => setDraft({ gated: { ...draft.gated, enabled } }),
|
|
145
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Lock, { className: "h-4 w-4 text-primary" }),
|
|
146
|
+
label: t("Exclusive content"),
|
|
147
|
+
hint: t("Optional \xB7 a private link only holders can open"),
|
|
148
|
+
children: [
|
|
149
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_exclusive_fields.ExclusiveFields, { value: draft.gated, onChange: (v) => setDraft({ gated: { ...draft.gated, ...v } }) }),
|
|
150
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_drop_fields.FieldError, { message: errors.gated })
|
|
151
|
+
]
|
|
152
|
+
}
|
|
153
|
+
),
|
|
154
|
+
tried && Object.keys(errors).length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-medium text-destructive", children: t("Check the highlighted fields.") }),
|
|
155
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { solid: true, big: true, onClick: launch, className: "w-full", children: wallet ? t("Launch drop") : app.connectLabel ?? t("Sign in to launch") }),
|
|
156
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-center text-xs text-muted-foreground", children: t("Artwork, price and copies can't change after launch.") })
|
|
157
|
+
] }),
|
|
158
|
+
launching && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_launch_dialog.LaunchDialog, { open: true, onClose: () => setLaunching(false), draft })
|
|
159
|
+
]
|
|
160
|
+
}
|
|
161
|
+
);
|
|
115
162
|
}
|
|
116
163
|
// Annotate the CommonJS export names for ESM import in node:
|
|
117
164
|
0 && (module.exports = {
|
|
118
|
-
|
|
119
|
-
|
|
165
|
+
DropCreate,
|
|
166
|
+
draftFiles,
|
|
167
|
+
dropSymbol,
|
|
168
|
+
withArtwork,
|
|
169
|
+
withoutArtwork
|
|
120
170
|
});
|
|
121
171
|
//# sourceMappingURL=drop-create.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/drop/create/drop-create.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Lock } from \"lucide-react\";\nimport Image from \"../../image.js\";\nimport { ActionButton } from \"../../action-button.js\";\nimport { CollapsibleSection } from \"../../collapsible-section.js\";\nimport { ArtworkSection } from \"./artwork-section.js\";\nimport { DetailsSection } from \"./details-section.js\";\nimport { SaleSection } from \"./sale-section.js\";\nimport { ListSection } from \"./list-section.js\";\nimport { ExclusiveFields } from \"./exclusive-fields.js\";\nimport { LaunchDialog } from \"./launch-dialog.js\";\nimport { FieldError } from \"./artwork-section.js\";\nimport { EMPTY_DRAFT, draftSupply, validateDropDraft, type DropDraft, supplyLabel } from \"../../../utils/drop/draft.js\";\nimport { collectorPriceLine } from \"../../../utils/drop/sale.js\";\nimport { previewUrl } from \"../../../utils/drop/preview.js\";\nimport { useMedialaneApp } from \"../../medialane-app.js\";\nimport { useDropFee } from \"../../../utils/use-drops.js\";\nimport { useT } from \"../../../i18n/provider.js\";\nimport { useFormat } from \"../../../i18n/use-format.js\";\n\nexport function DropCreate() {\n const t = useT();\n const app = useMedialaneApp();\n const feeBps = useDropFee();\n const [draft, setDraftState] = useState<DropDraft>(EMPTY_DRAFT);\n const [tried, setTried] = useState(false);\n const [launching, setLaunching] = useState(false);\n const setDraft = (patch: Partial<DropDraft>) => setDraftState((d) => ({ ...d, ...patch }));\n const errors = tried ? validateDropDraft(draft, Math.floor(Date.now() / 1000)) : {};\n\n const launch = () => {\n if (!app.walletAddress) return app.onRequireWallet();\n setTried(true);\n if (Object.keys(validateDropDraft(draft, Math.floor(Date.now() / 1000))).length === 0) setLaunching(true);\n };\n\n return (\n <div className=\"grid gap-6 lg:grid-cols-[minmax(0,1fr)_320px]\">\n <div className=\"space-y-5 lg:order-1 order-2\">\n <ArtworkSection draft={draft} setDraft={setDraft} errors={errors} />\n <DetailsSection draft={draft} setDraft={setDraft} errors={errors} />\n <SaleSection draft={draft} setDraft={setDraft} errors={errors} feeBps={feeBps} />\n <ListSection draft={draft} setDraft={setDraft} errors={errors} />\n <CollapsibleSection\n open={draft.gated.enabled}\n onOpenChange={(enabled) => setDraft({ gated: { ...draft.gated, enabled } })}\n icon={<Lock className=\"h-4 w-4 text-primary\" />}\n label={t(\"Exclusive content\")}\n hint={t(\"Optional · a private link only holders can open\")}\n >\n <ExclusiveFields value={draft.gated} onChange={(v) => setDraft({ gated: { ...draft.gated, ...v } })} />\n <FieldError message={errors.gated} />\n </CollapsibleSection>\n {tried && Object.keys(errors).length > 0 && <p className=\"text-sm font-medium text-destructive\">{t(\"Check the highlighted fields.\")}</p>}\n <ActionButton solid big onClick={launch} className=\"w-full\">\n {app.walletAddress ? t(\"Review and launch\") : app.connectLabel ?? t(\"Sign in to launch\")}\n </ActionButton>\n {launching && <LaunchDialog open onClose={() => setLaunching(false)} draft={draft} />}\n </div>\n <div className=\"order-1 lg:order-2\">\n <div className=\"lg:sticky lg:top-24\"><DraftSummary draft={draft} feeBps={feeBps} /></div>\n </div>\n </div>\n );\n}\n\n/** The drop as collectors will see it, updated as the form changes. */\nexport function DraftSummary({ draft, feeBps }: { draft: DropDraft; feeBps: number | null }) {\n const intl = useFormat();\n const t = useT();\n const art = draft.cover ?? (draft.kind === \"edition\" ? draft.edition : draft.items[0]?.file ?? null);\n const preview = art ? previewUrl(art) : null;\n const supply = draftSupply(draft);\n return (\n <div className=\"panel overflow-hidden\">\n <div className=\"relative aspect-square bg-muted\">\n {preview && <Image src={preview} alt={draft.name || t(\"Drop\")} fill unoptimized className=\"object-cover\" />}\n </div>\n <div className=\"space-y-1 p-4\">\n <p className=\"truncate font-semibold\">{draft.name || t(\"Untitled drop\")}</p>\n <p className=\"text-xs text-muted-foreground\">\n {draft.sale.paid ? (feeBps === null ? \"…\" : collectorPriceLine(draft.sale, feeBps) ?? t(\"Set a price\")) : t(\"Free\")}\n </p>\n <p className=\"text-xs text-muted-foreground\">\n {Number.isFinite(supply) && supply > 0 ? supplyLabel(t, draft.kind, supply, intl.number(supply)) : t(\"Supply not set\")}\n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AAM,CAAC,GAAG,QAAQ;AAC/F,QAAM,UAAU,UAAM,2BAAW,GAAG,IAAI;AACxC,QAAM,aAAS,0BAAY,KAAK;AAChC,SACE,6CAAC,SAAI,WAAU,yBACb;AAAA,gDAAC,SAAI,WAAU,mCACZ,qBAAW,4CAAC,aAAAC,SAAA,EAAM,KAAK,SAAS,KAAK,MAAM,QAAQ,EAAE,MAAM,GAAG,MAAI,MAAC,aAAW,MAAC,WAAU,gBAAe,GAC3G;AAAA,IACA,6CAAC,SAAI,WAAU,iBACb;AAAA,kDAAC,OAAE,WAAU,0BAA0B,gBAAM,QAAQ,EAAE,eAAe,GAAE;AAAA,MACxE,4CAAC,OAAE,WAAU,iCACV,gBAAM,KAAK,OAAQ,WAAW,OAAO,eAAM,gCAAmB,MAAM,MAAM,MAAM,KAAK,EAAE,aAAa,IAAK,EAAE,MAAM,GACpH;AAAA,MACA,6CAAC,OAAE,WAAU,iCACV;AAAA,eAAO,SAAS,MAAM,KAAK,SAAS,QAAI,0BAAY,GAAG,MAAM,MAAM,QAAQ,KAAK,OAAO,MAAM,CAAC,IAAI,EAAE,gBAAgB;AAAA,QACpH;AAAA,QAAO,MAAM,WAAW,EAAE,WAAW,IAAI,EAAE,kBAAkB;AAAA,SAChE;AAAA,OACF;AAAA,KACF;AAEJ;","names":["import_artwork_section","Image"]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/drop/create/drop-create.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState, type ReactNode } from \"react\";\nimport { Lock, Package, ShieldCheck } from \"lucide-react\";\nimport { profileHref } from \"@medialane/sdk\";\nimport { ActionButton } from \"../../action-button.js\";\nimport { CollapsibleSection } from \"../../collapsible-section.js\";\nimport { ClaimRouteShell } from \"../../claim-route-shell.js\";\nimport { MedialaneCollectionCard } from \"../../medialane-collection-card.js\";\nimport { AccessFields, ArtworkUpload, CopiesField, FieldError, LicenseFields, NameFields, PriceFields, TimingFields } from \"./drop-fields.js\";\nimport { ExclusiveFields } from \"./exclusive-fields.js\";\nimport { LaunchDialog } from \"./launch-dialog.js\";\nimport { EMPTY_DRAFT, draftSupply, validateDropDraft, type DraftItem, type DropDraft, supplyLabel } from \"../../../utils/drop/draft.js\";\nimport { previewUrl } from \"../../../utils/drop/preview.js\";\nimport { suggestLaunchpadSymbol } from \"../../../utils/launchpad-defaults.js\";\nimport { useMedialaneApp } from \"../../medialane-app.js\";\nimport { useDropFee } from \"../../../utils/use-drops.js\";\nimport { msg } from \"../../../i18n/translate.js\";\nimport { useT } from \"../../../i18n/provider.js\";\nimport { useFormat } from \"../../../i18n/use-format.js\";\n\nconst toItem = (file: File): DraftItem => ({ id: crypto.randomUUID(), file, previewUrl: URL.createObjectURL(file), name: \"\", description: \"\" });\n\n/** The images of a draft, in order. */\nexport function draftFiles(draft: DropDraft): File[] {\n return draft.kind === \"edition\" ? (draft.edition ? [draft.edition] : []) : draft.items.map((it) => it.file);\n}\n\n/** The draft with these images added: one image is an edition, several are a collection. */\nexport function withArtwork(draft: DropDraft, files: File[]): Partial<DropDraft> {\n const current: DraftItem[] = draft.kind === \"edition\" ? (draft.edition ? [toItem(draft.edition)] : []) : draft.items;\n const items = [...current, ...files.map(toItem)];\n if (items.length === 1) return { kind: \"edition\", edition: items[0]!.file, items: [] };\n return { kind: \"collection\", edition: null, items };\n}\n\n/** The draft without this image; a single image left makes it an edition again. */\nexport function withoutArtwork(draft: DropDraft, file: File): Partial<DropDraft> {\n if (draft.kind === \"edition\") return { edition: null };\n const items = draft.items.filter((it) => it.file !== file);\n if (items.length === 1) return { kind: \"edition\", edition: items[0]!.file, items: [] };\n return { items };\n}\n\n/** The collection's symbol, made from the drop's name. */\nexport function dropSymbol(name: string): string {\n return suggestLaunchpadSymbol(name) || \"DROP\";\n}\n\n/**\n * Create a collection drop in the launchpad layout: the form in the main column, the live preview\n * and the app's `aside` in the secondary one.\n */\nexport function DropCreate({ aside }: { aside?: ReactNode }) {\n const t = useT();\n const intl = useFormat();\n const app = useMedialaneApp();\n const feeBps = useDropFee();\n const [draft, setDraftState] = useState<DropDraft>(EMPTY_DRAFT);\n const [tried, setTried] = useState(false);\n const [launching, setLaunching] = useState(false);\n const [licenseOpen, setLicenseOpen] = useState(false);\n const setDraft = (patch: Partial<DropDraft>) => setDraftState((d) => ({ ...d, ...patch }));\n const errors = tried ? validateDropDraft(draft, Math.floor(Date.now() / 1000)) : {};\n const files = draftFiles(draft);\n const supply = draftSupply(draft);\n const wallet = app.walletAddress;\n\n const launch = () => {\n if (!wallet) return app.onRequireWallet();\n setTried(true);\n if (Object.keys(validateDropDraft(draft, Math.floor(Date.now() / 1000))).length === 0) setLaunching(true);\n };\n\n return (\n <ClaimRouteShell\n icon={<Package className=\"h-4 w-4 text-white\" />}\n title={msg(\"Collection drop\")}\n subtitle={msg(\"Release your work to collectors at a price and time you choose. Collectors mint straight from your drop page.\")}\n aside={\n <>\n <MedialaneCollectionCard\n image={files[0] ? previewUrl(files[0]) : null}\n name={draft.name}\n collection={files.length > 0 && Number.isFinite(supply) && supply > 0 ? supplyLabel(t, draft.kind, supply, intl.number(supply)) : undefined}\n creator={wallet ? `${wallet.slice(0, 6)}…${wallet.slice(-4)}` : undefined}\n creatorHref={wallet ? profileHref({ address: wallet }) : undefined}\n />\n {aside}\n </>\n }\n >\n <div className=\"space-y-6\">\n <ArtworkUpload\n files={files}\n error={errors.artwork}\n onAdd={(picked) => setDraftState((d) => ({ ...d, ...withArtwork(d, picked) }))}\n onRemove={(file) => setDraftState((d) => ({ ...d, ...withoutArtwork(d, file) }))}\n />\n <NameFields draft={draft} setDraft={setDraft} errors={errors}\n onNameChange={(name) => setDraft({ name, symbol: dropSymbol(name) })} />\n <PriceFields draft={draft} setDraft={setDraft} errors={errors} feeBps={feeBps} />\n {draft.kind === \"edition\" && <CopiesField draft={draft} setDraft={setDraft} errors={errors} />}\n <AccessFields draft={draft} setDraft={setDraft} errors={errors} />\n <TimingFields draft={draft} setDraft={setDraft} errors={errors} />\n\n <CollapsibleSection open={licenseOpen} onOpenChange={setLicenseOpen}\n icon={<ShieldCheck className=\"h-4 w-4 text-primary\" />}\n label={t(\"License terms\")} hint={t(\"Optional · Berne Convention\")}>\n <LicenseFields draft={draft} setDraft={setDraft} />\n </CollapsibleSection>\n <CollapsibleSection open={draft.gated.enabled}\n onOpenChange={(enabled) => setDraft({ gated: { ...draft.gated, enabled } })}\n icon={<Lock className=\"h-4 w-4 text-primary\" />}\n label={t(\"Exclusive content\")} hint={t(\"Optional · a private link only holders can open\")}>\n <ExclusiveFields value={draft.gated} onChange={(v) => setDraft({ gated: { ...draft.gated, ...v } })} />\n <FieldError message={errors.gated} />\n </CollapsibleSection>\n\n {tried && Object.keys(errors).length > 0 && <p className=\"text-sm font-medium text-destructive\">{t(\"Check the highlighted fields.\")}</p>}\n <ActionButton solid big onClick={launch} className=\"w-full\">\n {wallet ? t(\"Launch drop\") : app.connectLabel ?? t(\"Sign in to launch\")}\n </ActionButton>\n <p className=\"text-center text-xs text-muted-foreground\">{t(\"Artwork, price and copies can't change after launch.\")}</p>\n </div>\n {launching && <LaunchDialog open onClose={() => setLaunching(false)} draft={draft} />}\n </ClaimRouteShell>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4EY;AA1EZ,mBAAyC;AACzC,0BAA2C;AAC3C,iBAA4B;AAC5B,2BAA6B;AAC7B,iCAAmC;AACnC,+BAAgC;AAChC,uCAAwC;AACxC,yBAA2H;AAC3H,8BAAgC;AAChC,2BAA6B;AAC7B,mBAAyG;AACzG,qBAA2B;AAC3B,gCAAuC;AACvC,2BAAgC;AAChC,uBAA2B;AAC3B,uBAAoB;AACpB,sBAAqB;AACrB,wBAA0B;AAE1B,MAAM,SAAS,CAAC,UAA2B,EAAE,IAAI,OAAO,WAAW,GAAG,MAAM,YAAY,IAAI,gBAAgB,IAAI,GAAG,MAAM,IAAI,aAAa,GAAG;AAGtI,SAAS,WAAW,OAA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;AAAA,UACrC;AAAA,UAEC,SAAS,OAAO,KAAK,MAAM,EAAE,SAAS,KAAK,4CAAC,OAAE,WAAU,wCAAwC,YAAE,+BAA+B,GAAE;AAAA,UACpI,4CAAC,qCAAa,OAAK,MAAC,KAAG,MAAC,SAAS,QAAQ,WAAU,UAChD,mBAAS,EAAE,aAAa,IAAI,IAAI,gBAAgB,EAAE,mBAAmB,GACxE;AAAA,UACA,4CAAC,OAAE,WAAU,6CAA6C,YAAE,sDAAsD,GAAE;AAAA,WACtH;AAAA,QACC,aAAa,4CAAC,qCAAa,MAAI,MAAC,SAAS,MAAM,aAAa,KAAK,GAAG,OAAc;AAAA;AAAA;AAAA,EACrF;AAEJ;","names":[]}
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import { DropDraft } from '../../../utils/drop/draft.cjs';
|
|
3
4
|
import '../../../i18n/make-t.cjs';
|
|
4
5
|
import '../../../i18n/translate.cjs';
|
|
5
|
-
import '../../drop-item-list.cjs';
|
|
6
6
|
import '../../../utils/drop/metadata.cjs';
|
|
7
7
|
import '@medialane/sdk';
|
|
8
8
|
import '../../../utils/drop/sale.cjs';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
/** The images of a draft, in order. */
|
|
11
|
+
declare function draftFiles(draft: DropDraft): File[];
|
|
12
|
+
/** The draft with these images added: one image is an edition, several are a collection. */
|
|
13
|
+
declare function withArtwork(draft: DropDraft, files: File[]): Partial<DropDraft>;
|
|
14
|
+
/** The draft without this image; a single image left makes it an edition again. */
|
|
15
|
+
declare function withoutArtwork(draft: DropDraft, file: File): Partial<DropDraft>;
|
|
16
|
+
/** The collection's symbol, made from the drop's name. */
|
|
17
|
+
declare function dropSymbol(name: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Create a collection drop in the launchpad layout: the form in the main column, the live preview
|
|
20
|
+
* and the app's `aside` in the secondary one.
|
|
21
|
+
*/
|
|
22
|
+
declare function DropCreate({ aside }: {
|
|
23
|
+
aside?: ReactNode;
|
|
15
24
|
}): react_jsx_runtime.JSX.Element;
|
|
16
25
|
|
|
17
|
-
export {
|
|
26
|
+
export { DropCreate, draftFiles, dropSymbol, withArtwork, withoutArtwork };
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
import { DropDraft } from '../../../utils/drop/draft.js';
|
|
3
4
|
import '../../../i18n/make-t.js';
|
|
4
5
|
import '../../../i18n/translate.js';
|
|
5
|
-
import '../../drop-item-list.js';
|
|
6
6
|
import '../../../utils/drop/metadata.js';
|
|
7
7
|
import '@medialane/sdk';
|
|
8
8
|
import '../../../utils/drop/sale.js';
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
/** The images of a draft, in order. */
|
|
11
|
+
declare function draftFiles(draft: DropDraft): File[];
|
|
12
|
+
/** The draft with these images added: one image is an edition, several are a collection. */
|
|
13
|
+
declare function withArtwork(draft: DropDraft, files: File[]): Partial<DropDraft>;
|
|
14
|
+
/** The draft without this image; a single image left makes it an edition again. */
|
|
15
|
+
declare function withoutArtwork(draft: DropDraft, file: File): Partial<DropDraft>;
|
|
16
|
+
/** The collection's symbol, made from the drop's name. */
|
|
17
|
+
declare function dropSymbol(name: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Create a collection drop in the launchpad layout: the form in the main column, the live preview
|
|
20
|
+
* and the app's `aside` in the secondary one.
|
|
21
|
+
*/
|
|
22
|
+
declare function DropCreate({ aside }: {
|
|
23
|
+
aside?: ReactNode;
|
|
15
24
|
}): react_jsx_runtime.JSX.Element;
|
|
16
25
|
|
|
17
|
-
export {
|
|
26
|
+
export { DropCreate, draftFiles, dropSymbol, withArtwork, withoutArtwork };
|