@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.
Files changed (75) hide show
  1. package/dist/components/alert.d.cts +1 -1
  2. package/dist/components/alert.d.ts +1 -1
  3. package/dist/components/badge.d.cts +1 -1
  4. package/dist/components/badge.d.ts +1 -1
  5. package/dist/components/button.d.cts +1 -1
  6. package/dist/components/button.d.ts +1 -1
  7. package/dist/components/claim-rail.cjs +2 -2
  8. package/dist/components/claim-rail.cjs.map +1 -1
  9. package/dist/components/claim-rail.d.cts +3 -2
  10. package/dist/components/claim-rail.d.ts +3 -2
  11. package/dist/components/claim-rail.js +2 -2
  12. package/dist/components/claim-rail.js.map +1 -1
  13. package/dist/components/create-form-primitives.cjs +1 -1
  14. package/dist/components/create-form-primitives.cjs.map +1 -1
  15. package/dist/components/create-form-primitives.js +1 -1
  16. package/dist/components/create-form-primitives.js.map +1 -1
  17. package/dist/components/drop/create/drop-create.cjs +118 -68
  18. package/dist/components/drop/create/drop-create.cjs.map +1 -1
  19. package/dist/components/drop/create/drop-create.d.cts +16 -7
  20. package/dist/components/drop/create/drop-create.d.ts +16 -7
  21. package/dist/components/drop/create/drop-create.js +115 -58
  22. package/dist/components/drop/create/drop-create.js.map +1 -1
  23. package/dist/components/drop/create/drop-fields.cjs +289 -0
  24. package/dist/components/drop/create/drop-fields.cjs.map +1 -0
  25. package/dist/components/drop/create/drop-fields.d.cts +43 -0
  26. package/dist/components/drop/create/drop-fields.d.ts +43 -0
  27. package/dist/components/drop/create/drop-fields.js +247 -0
  28. package/dist/components/drop/create/drop-fields.js.map +1 -0
  29. package/dist/components/drop/create/launch-dialog.d.cts +0 -1
  30. package/dist/components/drop/create/launch-dialog.d.ts +0 -1
  31. package/dist/i18n/catalog/pt.cjs +12 -21
  32. package/dist/i18n/catalog/pt.cjs.map +1 -1
  33. package/dist/i18n/catalog/pt.js +12 -21
  34. package/dist/i18n/catalog/pt.js.map +1 -1
  35. package/dist/index.cjs +0 -5
  36. package/dist/index.cjs.map +1 -1
  37. package/dist/index.d.cts +2 -3
  38. package/dist/index.d.ts +2 -3
  39. package/dist/index.js +1 -4
  40. package/dist/index.js.map +1 -1
  41. package/dist/utils/drop/draft.cjs.map +1 -1
  42. package/dist/utils/drop/draft.d.cts +9 -3
  43. package/dist/utils/drop/draft.d.ts +9 -3
  44. package/dist/utils/drop/draft.js.map +1 -1
  45. package/package.json +1 -1
  46. package/dist/components/drop/create/artwork-section.cjs +0 -116
  47. package/dist/components/drop/create/artwork-section.cjs.map +0 -1
  48. package/dist/components/drop/create/artwork-section.d.cts +0 -25
  49. package/dist/components/drop/create/artwork-section.d.ts +0 -25
  50. package/dist/components/drop/create/artwork-section.js +0 -80
  51. package/dist/components/drop/create/artwork-section.js.map +0 -1
  52. package/dist/components/drop/create/details-section.cjs +0 -115
  53. package/dist/components/drop/create/details-section.cjs.map +0 -1
  54. package/dist/components/drop/create/details-section.d.cts +0 -13
  55. package/dist/components/drop/create/details-section.d.ts +0 -13
  56. package/dist/components/drop/create/details-section.js +0 -91
  57. package/dist/components/drop/create/details-section.js.map +0 -1
  58. package/dist/components/drop/create/list-section.cjs +0 -67
  59. package/dist/components/drop/create/list-section.cjs.map +0 -1
  60. package/dist/components/drop/create/list-section.d.cts +0 -13
  61. package/dist/components/drop/create/list-section.d.ts +0 -13
  62. package/dist/components/drop/create/list-section.js +0 -43
  63. package/dist/components/drop/create/list-section.js.map +0 -1
  64. package/dist/components/drop/create/sale-section.cjs +0 -80
  65. package/dist/components/drop/create/sale-section.cjs.map +0 -1
  66. package/dist/components/drop/create/sale-section.d.cts +0 -15
  67. package/dist/components/drop/create/sale-section.d.ts +0 -15
  68. package/dist/components/drop/create/sale-section.js +0 -56
  69. package/dist/components/drop/create/sale-section.js.map +0 -1
  70. package/dist/components/drop-item-list.cjs +0 -123
  71. package/dist/components/drop-item-list.cjs.map +0 -1
  72. package/dist/components/drop-item-list.d.cts +0 -19
  73. package/dist/components/drop-item-list.d.ts +0 -19
  74. package/dist/components/drop-item-list.js +0 -89
  75. package/dist/components/drop-item-list.js.map +0 -1
@@ -1,80 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { useRef } from "react";
4
- import { ImagePlus, Images } from "lucide-react";
5
- import Image from "../../image.js";
6
- import { Input } from "../../input.js";
7
- import { Section, ToggleGroup } from "../../create-form-primitives.js";
8
- import { DropItemList } from "../../drop-item-list.js";
9
- import { MAX_DROP_SUPPLY } from "../../../utils/drop/metadata.js";
10
- import { previewUrl } from "../../../utils/drop/preview.js";
11
- import { acceptFor } from "../../../utils/upload-limits.js";
12
- import { useT } from "../../../i18n/provider.js";
13
- import { useFormat } from "../../../i18n/use-format.js";
14
- function FieldError({ message }) {
15
- return message ? /* @__PURE__ */ jsx("p", { className: "text-xs font-medium text-destructive", children: message }) : null;
16
- }
17
- function ImagePick({ file, onPick, label }) {
18
- const ref = useRef(null);
19
- const preview = file ? previewUrl(file) : null;
20
- return /* @__PURE__ */ jsxs(
21
- "button",
22
- {
23
- type: "button",
24
- onClick: () => ref.current?.click(),
25
- className: "relative flex aspect-square w-full max-w-xs items-center justify-center overflow-hidden rounded-xl border border-dashed border-border bg-muted/30 hover:border-primary/50",
26
- children: [
27
- /* @__PURE__ */ jsx("input", { ref, type: "file", accept: acceptFor("image"), className: "hidden", onChange: (e) => {
28
- const f = e.target.files?.[0];
29
- if (f) onPick(f);
30
- } }),
31
- preview ? /* @__PURE__ */ jsx(Image, { src: preview, alt: label, fill: true, unoptimized: true, className: "object-cover" }) : /* @__PURE__ */ jsxs("span", { className: "flex flex-col items-center gap-2 text-sm text-muted-foreground", children: [
32
- /* @__PURE__ */ jsx(ImagePlus, { className: "h-6 w-6" }),
33
- label
34
- ] })
35
- ]
36
- }
37
- );
38
- }
39
- function ArtworkSection({ draft, setDraft, errors }) {
40
- const intl = useFormat();
41
- const t = useT();
42
- return /* @__PURE__ */ jsxs(Section, { title: t("Artwork"), icon: /* @__PURE__ */ jsx(Images, { className: "h-4 w-4" }), children: [
43
- /* @__PURE__ */ jsx(
44
- ToggleGroup,
45
- {
46
- value: draft.kind === "edition" ? "Edition" : "Collection",
47
- options: ["Edition", "Collection"],
48
- onChange: (v) => setDraft({ kind: v === "Edition" ? "edition" : "collection" })
49
- }
50
- ),
51
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: draft.kind === "edition" ? t("One artwork, sold as numbered copies.") : t("Many unique items \u2014 each image becomes its own token.") }),
52
- draft.kind === "edition" ? /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
53
- /* @__PURE__ */ jsx(ImagePick, { file: draft.edition, onPick: (f) => setDraft({ edition: f }), label: t("Choose the artwork") }),
54
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
55
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", htmlFor: "drop-supply", children: t("Copies") }),
56
- /* @__PURE__ */ jsx(Input, { id: "drop-supply", inputMode: "numeric", value: draft.supply, onChange: (e) => setDraft({ supply: e.target.value.trim() }), className: "max-w-[10rem]" }),
57
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("Up to {MAX_DROP_SUPPLY}.", { MAX_DROP_SUPPLY: intl.number(MAX_DROP_SUPPLY) }) }),
58
- /* @__PURE__ */ jsx(FieldError, { message: errors.supply })
59
- ] })
60
- ] }) : /* @__PURE__ */ jsx(
61
- DropItemList,
62
- {
63
- items: draft.items,
64
- collectionName: draft.name,
65
- onAddFiles: (files) => setDraft({
66
- items: [...draft.items, ...files.map((file) => ({ id: crypto.randomUUID(), file, previewUrl: URL.createObjectURL(file), name: "", description: "" }))]
67
- }),
68
- onRemove: (id) => setDraft({ items: draft.items.filter((it) => it.id !== id) }),
69
- onEdit: (id, patch) => setDraft({ items: draft.items.map((it) => it.id === id ? { ...it, ...patch } : it) })
70
- }
71
- ),
72
- /* @__PURE__ */ jsx(FieldError, { message: errors.artwork })
73
- ] });
74
- }
75
- export {
76
- ArtworkSection,
77
- FieldError,
78
- ImagePick
79
- };
80
- //# sourceMappingURL=artwork-section.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/drop/create/artwork-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { useRef } from \"react\";\nimport { ImagePlus, Images } from \"lucide-react\";\nimport Image from \"../../image.js\";\nimport { Input } from \"../../input.js\";\nimport { Section, ToggleGroup } from \"../../create-form-primitives.js\";\nimport { DropItemList } from \"../../drop-item-list.js\";\nimport { MAX_DROP_SUPPLY } from \"../../../utils/drop/metadata.js\";\nimport type { DropDraft, DropDraftErrors } from \"../../../utils/drop/draft.js\";\nimport { previewUrl } from \"../../../utils/drop/preview.js\";\nimport { acceptFor } from \"../../../utils/upload-limits.js\";\nimport { useT } from \"../../../i18n/provider.js\";\nimport { useFormat } from \"../../../i18n/use-format.js\";\n\nexport interface SectionProps {\n draft: DropDraft;\n setDraft: (patch: Partial<DropDraft>) => void;\n errors: DropDraftErrors;\n}\n\nexport function FieldError({ message }: { message?: string }) {\n return message ? <p className=\"text-xs font-medium text-destructive\">{message}</p> : null;\n}\n\nexport function ImagePick({ file, onPick, label }: { file: File | null; onPick: (f: File) => void; label: string }) {\n const ref = useRef<HTMLInputElement | null>(null);\n const preview = file ? previewUrl(file) : null;\n return (\n <button type=\"button\" onClick={() => ref.current?.click()}\n className=\"relative flex aspect-square w-full max-w-xs items-center justify-center overflow-hidden rounded-xl border border-dashed border-border bg-muted/30 hover:border-primary/50\">\n <input ref={ref} type=\"file\" accept={acceptFor(\"image\")} className=\"hidden\" onChange={(e) => { const f = e.target.files?.[0]; if (f) onPick(f); }} />\n {preview\n ? <Image src={preview} alt={label} fill unoptimized className=\"object-cover\" />\n : <span className=\"flex flex-col items-center gap-2 text-sm text-muted-foreground\"><ImagePlus className=\"h-6 w-6\" />{label}</span>}\n </button>\n );\n}\n\nexport function ArtworkSection({ draft, setDraft, errors }: SectionProps) {\n const intl = useFormat();\n const t = useT();\n return (\n <Section title={t(\"Artwork\")} icon={<Images className=\"h-4 w-4\" />}>\n <ToggleGroup\n value={draft.kind === \"edition\" ? \"Edition\" : \"Collection\"}\n options={[\"Edition\", \"Collection\"]}\n onChange={(v) => setDraft({ kind: v === \"Edition\" ? \"edition\" : \"collection\" })}\n />\n <p className=\"text-xs text-muted-foreground\">\n {draft.kind === \"edition\"\n ? t(\"One artwork, sold as numbered copies.\")\n : t(\"Many unique items — each image becomes its own token.\")}\n </p>\n {draft.kind === \"edition\" ? (\n <div className=\"space-y-4\">\n <ImagePick file={draft.edition} onPick={(f) => setDraft({ edition: f })} label={t(\"Choose the artwork\")} />\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium\" htmlFor=\"drop-supply\">{t(\"Copies\")}</label>\n <Input id=\"drop-supply\" inputMode=\"numeric\" value={draft.supply} onChange={(e) => setDraft({ supply: e.target.value.trim() })} className=\"max-w-[10rem]\" />\n <p className=\"text-xs text-muted-foreground\">{t(\"Up to {MAX_DROP_SUPPLY}.\", { MAX_DROP_SUPPLY: intl.number(MAX_DROP_SUPPLY) })}</p>\n <FieldError message={errors.supply} />\n </div>\n </div>\n ) : (\n <DropItemList\n items={draft.items}\n collectionName={draft.name}\n onAddFiles={(files) => setDraft({\n items: [...draft.items, ...files.map((file) => ({ id: crypto.randomUUID(), file, previewUrl: URL.createObjectURL(file), name: \"\", description: \"\" }))],\n })}\n onRemove={(id) => setDraft({ items: draft.items.filter((it) => it.id !== id) })}\n onEdit={(id, patch) => setDraft({ items: draft.items.map((it) => (it.id === id ? { ...it, ...patch } : it)) })}\n />\n )}\n <FieldError message={errors.artwork} />\n </Section>\n );\n}\n"],"mappings":";AAsBmB,cAYT,YAZS;AApBnB,SAAS,cAAc;AACvB,SAAS,WAAW,cAAc;AAClC,OAAO,WAAW;AAClB,SAAS,aAAa;AACtB,SAAS,SAAS,mBAAmB;AACrC,SAAS,oBAAoB;AAC7B,SAAS,uBAAuB;AAEhC,SAAS,k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,EAAG,EAAE,CAAC;AAAA;AAAA,IAC/G;AAAA,IAEF,oBAAC,cAAW,SAAS,OAAO,SAAS;AAAA,KACvC;AAEJ;","names":[]}
@@ -1,115 +0,0 @@
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 details_section_exports = {};
21
- __export(details_section_exports, {
22
- DetailsSection: () => DetailsSection
23
- });
24
- module.exports = __toCommonJS(details_section_exports);
25
- var import_jsx_runtime = require("react/jsx-runtime");
26
- var import_lucide_react = require("lucide-react");
27
- var import_field_limits = require("../../../utils/field-limits.js");
28
- var import_input = require("../../input.js");
29
- var import_textarea = require("../../textarea.js");
30
- var import_create_form_primitives = require("../../create-form-primitives.js");
31
- var import_select = require("../../select.js");
32
- var import_ip = require("../../../data/ip.js");
33
- var import_launchpad_defaults = require("../../../utils/launchpad-defaults.js");
34
- var import_artwork_section = require("./artwork-section.js");
35
- var import_provider = require("../../../i18n/provider.js");
36
- function DetailsSection({ draft, setDraft, errors }) {
37
- const t = (0, import_provider.useT)();
38
- const license = draft.license;
39
- const setLicense = (patch) => setDraft({ license: { ...license, ...patch } });
40
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_create_form_primitives.Section, { title: t("Details"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.FileText, { className: "h-4 w-4" }), children: [
41
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
42
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm font-medium", children: [
43
- t("Cover image"),
44
- " ",
45
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-normal text-muted-foreground", children: t("(optional \u2014 the artwork is used otherwise)") })
46
- ] }),
47
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_artwork_section.ImagePick, { file: draft.cover, onPick: (f) => setDraft({ cover: f }), label: t("Choose a cover") })
48
- ] }),
49
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
50
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: "text-sm font-medium", htmlFor: "drop-name", children: t("Name") }),
51
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
52
- import_input.Input,
53
- {
54
- id: "drop-name",
55
- value: draft.name,
56
- maxLength: import_field_limits.FIELD_LIMITS.name,
57
- onChange: (e) => {
58
- const name = e.target.value;
59
- const auto = !draft.symbol || draft.symbol === (0, import_launchpad_defaults.suggestLaunchpadSymbol)(draft.name);
60
- setDraft(auto ? { name, symbol: (0, import_launchpad_defaults.suggestLaunchpadSymbol)(name) } : { name });
61
- }
62
- }
63
- ),
64
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_artwork_section.FieldError, { message: errors.name })
65
- ] }),
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
67
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: "text-sm font-medium", htmlFor: "drop-symbol", children: t("Symbol") }),
68
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
- import_input.Input,
70
- {
71
- id: "drop-symbol",
72
- value: draft.symbol,
73
- maxLength: import_field_limits.FIELD_LIMITS.symbol,
74
- className: "max-w-[10rem] uppercase",
75
- onChange: (e) => setDraft({ symbol: e.target.value.toUpperCase().replace(/[^A-Z0-9]/g, "") })
76
- }
77
- ),
78
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_artwork_section.FieldError, { message: errors.symbol })
79
- ] }),
80
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
81
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: "text-sm font-medium", htmlFor: "drop-description", children: t("Description") }),
82
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_textarea.Textarea, { id: "drop-description", value: draft.description, maxLength: import_field_limits.FIELD_LIMITS.description, rows: 3, onChange: (e) => setDraft({ description: e.target.value }) })
83
- ] }),
84
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3 border-t border-border/60 pt-4", children: [
85
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm font-medium", children: [
86
- t("License"),
87
- " ",
88
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-normal text-muted-foreground", children: t("\u2014 saved with every token") })
89
- ] }),
90
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { value: license.licenseType, onValueChange: (v) => {
91
- const def = import_ip.LICENSE_TYPES.find((l) => l.value === v);
92
- setLicense(def ? { licenseType: v, commercialUse: def.commercialUse, derivatives: def.derivatives, attribution: def.attribution } : { licenseType: v });
93
- }, children: [
94
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectValue, {}) }),
95
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectContent, { children: import_ip.LICENSE_TYPES.map((l) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItem, { value: l.value, children: t(l.label) }, l.value)) })
96
- ] }),
97
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-medium", children: t("Commercial use") }),
98
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: license.commercialUse, options: ["Yes", "No"], onChange: (v) => setLicense({ commercialUse: v }) }),
99
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-medium", children: t("Remixing") }),
100
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: license.derivatives, options: import_ip.DERIVATIVES_OPTIONS, onChange: (v) => setLicense({ derivatives: v }) }),
101
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-medium", children: t("AI training") }),
102
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: license.aiPolicy, options: import_ip.AI_POLICIES, onChange: (v) => setLicense({ aiPolicy: v }) }),
103
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-medium", children: t("Type") }),
104
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { value: license.ipType, onValueChange: (v) => setLicense({ ipType: v }), children: [
105
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectValue, {}) }),
106
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectContent, { children: import_ip.IP_TYPES.map((t2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItem, { value: t2, children: t2 }, t2)) })
107
- ] })
108
- ] })
109
- ] });
110
- }
111
- // Annotate the CommonJS export names for ESM import in node:
112
- 0 && (module.exports = {
113
- DetailsSection
114
- });
115
- //# sourceMappingURL=details-section.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/drop/create/details-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { FileText } from \"lucide-react\";\nimport { FIELD_LIMITS } from \"../../../utils/field-limits.js\";\nimport { Input } from \"../../input.js\";\nimport { Textarea } from \"../../textarea.js\";\nimport { Section, ToggleGroup } from \"../../create-form-primitives.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"../../select.js\";\nimport { AI_POLICIES, DERIVATIVES_OPTIONS, IP_TYPES, LICENSE_TYPES } from \"../../../data/ip.js\";\nimport { suggestLaunchpadSymbol } from \"../../../utils/launchpad-defaults.js\";\nimport { FieldError, ImagePick, type SectionProps } from \"./artwork-section.js\";\nimport { useT } from \"../../../i18n/provider.js\";\n\nexport function DetailsSection({ draft, setDraft, errors }: SectionProps) {\n const t = useT();\n const license = draft.license;\n const setLicense = (patch: Partial<typeof license>) => setDraft({ license: { ...license, ...patch } });\n return (\n <Section title={t(\"Details\")} icon={<FileText className=\"h-4 w-4\" />}>\n <div className=\"space-y-1.5\">\n <p className=\"text-sm font-medium\">{t(\"Cover image\")} <span className=\"font-normal text-muted-foreground\">{t(\"(optional — the artwork is used otherwise)\")}</span></p>\n <ImagePick file={draft.cover} onPick={(f) => setDraft({ cover: f })} label={t(\"Choose a cover\")} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium\" htmlFor=\"drop-name\">{t(\"Name\")}</label>\n <Input id=\"drop-name\" value={draft.name} maxLength={FIELD_LIMITS.name}\n onChange={(e) => {\n const name = e.target.value;\n const auto = !draft.symbol || draft.symbol === suggestLaunchpadSymbol(draft.name);\n setDraft(auto ? { name, symbol: suggestLaunchpadSymbol(name) } : { name });\n }} />\n <FieldError message={errors.name} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium\" htmlFor=\"drop-symbol\">{t(\"Symbol\")}</label>\n <Input id=\"drop-symbol\" value={draft.symbol} maxLength={FIELD_LIMITS.symbol} className=\"max-w-[10rem] uppercase\"\n onChange={(e) => setDraft({ symbol: e.target.value.toUpperCase().replace(/[^A-Z0-9]/g, \"\") })} />\n <FieldError message={errors.symbol} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium\" htmlFor=\"drop-description\">{t(\"Description\")}</label>\n <Textarea id=\"drop-description\" value={draft.description} maxLength={FIELD_LIMITS.description} rows={3} onChange={(e) => setDraft({ description: e.target.value })} />\n </div>\n <div className=\"space-y-3 border-t border-border/60 pt-4\">\n <p className=\"text-sm font-medium\">{t(\"License\")} <span className=\"font-normal text-muted-foreground\">{t(\"— saved with every token\")}</span></p>\n <Select value={license.licenseType} onValueChange={(v) => {\n const def = LICENSE_TYPES.find((l) => l.value === v);\n setLicense(def ? { licenseType: v, commercialUse: def.commercialUse, derivatives: def.derivatives, attribution: def.attribution } : { licenseType: v });\n }}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>{LICENSE_TYPES.map((l) => <SelectItem key={l.value} value={l.value}>{t(l.label)}</SelectItem>)}</SelectContent>\n </Select>\n <p className=\"text-xs font-medium\">{t(\"Commercial use\")}</p>\n <ToggleGroup value={license.commercialUse} options={[\"Yes\", \"No\"]} onChange={(v) => setLicense({ commercialUse: v })} />\n <p className=\"text-xs font-medium\">{t(\"Remixing\")}</p>\n <ToggleGroup value={license.derivatives} options={DERIVATIVES_OPTIONS} onChange={(v) => setLicense({ derivatives: v })} />\n <p className=\"text-xs font-medium\">{t(\"AI training\")}</p>\n <ToggleGroup value={license.aiPolicy} options={AI_POLICIES} onChange={(v) => setLicense({ aiPolicy: v })} />\n <p className=\"text-xs font-medium\">{t(\"Type\")}</p>\n <Select value={license.ipType} onValueChange={(v) => setLicense({ ipType: v })}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>{IP_TYPES.map((t) => <SelectItem key={t} value={t}>{t}</SelectItem>)}</SelectContent>\n </Select>\n </div>\n </Section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBwC;AAhBxC,0BAAyB;AACzB,0BAA6B;AAC7B,mBAAsB;AACtB,sBAAyB;AACzB,oCAAqC;AACrC,oBAA8E;AAC9E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,WAAU,uBAAuB,YAAE,gBAAgB,GAAE;AAAA,MACxD,4CAAC,6CAAY,OAAO,QAAQ,eAAe,SAAS,CAAC,OAAO,IAAI,GAAG,UAAU,CAAC,MAAM,WAAW,EAAE,eAAe,EAAE,CAAC,GAAG;AAAA,MACtH,4CAAC,OAAE,WAAU,uBAAuB,YAAE,UAAU,GAAE;AAAA,MAClD,4CAAC,6CAAY,OAAO,QAAQ,aAAa,SAAS,+BAAqB,UAAU,CAAC,MAAM,WAAW,EAAE,aAAa,EAAE,CAAC,GAAG;AAAA,MACxH,4CAAC,OAAE,WAAU,uBAAuB,YAAE,aAAa,GAAE;AAAA,MACrD,4CAAC,6CAAY,OAAO,QAAQ,UAAU,SAAS,uBAAa,UAAU,CAAC,MAAM,WAAW,EAAE,UAAU,EAAE,CAAC,GAAG;AAAA,MAC1G,4CAAC,OAAE,WAAU,uBAAuB,YAAE,MAAM,GAAE;AAAA,MAC9C,6CAAC,wBAAO,OAAO,QAAQ,QAAQ,eAAe,CAAC,MAAM,WAAW,EAAE,QAAQ,EAAE,CAAC,GAC3E;AAAA,oDAAC,+BAAc,sDAAC,6BAAY,GAAE;AAAA,QAC9B,4CAAC,+BAAe,6BAAS,IAAI,CAACA,OAAM,4CAAC,4BAAmB,OAAOA,IAAI,UAAAA,MAAdA,EAAgB,CAAa,GAAE;AAAA,SACtF;AAAA,OACF;AAAA,KACF;AAEJ;","names":["t"]}
@@ -1,13 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SectionProps } from './artwork-section.cjs';
3
- import '../../../utils/drop/draft.cjs';
4
- import '../../../i18n/make-t.cjs';
5
- import '../../../i18n/translate.cjs';
6
- import '../../drop-item-list.cjs';
7
- import '../../../utils/drop/metadata.cjs';
8
- import '@medialane/sdk';
9
- import '../../../utils/drop/sale.cjs';
10
-
11
- declare function DetailsSection({ draft, setDraft, errors }: SectionProps): react_jsx_runtime.JSX.Element;
12
-
13
- export { DetailsSection };
@@ -1,13 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SectionProps } from './artwork-section.js';
3
- import '../../../utils/drop/draft.js';
4
- import '../../../i18n/make-t.js';
5
- import '../../../i18n/translate.js';
6
- import '../../drop-item-list.js';
7
- import '../../../utils/drop/metadata.js';
8
- import '@medialane/sdk';
9
- import '../../../utils/drop/sale.js';
10
-
11
- declare function DetailsSection({ draft, setDraft, errors }: SectionProps): react_jsx_runtime.JSX.Element;
12
-
13
- export { DetailsSection };
@@ -1,91 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { FileText } from "lucide-react";
4
- import { FIELD_LIMITS } from "../../../utils/field-limits.js";
5
- import { Input } from "../../input.js";
6
- import { Textarea } from "../../textarea.js";
7
- import { Section, ToggleGroup } from "../../create-form-primitives.js";
8
- import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "../../select.js";
9
- import { AI_POLICIES, DERIVATIVES_OPTIONS, IP_TYPES, LICENSE_TYPES } from "../../../data/ip.js";
10
- import { suggestLaunchpadSymbol } from "../../../utils/launchpad-defaults.js";
11
- import { FieldError, ImagePick } from "./artwork-section.js";
12
- import { useT } from "../../../i18n/provider.js";
13
- function DetailsSection({ draft, setDraft, errors }) {
14
- const t = useT();
15
- const license = draft.license;
16
- const setLicense = (patch) => setDraft({ license: { ...license, ...patch } });
17
- return /* @__PURE__ */ jsxs(Section, { title: t("Details"), icon: /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4" }), children: [
18
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
19
- /* @__PURE__ */ jsxs("p", { className: "text-sm font-medium", children: [
20
- t("Cover image"),
21
- " ",
22
- /* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: t("(optional \u2014 the artwork is used otherwise)") })
23
- ] }),
24
- /* @__PURE__ */ jsx(ImagePick, { file: draft.cover, onPick: (f) => setDraft({ cover: f }), label: t("Choose a cover") })
25
- ] }),
26
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
27
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", htmlFor: "drop-name", children: t("Name") }),
28
- /* @__PURE__ */ jsx(
29
- Input,
30
- {
31
- id: "drop-name",
32
- value: draft.name,
33
- maxLength: FIELD_LIMITS.name,
34
- onChange: (e) => {
35
- const name = e.target.value;
36
- const auto = !draft.symbol || draft.symbol === suggestLaunchpadSymbol(draft.name);
37
- setDraft(auto ? { name, symbol: suggestLaunchpadSymbol(name) } : { name });
38
- }
39
- }
40
- ),
41
- /* @__PURE__ */ jsx(FieldError, { message: errors.name })
42
- ] }),
43
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
44
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", htmlFor: "drop-symbol", children: t("Symbol") }),
45
- /* @__PURE__ */ jsx(
46
- Input,
47
- {
48
- id: "drop-symbol",
49
- value: draft.symbol,
50
- maxLength: FIELD_LIMITS.symbol,
51
- className: "max-w-[10rem] uppercase",
52
- onChange: (e) => setDraft({ symbol: e.target.value.toUpperCase().replace(/[^A-Z0-9]/g, "") })
53
- }
54
- ),
55
- /* @__PURE__ */ jsx(FieldError, { message: errors.symbol })
56
- ] }),
57
- /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
58
- /* @__PURE__ */ jsx("label", { className: "text-sm font-medium", htmlFor: "drop-description", children: t("Description") }),
59
- /* @__PURE__ */ jsx(Textarea, { id: "drop-description", value: draft.description, maxLength: FIELD_LIMITS.description, rows: 3, onChange: (e) => setDraft({ description: e.target.value }) })
60
- ] }),
61
- /* @__PURE__ */ jsxs("div", { className: "space-y-3 border-t border-border/60 pt-4", children: [
62
- /* @__PURE__ */ jsxs("p", { className: "text-sm font-medium", children: [
63
- t("License"),
64
- " ",
65
- /* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: t("\u2014 saved with every token") })
66
- ] }),
67
- /* @__PURE__ */ jsxs(Select, { value: license.licenseType, onValueChange: (v) => {
68
- const def = LICENSE_TYPES.find((l) => l.value === v);
69
- setLicense(def ? { licenseType: v, commercialUse: def.commercialUse, derivatives: def.derivatives, attribution: def.attribution } : { licenseType: v });
70
- }, children: [
71
- /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, {}) }),
72
- /* @__PURE__ */ jsx(SelectContent, { children: LICENSE_TYPES.map((l) => /* @__PURE__ */ jsx(SelectItem, { value: l.value, children: t(l.label) }, l.value)) })
73
- ] }),
74
- /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: t("Commercial use") }),
75
- /* @__PURE__ */ jsx(ToggleGroup, { value: license.commercialUse, options: ["Yes", "No"], onChange: (v) => setLicense({ commercialUse: v }) }),
76
- /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: t("Remixing") }),
77
- /* @__PURE__ */ jsx(ToggleGroup, { value: license.derivatives, options: DERIVATIVES_OPTIONS, onChange: (v) => setLicense({ derivatives: v }) }),
78
- /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: t("AI training") }),
79
- /* @__PURE__ */ jsx(ToggleGroup, { value: license.aiPolicy, options: AI_POLICIES, onChange: (v) => setLicense({ aiPolicy: v }) }),
80
- /* @__PURE__ */ jsx("p", { className: "text-xs font-medium", children: t("Type") }),
81
- /* @__PURE__ */ jsxs(Select, { value: license.ipType, onValueChange: (v) => setLicense({ ipType: v }), children: [
82
- /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, {}) }),
83
- /* @__PURE__ */ jsx(SelectContent, { children: IP_TYPES.map((t2) => /* @__PURE__ */ jsx(SelectItem, { value: t2, children: t2 }, t2)) })
84
- ] })
85
- ] })
86
- ] });
87
- }
88
- export {
89
- DetailsSection
90
- };
91
- //# sourceMappingURL=details-section.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/drop/create/details-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { FileText } from \"lucide-react\";\nimport { FIELD_LIMITS } from \"../../../utils/field-limits.js\";\nimport { Input } from \"../../input.js\";\nimport { Textarea } from \"../../textarea.js\";\nimport { Section, ToggleGroup } from \"../../create-form-primitives.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"../../select.js\";\nimport { AI_POLICIES, DERIVATIVES_OPTIONS, IP_TYPES, LICENSE_TYPES } from \"../../../data/ip.js\";\nimport { suggestLaunchpadSymbol } from \"../../../utils/launchpad-defaults.js\";\nimport { FieldError, ImagePick, type SectionProps } from \"./artwork-section.js\";\nimport { useT } from \"../../../i18n/provider.js\";\n\nexport function DetailsSection({ draft, setDraft, errors }: SectionProps) {\n const t = useT();\n const license = draft.license;\n const setLicense = (patch: Partial<typeof license>) => setDraft({ license: { ...license, ...patch } });\n return (\n <Section title={t(\"Details\")} icon={<FileText className=\"h-4 w-4\" />}>\n <div className=\"space-y-1.5\">\n <p className=\"text-sm font-medium\">{t(\"Cover image\")} <span className=\"font-normal text-muted-foreground\">{t(\"(optional — the artwork is used otherwise)\")}</span></p>\n <ImagePick file={draft.cover} onPick={(f) => setDraft({ cover: f })} label={t(\"Choose a cover\")} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium\" htmlFor=\"drop-name\">{t(\"Name\")}</label>\n <Input id=\"drop-name\" value={draft.name} maxLength={FIELD_LIMITS.name}\n onChange={(e) => {\n const name = e.target.value;\n const auto = !draft.symbol || draft.symbol === suggestLaunchpadSymbol(draft.name);\n setDraft(auto ? { name, symbol: suggestLaunchpadSymbol(name) } : { name });\n }} />\n <FieldError message={errors.name} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium\" htmlFor=\"drop-symbol\">{t(\"Symbol\")}</label>\n <Input id=\"drop-symbol\" value={draft.symbol} maxLength={FIELD_LIMITS.symbol} className=\"max-w-[10rem] uppercase\"\n onChange={(e) => setDraft({ symbol: e.target.value.toUpperCase().replace(/[^A-Z0-9]/g, \"\") })} />\n <FieldError message={errors.symbol} />\n </div>\n <div className=\"space-y-1.5\">\n <label className=\"text-sm font-medium\" htmlFor=\"drop-description\">{t(\"Description\")}</label>\n <Textarea id=\"drop-description\" value={draft.description} maxLength={FIELD_LIMITS.description} rows={3} onChange={(e) => setDraft({ description: e.target.value })} />\n </div>\n <div className=\"space-y-3 border-t border-border/60 pt-4\">\n <p className=\"text-sm font-medium\">{t(\"License\")} <span className=\"font-normal text-muted-foreground\">{t(\"— saved with every token\")}</span></p>\n <Select value={license.licenseType} onValueChange={(v) => {\n const def = LICENSE_TYPES.find((l) => l.value === v);\n setLicense(def ? { licenseType: v, commercialUse: def.commercialUse, derivatives: def.derivatives, attribution: def.attribution } : { licenseType: v });\n }}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>{LICENSE_TYPES.map((l) => <SelectItem key={l.value} value={l.value}>{t(l.label)}</SelectItem>)}</SelectContent>\n </Select>\n <p className=\"text-xs font-medium\">{t(\"Commercial use\")}</p>\n <ToggleGroup value={license.commercialUse} options={[\"Yes\", \"No\"]} onChange={(v) => setLicense({ commercialUse: v })} />\n <p className=\"text-xs font-medium\">{t(\"Remixing\")}</p>\n <ToggleGroup value={license.derivatives} options={DERIVATIVES_OPTIONS} onChange={(v) => setLicense({ derivatives: v })} />\n <p className=\"text-xs font-medium\">{t(\"AI training\")}</p>\n <ToggleGroup value={license.aiPolicy} options={AI_POLICIES} onChange={(v) => setLicense({ aiPolicy: v })} />\n <p className=\"text-xs font-medium\">{t(\"Type\")}</p>\n <Select value={license.ipType} onValueChange={(v) => setLicense({ ipType: v })}>\n <SelectTrigger><SelectValue /></SelectTrigger>\n <SelectContent>{IP_TYPES.map((t) => <SelectItem key={t} value={t}>{t}</SelectItem>)}</SelectContent>\n </Select>\n </div>\n </Section>\n );\n}\n"],"mappings":";AAkBwC,cAEhC,YAFgC;AAhBxC,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,SA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E,OAAQ,YAAE,EAAE,KAAK,KAAnC,EAAE,KAAmC,CAAa,GAAE;AAAA,SAChH;AAAA,MACA,oBAAC,OAAE,WAAU,uBAAuB,YAAE,gBAAgB,GAAE;AAAA,MACxD,oBAAC,eAAY,OAAO,QAAQ,eAAe,SAAS,CAAC,OAAO,IAAI,GAAG,UAAU,CAAC,MAAM,WAAW,EAAE,eAAe,EAAE,CAAC,GAAG;AAAA,MACtH,oBAAC,OAAE,WAAU,uBAAuB,YAAE,UAAU,GAAE;AAAA,MAClD,oBAAC,eAAY,OAAO,QAAQ,aAAa,SAAS,qBAAqB,UAAU,CAAC,MAAM,WAAW,EAAE,aAAa,EAAE,CAAC,GAAG;AAAA,MACxH,oBAAC,OAAE,WAAU,uBAAuB,YAAE,aAAa,GAAE;AAAA,MACrD,oBAAC,eAAY,OAAO,QAAQ,UAAU,SAAS,aAAa,UAAU,CAAC,MAAM,WAAW,EAAE,UAAU,EAAE,CAAC,GAAG;AAAA,MAC1G,oBAAC,OAAE,WAAU,uBAAuB,YAAE,MAAM,GAAE;AAAA,MAC9C,qBAAC,UAAO,OAAO,QAAQ,QAAQ,eAAe,CAAC,MAAM,WAAW,EAAE,QAAQ,EAAE,CAAC,GAC3E;AAAA,4BAAC,iBAAc,8BAAC,eAAY,GAAE;AAAA,QAC9B,oBAAC,iBAAe,mBAAS,IAAI,CAACA,OAAM,oBAAC,cAAmB,OAAOA,IAAI,UAAAA,MAAdA,EAAgB,CAAa,GAAE;AAAA,SACtF;AAAA,OACF;AAAA,KACF;AAEJ;","names":["t"]}
@@ -1,67 +0,0 @@
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 list_section_exports = {};
21
- __export(list_section_exports, {
22
- ListSection: () => ListSection
23
- });
24
- module.exports = __toCommonJS(list_section_exports);
25
- var import_jsx_runtime = require("react/jsx-runtime");
26
- var import_lucide_react = require("lucide-react");
27
- var import_textarea = require("../../textarea.js");
28
- var import_create_form_primitives = require("../../create-form-primitives.js");
29
- var import_allowlist = require("../../../utils/drop/allowlist.js");
30
- var import_artwork_section = require("./artwork-section.js");
31
- var import_provider = require("../../../i18n/provider.js");
32
- function ListSection({ draft, setDraft, errors }) {
33
- const t = (0, import_provider.useT)();
34
- const parsed = draft.listOnly ? (0, import_allowlist.parseAllowlist)(draft.allowlist) : null;
35
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_create_form_primitives.Section, { title: t("Who can mint"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Users, { className: "h-4 w-4" }), children: [
36
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_create_form_primitives.ToggleGroup, { value: draft.listOnly ? "A list" : "Everyone", options: ["Everyone", "A list"], onChange: (v) => setDraft({ listOnly: v === "A list" }) }),
37
- draft.listOnly && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
38
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_textarea.Textarea, { rows: 6, placeholder: t("Paste wallet addresses, one per line"), value: draft.allowlist, onChange: (e) => setDraft({ allowlist: e.target.value }) }),
39
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: "inline-block cursor-pointer text-xs font-semibold text-primary", children: [
40
- t("Upload a CSV"),
41
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
- "input",
43
- {
44
- type: "file",
45
- accept: ".csv,text/csv,text/plain",
46
- className: "hidden",
47
- onChange: async (e) => {
48
- const f = e.target.files?.[0];
49
- if (f) setDraft({ allowlist: await f.text() });
50
- }
51
- }
52
- )
53
- ] }),
54
- parsed && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
55
- t.plural("{count} wallet", "{count} wallets", parsed.addresses.length),
56
- parsed.duplicates.length > 0 && ` \xB7 ${t.plural("{count} duplicate skipped", "{count} duplicates skipped", parsed.duplicates.length)}`
57
- ] }),
58
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: t("After launch you get a claim link for each wallet to share.") }),
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_artwork_section.FieldError, { message: errors.allowlist })
60
- ] })
61
- ] });
62
- }
63
- // Annotate the CommonJS export names for ESM import in node:
64
- 0 && (module.exports = {
65
- ListSection
66
- });
67
- //# sourceMappingURL=list-section.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/drop/create/list-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { Users } from \"lucide-react\";\nimport { Textarea } from \"../../textarea.js\";\nimport { Section, ToggleGroup } from \"../../create-form-primitives.js\";\nimport { parseAllowlist } from \"../../../utils/drop/allowlist.js\";\nimport { FieldError, type SectionProps } from \"./artwork-section.js\";\nimport { useT } from \"../../../i18n/provider.js\";\n\nexport function ListSection({ draft, setDraft, errors }: SectionProps) {\n const t = useT();\n const parsed = draft.listOnly ? parseAllowlist(draft.allowlist) : null;\n return (\n <Section title={t(\"Who can mint\")} icon={<Users className=\"h-4 w-4\" />}>\n <ToggleGroup value={draft.listOnly ? \"A list\" : \"Everyone\"} options={[\"Everyone\", \"A list\"]} onChange={(v) => setDraft({ listOnly: v === \"A list\" })} />\n {draft.listOnly && (\n <div className=\"space-y-2\">\n <Textarea rows={6} placeholder={t(\"Paste wallet addresses, one per line\")} value={draft.allowlist} onChange={(e) => setDraft({ allowlist: e.target.value })} />\n <label className=\"inline-block cursor-pointer text-xs font-semibold text-primary\">\n {t(\"Upload a CSV\")}\n <input type=\"file\" accept=\".csv,text/csv,text/plain\" className=\"hidden\"\n onChange={async (e) => { const f = e.target.files?.[0]; if (f) setDraft({ allowlist: await f.text() }); }} />\n </label>\n {parsed && (\n <p className=\"text-xs text-muted-foreground\">\n {t.plural(\"{count} wallet\", \"{count} wallets\", parsed.addresses.length)}\n {parsed.duplicates.length > 0 && ` · ${t.plural(\"{count} duplicate skipped\", \"{count} duplicates skipped\", parsed.duplicates.length)}`}\n </p>\n )}\n <p className=\"text-xs text-muted-foreground\">{t(\"After launch you get a claim link for each wallet to share.\")}</p>\n <FieldError message={errors.allowlist} />\n </div>\n )}\n </Section>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAa6C;AAX7C,0BAAsB;AACtB,sBAAyB;AACzB,oCAAqC;AACrC,uBAA+B;AAC/B,6BAA8C;AAC9C,sBAAqB;AAEd,SAAS,YAAY,EAAE,OAAO,UAAU,OAAO,GAAiB;AACrE,QAAM,QAAI,sBAAK;AACf,QAAM,SAAS,MAAM,eAAW,iCAAe,MAAM,SAAS,IAAI;AAClE,SACE,6CAAC,yCAAQ,OAAO,EAAE,cAAc,GAAG,MAAM,4CAAC,6BAAM,WAAU,WAAU,GAClE;AAAA,gDAAC,6CAAY,OAAO,MAAM,WAAW,WAAW,YAAY,SAAS,CAAC,YAAY,QAAQ,GAAG,UAAU,CAAC,MAAM,SAAS,EAAE,UAAU,MAAM,SAAS,CAAC,GAAG;AAAA,IACrJ,MAAM,YACL,6CAAC,SAAI,WAAU,aACb;AAAA,kDAAC,4BAAS,MAAM,GAAG,aAAa,EAAE,sCAAsC,GAAG,OAAO,MAAM,WAAW,UAAU,CAAC,MAAM,SAAS,EAAE,WAAW,EAAE,OAAO,MAAM,CAAC,GAAG;AAAA,MAC7J,6CAAC,WAAM,WAAU,kEACd;AAAA,UAAE,cAAc;AAAA,QACjB;AAAA,UAAC;AAAA;AAAA,YAAM,MAAK;AAAA,YAAO,QAAO;AAAA,YAA2B,WAAU;AAAA,YAC7D,UAAU,OAAO,MAAM;AAAE,oBAAM,IAAI,EAAE,OAAO,QAAQ,CAAC;AAAG,kBAAI,EAAG,UAAS,EAAE,WAAW,MAAM,EAAE,KAAK,EAAE,CAAC;AAAA,YAAG;AAAA;AAAA,QAAG;AAAA,SAC/G;AAAA,MACC,UACC,6CAAC,OAAE,WAAU,iCACV;AAAA,UAAE,OAAO,kBAAkB,mBAAmB,OAAO,UAAU,MAAM;AAAA,QACrE,OAAO,WAAW,SAAS,KAAK,SAAM,EAAE,OAAO,6BAA6B,8BAA8B,OAAO,WAAW,MAAM,CAAC;AAAA,SACtI;AAAA,MAEF,4CAAC,OAAE,WAAU,iCAAiC,YAAE,6DAA6D,GAAE;AAAA,MAC/G,4CAAC,qCAAW,SAAS,OAAO,WAAW;AAAA,OACzC;AAAA,KAEJ;AAEJ;","names":[]}
@@ -1,13 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SectionProps } from './artwork-section.cjs';
3
- import '../../../utils/drop/draft.cjs';
4
- import '../../../i18n/make-t.cjs';
5
- import '../../../i18n/translate.cjs';
6
- import '../../drop-item-list.cjs';
7
- import '../../../utils/drop/metadata.cjs';
8
- import '@medialane/sdk';
9
- import '../../../utils/drop/sale.cjs';
10
-
11
- declare function ListSection({ draft, setDraft, errors }: SectionProps): react_jsx_runtime.JSX.Element;
12
-
13
- export { ListSection };
@@ -1,13 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { SectionProps } from './artwork-section.js';
3
- import '../../../utils/drop/draft.js';
4
- import '../../../i18n/make-t.js';
5
- import '../../../i18n/translate.js';
6
- import '../../drop-item-list.js';
7
- import '../../../utils/drop/metadata.js';
8
- import '@medialane/sdk';
9
- import '../../../utils/drop/sale.js';
10
-
11
- declare function ListSection({ draft, setDraft, errors }: SectionProps): react_jsx_runtime.JSX.Element;
12
-
13
- export { ListSection };
@@ -1,43 +0,0 @@
1
- "use client";
2
- import { jsx, jsxs } from "react/jsx-runtime";
3
- import { Users } from "lucide-react";
4
- import { Textarea } from "../../textarea.js";
5
- import { Section, ToggleGroup } from "../../create-form-primitives.js";
6
- import { parseAllowlist } from "../../../utils/drop/allowlist.js";
7
- import { FieldError } from "./artwork-section.js";
8
- import { useT } from "../../../i18n/provider.js";
9
- function ListSection({ draft, setDraft, errors }) {
10
- const t = useT();
11
- const parsed = draft.listOnly ? parseAllowlist(draft.allowlist) : null;
12
- return /* @__PURE__ */ jsxs(Section, { title: t("Who can mint"), icon: /* @__PURE__ */ jsx(Users, { className: "h-4 w-4" }), children: [
13
- /* @__PURE__ */ jsx(ToggleGroup, { value: draft.listOnly ? "A list" : "Everyone", options: ["Everyone", "A list"], onChange: (v) => setDraft({ listOnly: v === "A list" }) }),
14
- draft.listOnly && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
15
- /* @__PURE__ */ jsx(Textarea, { rows: 6, placeholder: t("Paste wallet addresses, one per line"), value: draft.allowlist, onChange: (e) => setDraft({ allowlist: e.target.value }) }),
16
- /* @__PURE__ */ jsxs("label", { className: "inline-block cursor-pointer text-xs font-semibold text-primary", children: [
17
- t("Upload a CSV"),
18
- /* @__PURE__ */ jsx(
19
- "input",
20
- {
21
- type: "file",
22
- accept: ".csv,text/csv,text/plain",
23
- className: "hidden",
24
- onChange: async (e) => {
25
- const f = e.target.files?.[0];
26
- if (f) setDraft({ allowlist: await f.text() });
27
- }
28
- }
29
- )
30
- ] }),
31
- parsed && /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground", children: [
32
- t.plural("{count} wallet", "{count} wallets", parsed.addresses.length),
33
- parsed.duplicates.length > 0 && ` \xB7 ${t.plural("{count} duplicate skipped", "{count} duplicates skipped", parsed.duplicates.length)}`
34
- ] }),
35
- /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: t("After launch you get a claim link for each wallet to share.") }),
36
- /* @__PURE__ */ jsx(FieldError, { message: errors.allowlist })
37
- ] })
38
- ] });
39
- }
40
- export {
41
- ListSection
42
- };
43
- //# sourceMappingURL=list-section.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../../src/components/drop/create/list-section.tsx"],"sourcesContent":["\"use client\";\n\nimport { Users } from \"lucide-react\";\nimport { Textarea } from \"../../textarea.js\";\nimport { Section, ToggleGroup } from \"../../create-form-primitives.js\";\nimport { parseAllowlist } from \"../../../utils/drop/allowlist.js\";\nimport { FieldError, type SectionProps } from \"./artwork-section.js\";\nimport { useT } from \"../../../i18n/provider.js\";\n\nexport function ListSection({ draft, setDraft, errors }: SectionProps) {\n const t = useT();\n const parsed = draft.listOnly ? parseAllowlist(draft.allowlist) : null;\n return (\n <Section title={t(\"Who can mint\")} icon={<Users className=\"h-4 w-4\" />}>\n <ToggleGroup value={draft.listOnly ? \"A list\" : \"Everyone\"} options={[\"Everyone\", \"A list\"]} onChange={(v) => setDraft({ listOnly: v === \"A list\" })} />\n {draft.listOnly && (\n <div className=\"space-y-2\">\n <Textarea rows={6} placeholder={t(\"Paste wallet addresses, one per line\")} value={draft.allowlist} onChange={(e) => setDraft({ allowlist: e.target.value })} />\n <label className=\"inline-block cursor-pointer text-xs font-semibold text-primary\">\n {t(\"Upload a CSV\")}\n <input type=\"file\" accept=\".csv,text/csv,text/plain\" className=\"hidden\"\n onChange={async (e) => { const f = e.target.files?.[0]; if (f) setDraft({ allowlist: await f.text() }); }} />\n </label>\n {parsed && (\n <p className=\"text-xs text-muted-foreground\">\n {t.plural(\"{count} wallet\", \"{count} wallets\", parsed.addresses.length)}\n {parsed.duplicates.length > 0 && ` · ${t.plural(\"{count} duplicate skipped\", \"{count} duplicates skipped\", parsed.duplicates.length)}`}\n </p>\n )}\n <p className=\"text-xs text-muted-foreground\">{t(\"After launch you get a claim link for each wallet to share.\")}</p>\n <FieldError message={errors.allowlist} />\n </div>\n )}\n </Section>\n );\n}\n"],"mappings":";AAa6C,cAKnC,YALmC;AAX7C,SAAS,aAAa;AACtB,SAAS,gBAAgB;AACzB,SAAS,SAAS,mBAAmB;AACrC,SAAS,sBAAsB;AAC/B,SAAS,kBAAqC;AAC9C,SAAS,YAAY;AAEd,SAAS,YAAY,EAAE,OAAO,UAAU,OAAO,GAAiB;AACrE,QAAM,IAAI,KAAK;AACf,QAAM,SAAS,MAAM,WAAW,eAAe,MAAM,SAAS,IAAI;AAClE,SACE,qBAAC,WAAQ,OAAO,EAAE,cAAc,GAAG,MAAM,oBAAC,SAAM,WAAU,WAAU,GAClE;AAAA,wBAAC,eAAY,OAAO,MAAM,WAAW,WAAW,YAAY,SAAS,CAAC,YAAY,QAAQ,GAAG,UAAU,CAAC,MAAM,SAAS,EAAE,UAAU,MAAM,SAAS,CAAC,GAAG;AAAA,IACrJ,MAAM,YACL,qBAAC,SAAI,WAAU,aACb;AAAA,0BAAC,YAAS,MAAM,GAAG,aAAa,EAAE,sCAAsC,GAAG,OAAO,MAAM,WAAW,UAAU,CAAC,MAAM,SAAS,EAAE,WAAW,EAAE,OAAO,MAAM,CAAC,GAAG;AAAA,MAC7J,qBAAC,WAAM,WAAU,kEACd;AAAA,UAAE,cAAc;AAAA,QACjB;AAAA,UAAC;AAAA;AAAA,YAAM,MAAK;AAAA,YAAO,QAAO;AAAA,YAA2B,WAAU;AAAA,YAC7D,UAAU,OAAO,MAAM;AAAE,oBAAM,IAAI,EAAE,OAAO,QAAQ,CAAC;AAAG,kBAAI,EAAG,UAAS,EAAE,WAAW,MAAM,EAAE,KAAK,EAAE,CAAC;AAAA,YAAG;AAAA;AAAA,QAAG;AAAA,SAC/G;AAAA,MACC,UACC,qBAAC,OAAE,WAAU,iCACV;AAAA,UAAE,OAAO,kBAAkB,mBAAmB,OAAO,UAAU,MAAM;AAAA,Q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