@medialane/ui 0.388.0 → 0.389.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 (59) 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/drop/create/drop-create.cjs +148 -63
  8. package/dist/components/drop/create/drop-create.cjs.map +1 -1
  9. package/dist/components/drop/create/drop-create.d.cts +9 -6
  10. package/dist/components/drop/create/drop-create.d.ts +9 -6
  11. package/dist/components/drop/create/drop-create.js +147 -53
  12. package/dist/components/drop/create/drop-create.js.map +1 -1
  13. package/dist/components/drop/create/drop-fields.cjs +264 -0
  14. package/dist/components/drop/create/drop-fields.cjs.map +1 -0
  15. package/dist/components/drop/create/drop-fields.d.cts +39 -0
  16. package/dist/components/drop/create/drop-fields.d.ts +39 -0
  17. package/dist/components/drop/create/drop-fields.js +223 -0
  18. package/dist/components/drop/create/drop-fields.js.map +1 -0
  19. package/dist/components/fast-mint/dropzone.cjs +17 -7
  20. package/dist/components/fast-mint/dropzone.cjs.map +1 -1
  21. package/dist/components/fast-mint/dropzone.d.cts +6 -1
  22. package/dist/components/fast-mint/dropzone.d.ts +6 -1
  23. package/dist/components/fast-mint/dropzone.js +17 -7
  24. package/dist/components/fast-mint/dropzone.js.map +1 -1
  25. package/dist/i18n/catalog/pt.cjs +14 -11
  26. package/dist/i18n/catalog/pt.cjs.map +1 -1
  27. package/dist/i18n/catalog/pt.js +14 -11
  28. package/dist/i18n/catalog/pt.js.map +1 -1
  29. package/dist/index.cjs +0 -2
  30. package/dist/index.cjs.map +1 -1
  31. package/dist/index.d.cts +1 -1
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +1 -2
  34. package/dist/index.js.map +1 -1
  35. package/package.json +1 -1
  36. package/dist/components/drop/create/artwork-section.cjs +0 -116
  37. package/dist/components/drop/create/artwork-section.cjs.map +0 -1
  38. package/dist/components/drop/create/artwork-section.d.cts +0 -25
  39. package/dist/components/drop/create/artwork-section.d.ts +0 -25
  40. package/dist/components/drop/create/artwork-section.js +0 -80
  41. package/dist/components/drop/create/artwork-section.js.map +0 -1
  42. package/dist/components/drop/create/details-section.cjs +0 -115
  43. package/dist/components/drop/create/details-section.cjs.map +0 -1
  44. package/dist/components/drop/create/details-section.d.cts +0 -13
  45. package/dist/components/drop/create/details-section.d.ts +0 -13
  46. package/dist/components/drop/create/details-section.js +0 -91
  47. package/dist/components/drop/create/details-section.js.map +0 -1
  48. package/dist/components/drop/create/list-section.cjs +0 -67
  49. package/dist/components/drop/create/list-section.cjs.map +0 -1
  50. package/dist/components/drop/create/list-section.d.cts +0 -13
  51. package/dist/components/drop/create/list-section.d.ts +0 -13
  52. package/dist/components/drop/create/list-section.js +0 -43
  53. package/dist/components/drop/create/list-section.js.map +0 -1
  54. package/dist/components/drop/create/sale-section.cjs +0 -80
  55. package/dist/components/drop/create/sale-section.cjs.map +0 -1
  56. package/dist/components/drop/create/sale-section.d.cts +0 -15
  57. package/dist/components/drop/create/sale-section.d.ts +0 -15
  58. package/dist/components/drop/create/sale-section.js +0 -56
  59. package/dist/components/drop/create/sale-section.js.map +0 -1
@@ -1,116 +0,0 @@
1
- "use strict";
2
- "use client";
3
- var __create = Object.create;
4
- var __defProp = Object.defineProperty;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropNames = Object.getOwnPropertyNames;
7
- var __getProtoOf = Object.getPrototypeOf;
8
- var __hasOwnProp = Object.prototype.hasOwnProperty;
9
- var __export = (target, all) => {
10
- for (var name in all)
11
- __defProp(target, name, { get: all[name], enumerable: true });
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
- var artwork_section_exports = {};
31
- __export(artwork_section_exports, {
32
- ArtworkSection: () => ArtworkSection,
33
- FieldError: () => FieldError,
34
- ImagePick: () => ImagePick
35
- });
36
- module.exports = __toCommonJS(artwork_section_exports);
37
- var import_jsx_runtime = require("react/jsx-runtime");
38
- var import_react = require("react");
39
- var import_lucide_react = require("lucide-react");
40
- var import_image = __toESM(require("../../image.js"), 1);
41
- var import_input = require("../../input.js");
42
- var import_create_form_primitives = require("../../create-form-primitives.js");
43
- var import_drop_item_list = require("../../drop-item-list.js");
44
- var import_metadata = require("../../../utils/drop/metadata.js");
45
- var import_preview = require("../../../utils/drop/preview.js");
46
- var import_upload_limits = require("../../../utils/upload-limits.js");
47
- var import_provider = require("../../../i18n/provider.js");
48
- var import_use_format = require("../../../i18n/use-format.js");
49
- function FieldError({ message }) {
50
- return message ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-medium text-destructive", children: message }) : null;
51
- }
52
- function ImagePick({ file, onPick, label }) {
53
- const ref = (0, import_react.useRef)(null);
54
- const preview = file ? (0, import_preview.previewUrl)(file) : null;
55
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
56
- "button",
57
- {
58
- type: "button",
59
- onClick: () => ref.current?.click(),
60
- 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",
61
- children: [
62
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("input", { ref, type: "file", accept: (0, import_upload_limits.acceptFor)("image"), className: "hidden", onChange: (e) => {
63
- const f = e.target.files?.[0];
64
- if (f) onPick(f);
65
- } }),
66
- preview ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: preview, alt: label, fill: true, unoptimized: true, className: "object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex flex-col items-center gap-2 text-sm text-muted-foreground", children: [
67
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ImagePlus, { className: "h-6 w-6" }),
68
- label
69
- ] })
70
- ]
71
- }
72
- );
73
- }
74
- function ArtworkSection({ draft, setDraft, errors }) {
75
- const intl = (0, import_use_format.useFormat)();
76
- const t = (0, import_provider.useT)();
77
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_create_form_primitives.Section, { title: t("Artwork"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Images, { className: "h-4 w-4" }), children: [
78
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
79
- import_create_form_primitives.ToggleGroup,
80
- {
81
- value: draft.kind === "edition" ? "Edition" : "Collection",
82
- options: ["Edition", "Collection"],
83
- onChange: (v) => setDraft({ kind: v === "Edition" ? "edition" : "collection" })
84
- }
85
- ),
86
- /* @__PURE__ */ (0, import_jsx_runtime.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.") }),
87
- draft.kind === "edition" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4", children: [
88
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ImagePick, { file: draft.edition, onPick: (f) => setDraft({ edition: f }), label: t("Choose the artwork") }),
89
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
90
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: "text-sm font-medium", htmlFor: "drop-supply", children: t("Copies") }),
91
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { id: "drop-supply", inputMode: "numeric", value: draft.supply, onChange: (e) => setDraft({ supply: e.target.value.trim() }), className: "max-w-[10rem]" }),
92
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: t("Up to {MAX_DROP_SUPPLY}.", { MAX_DROP_SUPPLY: intl.number(import_metadata.MAX_DROP_SUPPLY) }) }),
93
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldError, { message: errors.supply })
94
- ] })
95
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
96
- import_drop_item_list.DropItemList,
97
- {
98
- items: draft.items,
99
- collectionName: draft.name,
100
- onAddFiles: (files) => setDraft({
101
- items: [...draft.items, ...files.map((file) => ({ id: crypto.randomUUID(), file, previewUrl: URL.createObjectURL(file), name: "", description: "" }))]
102
- }),
103
- onRemove: (id) => setDraft({ items: draft.items.filter((it) => it.id !== id) }),
104
- onEdit: (id, patch) => setDraft({ items: draft.items.map((it) => it.id === id ? { ...it, ...patch } : it) })
105
- }
106
- ),
107
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FieldError, { message: errors.artwork })
108
- ] });
109
- }
110
- // Annotate the CommonJS export names for ESM import in node:
111
- 0 && (module.exports = {
112
- ArtworkSection,
113
- FieldError,
114
- ImagePick
115
- });
116
- //# sourceMappingURL=artwork-section.cjs.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBmB;AApBnB,mBAAuB;AACvB,0BAAkC;AAClC,mBAAkB;AAClB,mBAAsB;AACtB,oCAAqC;AACrC,4BAA6B;AAC7B,sBAAgC;AAEhC,qBAA2B;AAC3B,2BAA0B;AAC1B,sBAAqB;AACrB,wBAA0B;AAQnB,SAAS,WAAW,EAAE,QAAQ,GAAyB;AAC5D,SAAO,UAAU,4CAAC,OAAE,WAAU,wCAAwC,mBAAQ,IAAO;AACvF;AAEO,SAAS,UAAU,EAAE,MAAM,QAAQ,MAAM,GAAoE;AAClH,QAAM,UAAM,qBAAgC,IAAI;AAChD,QAAM,UAAU,WAAO,2BAAW,IAAI,I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AAAA,oDAAC,WAAM,WAAU,uBAAsB,SAAQ,eAAe,YAAE,QAAQ,GAAE;AAAA,QAC1E,4CAAC,sBAAM,IAAG,eAAc,WAAU,WAAU,OAAO,MAAM,QAAQ,UAAU,CAAC,MAAM,SAAS,EAAE,QAAQ,EAAE,OAAO,MAAM,KAAK,EAAE,CAAC,GAAG,WAAU,iBAAgB;AAAA,QACzJ,4CAAC,OAAE,WAAU,iCAAiC,YAAE,4BAA4B,EAAE,iBAAiB,KAAK,OAAO,+BAAe,EAAE,CAAC,GAAE;AAAA,QAC/H,4CAAC,cAAW,SAAS,OAAO,QAAQ;AAAA,SACtC;AAAA,OACF,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,MAAM;AAAA,QACb,gBAAgB,MAAM;AAAA,QACtB,YAAY,CAAC,UAAU,SAAS;AAAA,UAC9B,OAAO,CAAC,GAAG,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,IAAI,OAAO,WAAW,GAAG,MAAM,YAAY,IAAI,gBAAgB,IAAI,GAAG,MAAM,IAAI,aAAa,GAAG,EAAE,CAAC;AAAA,QACvJ,CAAC;AAAA,QACD,UAAU,CAAC,OAAO,SAAS,EAAE,OAAO,MAAM,MAAM,OAAO,CAAC,OAAO,GAAG,OAAO,EAAE,EAAE,CAAC;AAAA,QAC9E,QAAQ,CAAC,IAAI,UAAU,SAAS,EAAE,OAAO,MAAM,MAAM,IAAI,CAAC,OAAQ,GAAG,OAAO,KAAK,EAAE,GAAG,IAAI,GAAG,MAAM,IAAI,EAAG,EAAE,CAAC;AAAA;AAAA,IAC/G;AAAA,IAEF,4CAAC,cAAW,SAAS,OAAO,SAAS;AAAA,KACvC;AAEJ;","names":["Image"]}
@@ -1,25 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { DropDraft, DropDraftErrors } from '../../../utils/drop/draft.cjs';
3
- import '../../../i18n/make-t.cjs';
4
- import '../../../i18n/translate.cjs';
5
- import '../../drop-item-list.cjs';
6
- import '../../../utils/drop/metadata.cjs';
7
- import '@medialane/sdk';
8
- import '../../../utils/drop/sale.cjs';
9
-
10
- interface SectionProps {
11
- draft: DropDraft;
12
- setDraft: (patch: Partial<DropDraft>) => void;
13
- errors: DropDraftErrors;
14
- }
15
- declare function FieldError({ message }: {
16
- message?: string;
17
- }): react_jsx_runtime.JSX.Element | null;
18
- declare function ImagePick({ file, onPick, label }: {
19
- file: File | null;
20
- onPick: (f: File) => void;
21
- label: string;
22
- }): react_jsx_runtime.JSX.Element;
23
- declare function ArtworkSection({ draft, setDraft, errors }: SectionProps): react_jsx_runtime.JSX.Element;
24
-
25
- export { ArtworkSection, FieldError, ImagePick, type SectionProps };
@@ -1,25 +0,0 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { DropDraft, DropDraftErrors } from '../../../utils/drop/draft.js';
3
- import '../../../i18n/make-t.js';
4
- import '../../../i18n/translate.js';
5
- import '../../drop-item-list.js';
6
- import '../../../utils/drop/metadata.js';
7
- import '@medialane/sdk';
8
- import '../../../utils/drop/sale.js';
9
-
10
- interface SectionProps {
11
- draft: DropDraft;
12
- setDraft: (patch: Partial<DropDraft>) => void;
13
- errors: DropDraftErrors;
14
- }
15
- declare function FieldError({ message }: {
16
- message?: string;
17
- }): react_jsx_runtime.JSX.Element | null;
18
- declare function ImagePick({ file, onPick, label }: {
19
- file: File | null;
20
- onPick: (f: File) => void;
21
- label: string;
22
- }): react_jsx_runtime.JSX.Element;
23
- declare function ArtworkSection({ draft, setDraft, errors }: SectionProps): react_jsx_runtime.JSX.Element;
24
-
25
- export { ArtworkSection, FieldError, ImagePick, type SectionProps };
@@ -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,kBAAkB;AAC3B,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AACrB,SAAS,iBAAiB;AAQnB,SAAS,WAAW,EAAE,QAAQ,GAAyB;AAC5D,SAAO,UAAU,oBAAC,OAAE,WAAU,wCAAwC,mBAAQ,IAAO;AACvF;AAEO,SAAS,UAAU,EAAE,MAAM,QAAQ,MAAM,GAAoE;AAClH,QAAM,MAAM,OAAgC,IAAI;AAChD,QAAM,UAAU,OAAO,WAAW,IAAI,IA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AU,uBAAsB,SAAQ,eAAe,YAAE,QAAQ,GAAE;AAAA,QAC1E,oBAAC,SAAM,IAAG,eAAc,WAAU,WAAU,OAAO,MAAM,QAAQ,UAAU,CAAC,MAAM,SAAS,EAAE,QAAQ,EAAE,OAAO,MAAM,KAAK,EAAE,CAAC,GAAG,WAAU,iBAAgB;AAAA,QACzJ,oBAAC,OAAE,WAAU,iCAAiC,YAAE,4BAA4B,EAAE,iBAAiB,KAAK,OAAO,eAAe,EAAE,CAAC,GAAE;AAAA,QAC/H,oBAAC,cAAW,SAAS,OAAO,QAAQ;AAAA,SACtC;AAAA,OACF,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,OAAO,MAAM;AAAA,QACb,gBAAgB,MAAM;AAAA,QACtB,YAAY,CAAC,UAAU,SAAS;AAAA,UAC9B,OAAO,CAAC,GAAG,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,IAAI,OAAO,WAAW,GAAG,MAAM,YAAY,IAAI,gBAAgB,IAAI,GAAG,MAAM,IAAI,aAAa,GAAG,EAAE,CAAC;AAAA,QACvJ,CAAC;AAAA,QACD,UAAU,CAAC,OAAO,SAAS,EAAE,OAAO,MAAM,MAAM,OAAO,CAAC,OAAO,GAAG,OAAO,EAAE,EAAE,CAAC;AAAA,QAC9E,QAAQ,CAAC,IAAI,UAAU,SAAS,EAAE,OAAO,MAAM,MAAM,IAAI,CAAC,OAAQ,GAAG,OAAO,KAAK,EAAE,GAAG,IAAI,GAAG,MAAM,IAAI,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,gBAA0E;AAC1E,gCAAuC;AACvC,6BAAyD;AACzD,sBAAqB;AAEd,SAAS,eAAe,EAAE,OAAO,UAAU,OAAO,GAAiB;AACxE,QAAM,QAAI,sBAAK;AACf,QAAM,UAAU,MAAM;AACtB,QAAM,aAAa,CAAC,UAAmC,SAAS,EAAE,SAAS,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAAC;AACrG,SACE,6CAAC,yCAAQ,OAAO,EAAE,SAAS,GAAG,MA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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,SAAS,mBAAmB;AACrC,SAAS,QAAQ,eAAe,YAAY,eAAe,mBAAmB;AAC9E,SAAS,aAAa,qBAAqB,UAAU,qBAAqB;AAC1E,SAAS,8BAA8B;AACvC,SAAS,YAAY,iBAAoC;AACzD,SAAS,YAAY;AAEd,SAAS,eAAe,EAAE,OAAO,UAAU,OAAO,GAAiB;AACxE,QAAM,IAAI,KAAK;AACf,QAAM,UAAU,MAAM;AACtB,QAAM,aAAa,CAAC,UAAmC,SA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