@medialane/ui 0.389.0 → 0.390.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/badge.d.cts +1 -1
- package/dist/components/badge.d.ts +1 -1
- package/dist/components/button.d.cts +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/claim-rail.cjs +2 -2
- package/dist/components/claim-rail.cjs.map +1 -1
- package/dist/components/claim-rail.d.cts +3 -2
- package/dist/components/claim-rail.d.ts +3 -2
- package/dist/components/claim-rail.js +2 -2
- package/dist/components/claim-rail.js.map +1 -1
- package/dist/components/create-form-primitives.cjs +1 -1
- package/dist/components/create-form-primitives.cjs.map +1 -1
- package/dist/components/create-form-primitives.js +1 -1
- package/dist/components/create-form-primitives.js.map +1 -1
- package/dist/components/drop/create/drop-create.cjs +72 -107
- package/dist/components/drop/create/drop-create.cjs.map +1 -1
- package/dist/components/drop/create/drop-create.d.cts +12 -6
- package/dist/components/drop/create/drop-create.d.ts +12 -6
- package/dist/components/drop/create/drop-create.js +73 -110
- package/dist/components/drop/create/drop-create.js.map +1 -1
- package/dist/components/drop/create/drop-fields.cjs +124 -99
- package/dist/components/drop/create/drop-fields.cjs.map +1 -1
- package/dist/components/drop/create/drop-fields.d.cts +15 -11
- package/dist/components/drop/create/drop-fields.d.ts +15 -11
- package/dist/components/drop/create/drop-fields.js +122 -98
- package/dist/components/drop/create/drop-fields.js.map +1 -1
- package/dist/components/drop/create/launch-dialog.d.cts +0 -1
- package/dist/components/drop/create/launch-dialog.d.ts +0 -1
- package/dist/components/fast-mint/dropzone.cjs +7 -17
- package/dist/components/fast-mint/dropzone.cjs.map +1 -1
- package/dist/components/fast-mint/dropzone.d.cts +1 -6
- package/dist/components/fast-mint/dropzone.d.ts +1 -6
- package/dist/components/fast-mint/dropzone.js +7 -17
- package/dist/components/fast-mint/dropzone.js.map +1 -1
- package/dist/i18n/catalog/pt.cjs +11 -23
- package/dist/i18n/catalog/pt.cjs.map +1 -1
- package/dist/i18n/catalog/pt.js +11 -23
- package/dist/i18n/catalog/pt.js.map +1 -1
- package/dist/index.cjs +0 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +0 -2
- package/dist/index.js.map +1 -1
- package/dist/utils/drop/draft.cjs.map +1 -1
- package/dist/utils/drop/draft.d.cts +9 -3
- package/dist/utils/drop/draft.d.ts +9 -3
- package/dist/utils/drop/draft.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/drop-item-list.cjs +0 -123
- package/dist/components/drop-item-list.cjs.map +0 -1
- package/dist/components/drop-item-list.d.cts +0 -19
- package/dist/components/drop-item-list.d.ts +0 -19
- package/dist/components/drop-item-list.js +0 -89
- package/dist/components/drop-item-list.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/drop/draft.ts"],"sourcesContent":["import type { T } from \"../../i18n/make-t.js\";\nimport
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/drop/draft.ts"],"sourcesContent":["import type { T } from \"../../i18n/make-t.js\";\nimport { isPositiveInteger, isSymbol } from \"../launchpad-rules.js\";\nimport { parseAllowlist } from \"./allowlist.js\";\nimport { MAX_DROP_SUPPLY, type DropKind, type DropLicense } from \"./metadata.js\";\nimport { EMPTY_SALE, validateSale, type SaleDraft, type SaleErrors } from \"./sale.js\";\nimport { formatNumber } from \"../../i18n/format.js\";\n\n/** One image of a collection drop, with its optional own name and description. */\nexport interface DraftItem {\n id: string;\n file: File;\n previewUrl: string;\n name: string;\n description: string;\n}\n\nexport interface DropDraft {\n kind: DropKind;\n edition: File | null;\n supply: string;\n items: DraftItem[];\n cover: File | null;\n name: string;\n symbol: string;\n description: string;\n license: DropLicense;\n sale: SaleDraft;\n listOnly: boolean;\n allowlist: string;\n gated: { enabled: boolean; title: string; url: string; type: string };\n}\n\nexport const EMPTY_DRAFT: DropDraft = {\n kind: \"edition\",\n edition: null,\n supply: \"100\",\n items: [],\n cover: null,\n name: \"\",\n symbol: \"\",\n description: \"\",\n license: {\n ipType: \"Art\", licenseType: \"CC BY-SA\", commercialUse: \"Yes\", derivatives: \"Share-Alike\",\n attribution: \"Required\", geographicScope: \"Worldwide\", aiPolicy: \"Allowed\", royalty: \"0\",\n },\n sale: EMPTY_SALE,\n listOnly: false,\n allowlist: \"\",\n gated: { enabled: false, title: \"\", url: \"\", type: \"\" },\n};\n\nexport type DropDraftErrors = SaleErrors & Partial<Record<\"artwork\" | \"supply\" | \"name\" | \"symbol\" | \"allowlist\" | \"gated\", string>>;\n\nexport function draftSupply(d: DropDraft): number {\n return d.kind === \"edition\" ? Number(d.supply) : d.items.length;\n}\n\nconst thousands = formatNumber(MAX_DROP_SUPPLY);\n\nexport function validateDropDraft(d: DropDraft, now: number): DropDraftErrors {\n const e: DropDraftErrors = { ...validateSale(d.sale, now) };\n if (d.kind === \"edition\") {\n if (!d.edition) e.artwork = \"Add the artwork\";\n if (!isPositiveInteger(d.supply) || Number(d.supply) > MAX_DROP_SUPPLY) e.supply = `Enter a supply from 1 to ${thousands}`;\n } else if (d.items.length === 0) {\n e.artwork = \"Add at least one item\";\n } else if (d.items.length > MAX_DROP_SUPPLY) {\n e.artwork = `A collection holds up to ${thousands} items`;\n }\n if (!d.name.trim()) e.name = \"Name your drop\";\n if (!isSymbol(d.symbol)) e.symbol = \"Use 1–10 capital letters or digits\";\n if (d.listOnly) {\n const list = parseAllowlist(d.allowlist);\n if (list.invalid.length > 0) {\n const n = list.invalid.length;\n e.allowlist = `${n} line${n === 1 ? \" isn't a wallet address\" : \"s aren't wallet addresses\"}: ${list.invalid.slice(0, 3).join(\", \")}`;\n } else if (list.addresses.length === 0) {\n e.allowlist = \"Add at least one wallet address\";\n }\n }\n if (d.gated.enabled && !/^https:\\/\\//.test(d.gated.url)) e.gated = \"Add a link starting with https://\";\n return e;\n}\n\nexport function supplyLabel(t: T, kind: DropKind, supply: number, formatted: string): string {\n return kind === \"edition\"\n ? t.plural(\"{count} copy\", \"{count} copies\", supply, { count: formatted })\n : t.plural(\"{count} item\", \"{count} items\", supply, { count: formatted });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,6BAA4C;AAC5C,uBAA+B;AAC/B,sBAAiE;AACjE,kBAA0E;AAC1E,oBAA6B;AA2BtB,MAAM,cAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO,CAAC;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,IACP,QAAQ;AAAA,IAAO,aAAa;AAAA,IAAY,eAAe;AAAA,IAAO,aAAa;AAAA,IAC3E,aAAa;AAAA,IAAY,iBAAiB;AAAA,IAAa,UAAU;AAAA,IAAW,SAAS;AAAA,EACvF;AAAA,EACA,MAAM;AAAA,EACN,UAAU;AAAA,EACV,WAAW;AAAA,EACX,OAAO,EAAE,SAAS,OAAO,OAAO,IAAI,KAAK,IAAI,MAAM,GAAG;AACxD;AAIO,SAAS,YAAY,GAAsB;AAChD,SAAO,EAAE,SAAS,YAAY,OAAO,EAAE,MAAM,IAAI,EAAE,MAAM;AAC3D;AAEA,MAAM,gBAAY,4BAAa,+BAAe;AAEvC,SAAS,kBAAkB,GAAc,KAA8B;AAC5E,QAAM,IAAqB,EAAE,OAAG,0BAAa,EAAE,MAAM,GAAG,EAAE;AAC1D,MAAI,EAAE,SAAS,WAAW;AACxB,QAAI,CAAC,EAAE,QAAS,GAAE,UAAU;AAC5B,QAAI,KAAC,0CAAkB,EAAE,MAAM,KAAK,OAAO,EAAE,MAAM,IAAI,gCAAiB,GAAE,SAAS,4BAA4B,SAAS;AAAA,EAC1H,WAAW,EAAE,MAAM,WAAW,GAAG;AAC/B,MAAE,UAAU;AAAA,EACd,WAAW,EAAE,MAAM,SAAS,iCAAiB;AAC3C,MAAE,UAAU,4BAA4B,SAAS;AAAA,EACnD;AACA,MAAI,CAAC,EAAE,KAAK,KAAK,EAAG,GAAE,OAAO;AAC7B,MAAI,KAAC,iCAAS,EAAE,MAAM,EAAG,GAAE,SAAS;AACpC,MAAI,EAAE,UAAU;AACd,UAAM,WAAO,iCAAe,EAAE,SAAS;AACvC,QAAI,KAAK,QAAQ,SAAS,GAAG;AAC3B,YAAM,IAAI,KAAK,QAAQ;AACvB,QAAE,YAAY,GAAG,CAAC,QAAQ,MAAM,IAAI,4BAA4B,2BAA2B,KAAK,KAAK,QAAQ,MAAM,GAAG,CAAC,EAAE,KAAK,IAAI,CAAC;AAAA,IACrI,WAAW,KAAK,UAAU,WAAW,GAAG;AACtC,QAAE,YAAY;AAAA,IAChB;AAAA,EACF;AACA,MAAI,EAAE,MAAM,WAAW,CAAC,cAAc,KAAK,EAAE,MAAM,GAAG,EAAG,GAAE,QAAQ;AACnE,SAAO;AACT;AAEO,SAAS,YAAY,GAAM,MAAgB,QAAgB,WAA2B;AAC3F,SAAO,SAAS,YACZ,EAAE,OAAO,gBAAgB,kBAAkB,QAAQ,EAAE,OAAO,UAAU,CAAC,IACvE,EAAE,OAAO,gBAAgB,iBAAiB,QAAQ,EAAE,OAAO,UAAU,CAAC;AAC5E;","names":[]}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { T } from '../../i18n/make-t.cjs';
|
|
2
|
-
import { DraftItem } from '../../components/drop-item-list.cjs';
|
|
3
2
|
import { DropKind, DropLicense } from './metadata.cjs';
|
|
4
3
|
import { SaleDraft, SaleErrors } from './sale.cjs';
|
|
5
4
|
import '../../i18n/translate.cjs';
|
|
6
|
-
import 'react/jsx-runtime';
|
|
7
5
|
import '@medialane/sdk';
|
|
8
6
|
|
|
7
|
+
/** One image of a collection drop, with its optional own name and description. */
|
|
8
|
+
interface DraftItem {
|
|
9
|
+
id: string;
|
|
10
|
+
file: File;
|
|
11
|
+
previewUrl: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
9
15
|
interface DropDraft {
|
|
10
16
|
kind: DropKind;
|
|
11
17
|
edition: File | null;
|
|
@@ -32,4 +38,4 @@ declare function draftSupply(d: DropDraft): number;
|
|
|
32
38
|
declare function validateDropDraft(d: DropDraft, now: number): DropDraftErrors;
|
|
33
39
|
declare function supplyLabel(t: T, kind: DropKind, supply: number, formatted: string): string;
|
|
34
40
|
|
|
35
|
-
export { type DropDraft, type DropDraftErrors, EMPTY_DRAFT, draftSupply, supplyLabel, validateDropDraft };
|
|
41
|
+
export { type DraftItem, type DropDraft, type DropDraftErrors, EMPTY_DRAFT, draftSupply, supplyLabel, validateDropDraft };
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { T } from '../../i18n/make-t.js';
|
|
2
|
-
import { DraftItem } from '../../components/drop-item-list.js';
|
|
3
2
|
import { DropKind, DropLicense } from './metadata.js';
|
|
4
3
|
import { SaleDraft, SaleErrors } from './sale.js';
|
|
5
4
|
import '../../i18n/translate.js';
|
|
6
|
-
import 'react/jsx-runtime';
|
|
7
5
|
import '@medialane/sdk';
|
|
8
6
|
|
|
7
|
+
/** One image of a collection drop, with its optional own name and description. */
|
|
8
|
+
interface DraftItem {
|
|
9
|
+
id: string;
|
|
10
|
+
file: File;
|
|
11
|
+
previewUrl: string;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
}
|
|
9
15
|
interface DropDraft {
|
|
10
16
|
kind: DropKind;
|
|
11
17
|
edition: File | null;
|
|
@@ -32,4 +38,4 @@ declare function draftSupply(d: DropDraft): number;
|
|
|
32
38
|
declare function validateDropDraft(d: DropDraft, now: number): DropDraftErrors;
|
|
33
39
|
declare function supplyLabel(t: T, kind: DropKind, supply: number, formatted: string): string;
|
|
34
40
|
|
|
35
|
-
export { type DropDraft, type DropDraftErrors, EMPTY_DRAFT, draftSupply, supplyLabel, validateDropDraft };
|
|
41
|
+
export { type DraftItem, type DropDraft, type DropDraftErrors, EMPTY_DRAFT, draftSupply, supplyLabel, validateDropDraft };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/utils/drop/draft.ts"],"sourcesContent":["import type { T } from \"../../i18n/make-t.js\";\nimport
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/drop/draft.ts"],"sourcesContent":["import type { T } from \"../../i18n/make-t.js\";\nimport { isPositiveInteger, isSymbol } from \"../launchpad-rules.js\";\nimport { parseAllowlist } from \"./allowlist.js\";\nimport { MAX_DROP_SUPPLY, type DropKind, type DropLicense } from \"./metadata.js\";\nimport { EMPTY_SALE, validateSale, type SaleDraft, type SaleErrors } from \"./sale.js\";\nimport { formatNumber } from \"../../i18n/format.js\";\n\n/** One image of a collection drop, with its optional own name and description. */\nexport interface DraftItem {\n id: string;\n file: File;\n previewUrl: string;\n name: string;\n description: string;\n}\n\nexport interface DropDraft {\n kind: DropKind;\n edition: File | null;\n supply: string;\n items: DraftItem[];\n cover: File | null;\n name: string;\n symbol: string;\n description: string;\n license: DropLicense;\n sale: SaleDraft;\n listOnly: boolean;\n allowlist: string;\n gated: { enabled: boolean; title: string; url: string; type: string };\n}\n\nexport const EMPTY_DRAFT: DropDraft = {\n kind: \"edition\",\n edition: null,\n supply: \"100\",\n items: [],\n cover: null,\n name: \"\",\n symbol: \"\",\n description: \"\",\n license: {\n ipType: \"Art\", licenseType: \"CC BY-SA\", commercialUse: \"Yes\", derivatives: \"Share-Alike\",\n attribution: \"Required\", geographicScope: \"Worldwide\", aiPolicy: \"Allowed\", royalty: \"0\",\n },\n sale: EMPTY_SALE,\n listOnly: false,\n allowlist: \"\",\n gated: { enabled: false, title: \"\", url: \"\", type: \"\" },\n};\n\nexport type DropDraftErrors = SaleErrors & Partial<Record<\"artwork\" | \"supply\" | \"name\" | \"symbol\" | \"allowlist\" | \"gated\", string>>;\n\nexport function draftSupply(d: DropDraft): number {\n return d.kind === \"edition\" ? Number(d.supply) : d.items.length;\n}\n\nconst thousands = formatNumber(MAX_DROP_SUPPLY);\n\nexport function validateDropDraft(d: DropDraft, now: number): DropDraftErrors {\n const e: DropDraftErrors = { ...validateSale(d.sale, now) };\n if (d.kind === \"edition\") {\n if (!d.edition) e.artwork = \"Add the artwork\";\n if (!isPositiveInteger(d.supply) || Number(d.supply) > MAX_DROP_SUPPLY) e.supply = `Enter a supply from 1 to ${thousands}`;\n } else if (d.items.length === 0) {\n e.artwork = \"Add at least one item\";\n } else if (d.items.length > MAX_DROP_SUPPLY) {\n e.artwork = `A collection holds up to ${thousands} items`;\n }\n if (!d.name.trim()) e.name = \"Name your drop\";\n if (!isSymbol(d.symbol)) e.symbol = \"Use 1–10 capital letters or digits\";\n if (d.listOnly) {\n const list = parseAllowlist(d.allowlist);\n if (list.invalid.length > 0) {\n const n = list.invalid.length;\n e.allowlist = `${n} line${n === 1 ? \" isn't a wallet address\" : \"s aren't wallet addresses\"}: ${list.invalid.slice(0, 3).join(\", \")}`;\n } else if (list.addresses.length === 0) {\n e.allowlist = \"Add at least one wallet address\";\n }\n }\n if (d.gated.enabled && !/^https:\\/\\//.test(d.gated.url)) e.gated = \"Add a link starting with https://\";\n return e;\n}\n\nexport function supplyLabel(t: T, kind: DropKind, supply: number, formatted: string): string {\n return kind === \"edition\"\n ? t.plural(\"{count} copy\", \"{count} copies\", supply, { count: formatted })\n : t.plural(\"{count} item\", \"{count} items\", supply, { count: formatted });\n}\n"],"mappings":"AACA,SAAS,mBAAmB,gBAAgB;AAC5C,SAAS,sBAAsB;AAC/B,SAAS,uBAAwD;AACjE,SAAS,YAAY,oBAAqD;AAC1E,SAAS,oBAAoB;AA2BtB,MAAM,cAAyB;AAAA,EACpC,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,OAAO,CAAC;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,SAAS;AAAA,IACP,QAAQ;AAAA,IAAO,aAAa;AAAA,IA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ChB;AAAA,EACF;AACA,MAAI,EAAE,MAAM,WAAW,CAAC,cAAc,KAAK,EAAE,MAAM,GAAG,EAAG,GAAE,QAAQ;AACnE,SAAO;AACT;AAEO,SAAS,YAAY,GAAM,MAAgB,QAAgB,WAA2B;AAC3F,SAAO,SAAS,YACZ,EAAE,OAAO,gBAAgB,kBAAkB,QAAQ,EAAE,OAAO,UAAU,CAAC,IACvE,EAAE,OAAO,gBAAgB,iBAAiB,QAAQ,EAAE,OAAO,UAAU,CAAC;AAC5E;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,123 +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 drop_item_list_exports = {};
|
|
31
|
-
__export(drop_item_list_exports, {
|
|
32
|
-
DropItemList: () => DropItemList
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(drop_item_list_exports);
|
|
35
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
-
var import_image = __toESM(require("./image.js"), 1);
|
|
37
|
-
var import_react = require("react");
|
|
38
|
-
var import_lucide_react = require("lucide-react");
|
|
39
|
-
var import_button = require("./button.js");
|
|
40
|
-
var import_input = require("./input.js");
|
|
41
|
-
var import_upload_limits = require("../utils/upload-limits.js");
|
|
42
|
-
var import_provider = require("../i18n/provider.js");
|
|
43
|
-
function DropItemList({ items, collectionName, onAddFiles, onRemove, onEdit }) {
|
|
44
|
-
const t = (0, import_provider.useT)();
|
|
45
|
-
const inputRef = (0, import_react.useRef)(null);
|
|
46
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
|
|
47
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
48
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-sm font-medium", children: [
|
|
49
|
-
t("Items"),
|
|
50
|
-
" ",
|
|
51
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-muted-foreground font-normal", children: [
|
|
52
|
-
"(",
|
|
53
|
-
items.length,
|
|
54
|
-
")"
|
|
55
|
-
] })
|
|
56
|
-
] }),
|
|
57
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
58
|
-
"input",
|
|
59
|
-
{
|
|
60
|
-
ref: inputRef,
|
|
61
|
-
type: "file",
|
|
62
|
-
accept: (0, import_upload_limits.acceptFor)("image"),
|
|
63
|
-
multiple: true,
|
|
64
|
-
className: "hidden",
|
|
65
|
-
onChange: (e) => {
|
|
66
|
-
const f = Array.from(e.target.files ?? []);
|
|
67
|
-
if (f.length) onAddFiles(f);
|
|
68
|
-
e.target.value = "";
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
),
|
|
72
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_button.Button, { type: "button", variant: "soft", size: "sm", onClick: () => inputRef.current?.click(), children: [
|
|
73
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ImagePlus, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
74
|
-
" ",
|
|
75
|
-
t("Add images")
|
|
76
|
-
] })
|
|
77
|
-
] }),
|
|
78
|
-
items.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "panel relative overflow-hidden p-10 text-center text-sm text-muted-foreground", children: t("Drag in your artwork \u2014 each image becomes a unique, licensed token. Supply = number of items.") }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-2", children: items.map((it, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex gap-3 items-start panel relative overflow-hidden p-3", children: [
|
|
79
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative h-16 w-16 rounded-2xl overflow-hidden bg-muted shrink-0", children: [
|
|
80
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: it.previewUrl, alt: it.name || t("Item {n}", { n: i + 1 }), fill: true, className: "object-cover", unoptimized: true }),
|
|
81
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "absolute bottom-0 left-0 text-2xs font-bold bg-black/60 text-white px-1", children: [
|
|
82
|
-
"#",
|
|
83
|
-
i + 1
|
|
84
|
-
] })
|
|
85
|
-
] }),
|
|
86
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 space-y-1.5", children: [
|
|
87
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
88
|
-
import_input.Input,
|
|
89
|
-
{
|
|
90
|
-
value: it.name,
|
|
91
|
-
onChange: (e) => onEdit(it.id, { name: e.target.value }),
|
|
92
|
-
placeholder: `${collectionName || t("Item")} #${i + 1}`,
|
|
93
|
-
className: "h-8 text-sm"
|
|
94
|
-
}
|
|
95
|
-
),
|
|
96
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
97
|
-
import_input.Input,
|
|
98
|
-
{
|
|
99
|
-
value: it.description,
|
|
100
|
-
onChange: (e) => onEdit(it.id, { description: e.target.value }),
|
|
101
|
-
placeholder: t("Description (optional)"),
|
|
102
|
-
className: "h-8 text-xs"
|
|
103
|
-
}
|
|
104
|
-
)
|
|
105
|
-
] }),
|
|
106
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
107
|
-
"button",
|
|
108
|
-
{
|
|
109
|
-
type: "button",
|
|
110
|
-
onClick: () => onRemove(it.id),
|
|
111
|
-
className: "text-muted-foreground hover:text-destructive p-1",
|
|
112
|
-
"aria-label": t("Remove item"),
|
|
113
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-4 w-4" })
|
|
114
|
-
}
|
|
115
|
-
)
|
|
116
|
-
] }, it.id)) })
|
|
117
|
-
] });
|
|
118
|
-
}
|
|
119
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
120
|
-
0 && (module.exports = {
|
|
121
|
-
DropItemList
|
|
122
|
-
});
|
|
123
|
-
//# sourceMappingURL=drop-item-list.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/drop-item-list.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport { useRef } from \"react\";\nimport { ImagePlus, X } from \"lucide-react\";\nimport { Button } from \"./button.js\";\nimport { Input } from \"./input.js\";\nimport { acceptFor } from \"../utils/upload-limits.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport interface DraftItem {\n id: string;\n file: File;\n previewUrl: string;\n name: string;\n description: string;\n}\n\ninterface DropItemListProps {\n items: DraftItem[];\n collectionName: string;\n onAddFiles: (files: File[]) => void;\n onRemove: (id: string) => void;\n onEdit: (id: string, patch: Partial<Pick<DraftItem, \"name\" | \"description\">>) => void;\n}\n\nexport function DropItemList({ items, collectionName, onAddFiles, onRemove, onEdit }: DropItemListProps) {\n const t = useT();\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <p className=\"text-sm font-medium\">\n {t(\"Items\")} <span className=\"text-muted-foreground font-normal\">({items.length})</span>\n </p>\n <input\n ref={inputRef}\n type=\"file\"\n accept={acceptFor(\"image\")}\n multiple\n className=\"hidden\"\n onChange={(e) => {\n const f = Array.from(e.target.files ?? []);\n if (f.length) onAddFiles(f);\n e.target.value = \"\";\n }}\n />\n <Button type=\"button\" variant=\"soft\" size=\"sm\" onClick={() => inputRef.current?.click()}>\n <ImagePlus className=\"h-3.5 w-3.5 mr-1.5\" /> {t(\"Add images\")}\n </Button>\n </div>\n\n {items.length === 0 ? (\n <div className=\"panel relative overflow-hidden p-10 text-center text-sm text-muted-foreground\">\n {t(\"Drag in your artwork — each image becomes a unique, licensed token. Supply = number of items.\")}\n </div>\n ) : (\n <div className=\"space-y-2\">\n {items.map((it, i) => (\n <div key={it.id} className=\"flex gap-3 items-start panel relative overflow-hidden p-3\">\n <div className=\"relative h-16 w-16 rounded-2xl overflow-hidden bg-muted shrink-0\">\n <Image src={it.previewUrl} alt={it.name || t(\"Item {n}\", { n: i + 1 })} fill className=\"object-cover\" unoptimized />\n <span className=\"absolute bottom-0 left-0 text-2xs font-bold bg-black/60 text-white px-1\">#{i + 1}</span>\n </div>\n <div className=\"flex-1 space-y-1.5\">\n <Input\n value={it.name}\n onChange={(e) => onEdit(it.id, { name: e.target.value })}\n placeholder={`${collectionName || t(\"Item\")} #${i + 1}`}\n className=\"h-8 text-sm\"\n />\n <Input\n value={it.description}\n onChange={(e) => onEdit(it.id, { description: e.target.value })}\n placeholder={t(\"Description (optional)\")}\n className=\"h-8 text-xs\"\n />\n </div>\n <button\n type=\"button\"\n onClick={() => onRemove(it.id)}\n className=\"text-muted-foreground hover:text-destructive p-1\"\n aria-label={t(\"Remove item\")}\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCuB;AAhCvB,mBAAkB;AAClB,mBAAuB;AACvB,0BAA6B;AAC7B,oBAAuB;AACvB,mBAAsB;AACtB,2BAA0B;AAC1B,sBAAqB;AAkBd,SAAS,aAAa,EAAE,OAAO,gBAAgB,YAAY,UAAU,OAAO,GAAsB;AACvG,QAAM,QAAI,sBAAK;AACf,QAAM,eAAW,qBAAgC,IAAI;AAErD,SACE,6CAAC,SAAI,WAAU,aACb;AAAA,iDAAC,SAAI,WAAU,qCACb;AAAA,mDAAC,OAAE,WAAU,uBACV;AAAA,UAAE,OAAO;AAAA,QAAE;AAAA,QAAC,6CAAC,UAAK,WAAU,qCAAoC;AAAA;AAAA,UAAE,MAAM;AAAA,UAAO;AAAA,WAAC;AAAA,SACnF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,KAAK;AAAA,UACL,MAAK;AAAA,UACL,YAAQ,gCAAU,OAAO;AAAA,UACzB,UAAQ;AAAA,UACR,WAAU;AAAA,UACV,UAAU,CAAC,MAAM;AACf,kBAAM,IAAI,MAAM,KAAK,EAAE,OAAO,SAAS,CAAC,CAAC;AACzC,gBAAI,EAAE,OAAQ,YAAW,CAAC;AAC1B,cAAE,OAAO,QAAQ;AAAA,UACnB;AAAA;AAAA,MACF;AAAA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cAAY,EAAE,aAAa;AAAA,UAE3B,sDAAC,yBAAE,WAAU,WAAU;AAAA;AAAA,MACzB;AAAA,SA1BQ,GAAG,EA2Bb,CACD,GACH;AAAA,KAEJ;AAEJ;","names":["Image"]}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
interface DraftItem {
|
|
4
|
-
id: string;
|
|
5
|
-
file: File;
|
|
6
|
-
previewUrl: string;
|
|
7
|
-
name: string;
|
|
8
|
-
description: string;
|
|
9
|
-
}
|
|
10
|
-
interface DropItemListProps {
|
|
11
|
-
items: DraftItem[];
|
|
12
|
-
collectionName: string;
|
|
13
|
-
onAddFiles: (files: File[]) => void;
|
|
14
|
-
onRemove: (id: string) => void;
|
|
15
|
-
onEdit: (id: string, patch: Partial<Pick<DraftItem, "name" | "description">>) => void;
|
|
16
|
-
}
|
|
17
|
-
declare function DropItemList({ items, collectionName, onAddFiles, onRemove, onEdit }: DropItemListProps): react_jsx_runtime.JSX.Element;
|
|
18
|
-
|
|
19
|
-
export { type DraftItem, DropItemList };
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
interface DraftItem {
|
|
4
|
-
id: string;
|
|
5
|
-
file: File;
|
|
6
|
-
previewUrl: string;
|
|
7
|
-
name: string;
|
|
8
|
-
description: string;
|
|
9
|
-
}
|
|
10
|
-
interface DropItemListProps {
|
|
11
|
-
items: DraftItem[];
|
|
12
|
-
collectionName: string;
|
|
13
|
-
onAddFiles: (files: File[]) => void;
|
|
14
|
-
onRemove: (id: string) => void;
|
|
15
|
-
onEdit: (id: string, patch: Partial<Pick<DraftItem, "name" | "description">>) => void;
|
|
16
|
-
}
|
|
17
|
-
declare function DropItemList({ items, collectionName, onAddFiles, onRemove, onEdit }: DropItemListProps): react_jsx_runtime.JSX.Element;
|
|
18
|
-
|
|
19
|
-
export { type DraftItem, DropItemList };
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import Image from "./image.js";
|
|
4
|
-
import { useRef } from "react";
|
|
5
|
-
import { ImagePlus, X } from "lucide-react";
|
|
6
|
-
import { Button } from "./button.js";
|
|
7
|
-
import { Input } from "./input.js";
|
|
8
|
-
import { acceptFor } from "../utils/upload-limits.js";
|
|
9
|
-
import { useT } from "../i18n/provider.js";
|
|
10
|
-
function DropItemList({ items, collectionName, onAddFiles, onRemove, onEdit }) {
|
|
11
|
-
const t = useT();
|
|
12
|
-
const inputRef = useRef(null);
|
|
13
|
-
return /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
14
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
15
|
-
/* @__PURE__ */ jsxs("p", { className: "text-sm font-medium", children: [
|
|
16
|
-
t("Items"),
|
|
17
|
-
" ",
|
|
18
|
-
/* @__PURE__ */ jsxs("span", { className: "text-muted-foreground font-normal", children: [
|
|
19
|
-
"(",
|
|
20
|
-
items.length,
|
|
21
|
-
")"
|
|
22
|
-
] })
|
|
23
|
-
] }),
|
|
24
|
-
/* @__PURE__ */ jsx(
|
|
25
|
-
"input",
|
|
26
|
-
{
|
|
27
|
-
ref: inputRef,
|
|
28
|
-
type: "file",
|
|
29
|
-
accept: acceptFor("image"),
|
|
30
|
-
multiple: true,
|
|
31
|
-
className: "hidden",
|
|
32
|
-
onChange: (e) => {
|
|
33
|
-
const f = Array.from(e.target.files ?? []);
|
|
34
|
-
if (f.length) onAddFiles(f);
|
|
35
|
-
e.target.value = "";
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
),
|
|
39
|
-
/* @__PURE__ */ jsxs(Button, { type: "button", variant: "soft", size: "sm", onClick: () => inputRef.current?.click(), children: [
|
|
40
|
-
/* @__PURE__ */ jsx(ImagePlus, { className: "h-3.5 w-3.5 mr-1.5" }),
|
|
41
|
-
" ",
|
|
42
|
-
t("Add images")
|
|
43
|
-
] })
|
|
44
|
-
] }),
|
|
45
|
-
items.length === 0 ? /* @__PURE__ */ jsx("div", { className: "panel relative overflow-hidden p-10 text-center text-sm text-muted-foreground", children: t("Drag in your artwork \u2014 each image becomes a unique, licensed token. Supply = number of items.") }) : /* @__PURE__ */ jsx("div", { className: "space-y-2", children: items.map((it, i) => /* @__PURE__ */ jsxs("div", { className: "flex gap-3 items-start panel relative overflow-hidden p-3", children: [
|
|
46
|
-
/* @__PURE__ */ jsxs("div", { className: "relative h-16 w-16 rounded-2xl overflow-hidden bg-muted shrink-0", children: [
|
|
47
|
-
/* @__PURE__ */ jsx(Image, { src: it.previewUrl, alt: it.name || t("Item {n}", { n: i + 1 }), fill: true, className: "object-cover", unoptimized: true }),
|
|
48
|
-
/* @__PURE__ */ jsxs("span", { className: "absolute bottom-0 left-0 text-2xs font-bold bg-black/60 text-white px-1", children: [
|
|
49
|
-
"#",
|
|
50
|
-
i + 1
|
|
51
|
-
] })
|
|
52
|
-
] }),
|
|
53
|
-
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-1.5", children: [
|
|
54
|
-
/* @__PURE__ */ jsx(
|
|
55
|
-
Input,
|
|
56
|
-
{
|
|
57
|
-
value: it.name,
|
|
58
|
-
onChange: (e) => onEdit(it.id, { name: e.target.value }),
|
|
59
|
-
placeholder: `${collectionName || t("Item")} #${i + 1}`,
|
|
60
|
-
className: "h-8 text-sm"
|
|
61
|
-
}
|
|
62
|
-
),
|
|
63
|
-
/* @__PURE__ */ jsx(
|
|
64
|
-
Input,
|
|
65
|
-
{
|
|
66
|
-
value: it.description,
|
|
67
|
-
onChange: (e) => onEdit(it.id, { description: e.target.value }),
|
|
68
|
-
placeholder: t("Description (optional)"),
|
|
69
|
-
className: "h-8 text-xs"
|
|
70
|
-
}
|
|
71
|
-
)
|
|
72
|
-
] }),
|
|
73
|
-
/* @__PURE__ */ jsx(
|
|
74
|
-
"button",
|
|
75
|
-
{
|
|
76
|
-
type: "button",
|
|
77
|
-
onClick: () => onRemove(it.id),
|
|
78
|
-
className: "text-muted-foreground hover:text-destructive p-1",
|
|
79
|
-
"aria-label": t("Remove item"),
|
|
80
|
-
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
81
|
-
}
|
|
82
|
-
)
|
|
83
|
-
] }, it.id)) })
|
|
84
|
-
] });
|
|
85
|
-
}
|
|
86
|
-
export {
|
|
87
|
-
DropItemList
|
|
88
|
-
};
|
|
89
|
-
//# sourceMappingURL=drop-item-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/drop-item-list.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport { useRef } from \"react\";\nimport { ImagePlus, X } from \"lucide-react\";\nimport { Button } from \"./button.js\";\nimport { Input } from \"./input.js\";\nimport { acceptFor } from \"../utils/upload-limits.js\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport interface DraftItem {\n id: string;\n file: File;\n previewUrl: string;\n name: string;\n description: string;\n}\n\ninterface DropItemListProps {\n items: DraftItem[];\n collectionName: string;\n onAddFiles: (files: File[]) => void;\n onRemove: (id: string) => void;\n onEdit: (id: string, patch: Partial<Pick<DraftItem, \"name\" | \"description\">>) => void;\n}\n\nexport function DropItemList({ items, collectionName, onAddFiles, onRemove, onEdit }: DropItemListProps) {\n const t = useT();\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n return (\n <div className=\"space-y-3\">\n <div className=\"flex items-center justify-between\">\n <p className=\"text-sm font-medium\">\n {t(\"Items\")} <span className=\"text-muted-foreground font-normal\">({items.length})</span>\n </p>\n <input\n ref={inputRef}\n type=\"file\"\n accept={acceptFor(\"image\")}\n multiple\n className=\"hidden\"\n onChange={(e) => {\n const f = Array.from(e.target.files ?? []);\n if (f.length) onAddFiles(f);\n e.target.value = \"\";\n }}\n />\n <Button type=\"button\" variant=\"soft\" size=\"sm\" onClick={() => inputRef.current?.click()}>\n <ImagePlus className=\"h-3.5 w-3.5 mr-1.5\" /> {t(\"Add images\")}\n </Button>\n </div>\n\n {items.length === 0 ? (\n <div className=\"panel relative overflow-hidden p-10 text-center text-sm text-muted-foreground\">\n {t(\"Drag in your artwork — each image becomes a unique, licensed token. Supply = number of items.\")}\n </div>\n ) : (\n <div className=\"space-y-2\">\n {items.map((it, i) => (\n <div key={it.id} className=\"flex gap-3 items-start panel relative overflow-hidden p-3\">\n <div className=\"relative h-16 w-16 rounded-2xl overflow-hidden bg-muted shrink-0\">\n <Image src={it.previewUrl} alt={it.name || t(\"Item {n}\", { n: i + 1 })} fill className=\"object-cover\" unoptimized />\n <span className=\"absolute bottom-0 left-0 text-2xs font-bold bg-black/60 text-white px-1\">#{i + 1}</span>\n </div>\n <div className=\"flex-1 space-y-1.5\">\n <Input\n value={it.name}\n onChange={(e) => onEdit(it.id, { name: e.target.value })}\n placeholder={`${collectionName || t(\"Item\")} #${i + 1}`}\n className=\"h-8 text-sm\"\n />\n <Input\n value={it.description}\n onChange={(e) => onEdit(it.id, { description: e.target.value })}\n placeholder={t(\"Description (optional)\")}\n className=\"h-8 text-xs\"\n />\n </div>\n <button\n type=\"button\"\n onClick={() => onRemove(it.id)}\n className=\"text-muted-foreground hover:text-destructive p-1\"\n aria-label={t(\"Remove item\")}\n >\n <X className=\"h-4 w-4\" />\n </button>\n </div>\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";AAkCuB,SAEf,KAFe;AAhCvB,OAAO,WAAW;AAClB,SAAS,cAAc;AACvB,SAAS,WAAW,SAAS;AAC7B,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,iBAAiB;AAC1B,SAAS,YAAY;AAkBd,SAAS,aAAa,EAAE,OAAO,gBAAgB,YAAY,UAAU,OAAO,GAAsB;AACvG,QAAM,IAAI,KAAK;AACf,QAAM,WAAW,OAAgC,IAAI;AAErD,SACE,qBAAC,SAAI,WAAU,aACb;AAAA,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