@medialane/ui 0.289.0 → 0.291.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.
@@ -1,7 +1,7 @@
1
1
  import * as input_otp from 'input-otp';
2
2
  import * as React from 'react';
3
3
 
4
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
5
5
  value?: string;
6
6
  onChange?: (newValue: string) => unknown;
7
7
  maxLength: number;
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
14
14
  } & {
15
15
  render: (props: input_otp.RenderProps) => React.ReactNode;
16
16
  children?: never;
17
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
18
18
  value?: string;
19
19
  onChange?: (newValue: string) => unknown;
20
20
  maxLength: number;
@@ -1,7 +1,7 @@
1
1
  import * as input_otp from 'input-otp';
2
2
  import * as React from 'react';
3
3
 
4
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
5
5
  value?: string;
6
6
  onChange?: (newValue: string) => unknown;
7
7
  maxLength: number;
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
14
14
  } & {
15
15
  render: (props: input_otp.RenderProps) => React.ReactNode;
16
16
  children?: never;
17
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
18
18
  value?: string;
19
19
  onChange?: (newValue: string) => unknown;
20
20
  maxLength: number;
@@ -0,0 +1,150 @@
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 approve_mint_dialog_exports = {};
21
+ __export(approve_mint_dialog_exports, {
22
+ ApproveMintDialog: () => ApproveMintDialog
23
+ });
24
+ module.exports = __toCommonJS(approve_mint_dialog_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_react = require("react");
27
+ var import_lucide_react = require("lucide-react");
28
+ var import_dialog = require("./dialog.js");
29
+ var import_input = require("./input.js");
30
+ var import_label = require("./label.js");
31
+ var import_select = require("./select.js");
32
+ var import_alert = require("./alert.js");
33
+ var import_transaction_dialog_states = require("./transaction-dialog-states.js");
34
+ var import_use_transaction = require("../utils/use-transaction.js");
35
+ var import_format = require("../utils/format.js");
36
+ var import_success_messages = require("../utils/success-messages.js");
37
+ const keyOf = (c) => c.collectionId ?? c.contractAddress;
38
+ function ApproveMintDialog({ offer, open, onOpenChange, collections, footerNote, newAssetHref, tx, onApprove }) {
39
+ const { phase, txHash, error, retryable = true, reset } = tx;
40
+ const busy = (0, import_use_transaction.isBusyPhase)(phase);
41
+ const [selectedKey, setSelectedKey] = (0, import_react.useState)(null);
42
+ const [remixName, setRemixName] = (0, import_react.useState)("");
43
+ const defaultCollection = collections.find((c) => c.contractAddress === offer?.originalContract) ?? collections[0];
44
+ const effectiveKey = selectedKey ?? (defaultCollection ? keyOf(defaultCollection) : null);
45
+ const selected = collections.find((c) => keyOf(c) === effectiveKey);
46
+ const effectiveName = remixName.trim() || `Remix of Token #${offer?.originalTokenId}`;
47
+ const priceDisplay = offer?.price ? `${(0, import_format.formatDisplayPrice)(offer.price.formatted)} ${offer.price.currency}` : "\u2014";
48
+ const clear = () => {
49
+ setSelectedKey(null);
50
+ setRemixName("");
51
+ reset();
52
+ };
53
+ (0, import_react.useEffect)(() => {
54
+ if (open) clear();
55
+ }, [open]);
56
+ const close = () => {
57
+ clear();
58
+ onOpenChange(false);
59
+ };
60
+ const handleOpenChange = (value) => {
61
+ if (!value && !busy) close();
62
+ };
63
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dialog.DialogContent, { className: "w-full max-w-sm p-0 overflow-hidden gap-0 flex flex-col max-h-[90svh]", children: [
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 pr-10 pl-5 py-4 border-b border-border/60", children: [
65
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4 text-primary shrink-0" }),
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogTitle, { className: "text-base font-bold", children: "Grant license & mint" })
67
+ ] }),
68
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dialog.DialogDescription, { className: "sr-only", children: "Mint the derivative into one of your collections and list it for the requester." }),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
70
+ import_transaction_dialog_states.TransactionDialogStates,
71
+ {
72
+ phase,
73
+ asset: { name: effectiveName },
74
+ statusMessage: "Minting and listing\u2026",
75
+ txHash,
76
+ error,
77
+ success: import_success_messages.successMessages.licenseGranted({ price: priceDisplay }),
78
+ successActions: [
79
+ { label: "Done", onClick: close },
80
+ ...newAssetHref ? [{ label: "View new asset", href: newAssetHref }] : []
81
+ ],
82
+ errorTitle: "Minting failed",
83
+ errorDescription: "The transaction was submitted, but the remix could not be completed.",
84
+ onRetry: retryable ? reset : void 0,
85
+ onDone: close,
86
+ children: [
87
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex-1 overflow-y-auto px-5 py-4 space-y-5", children: [
88
+ error && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_alert.Alert, { variant: "destructive", children: [
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.AlertCircle, { className: "h-4 w-4" }),
90
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_alert.AlertDescription, { children: error })
91
+ ] }),
92
+ offer && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl border border-border bg-muted/30 p-3 text-sm space-y-1", children: [
93
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
94
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground", children: "License" }),
95
+ " ",
96
+ offer.licenseType
97
+ ] }),
98
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { children: [
99
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-muted-foreground", children: "Price" }),
100
+ " ",
101
+ priceDisplay
102
+ ] }),
103
+ offer.message && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-muted-foreground italic", children: [
104
+ '"',
105
+ offer.message,
106
+ '"'
107
+ ] })
108
+ ] }),
109
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
110
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.Label, { htmlFor: "remix-name", children: "Remix Name" }),
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_input.Input, { id: "remix-name", placeholder: effectiveName, value: remixName, onChange: (e) => setRemixName(e.target.value) })
112
+ ] }),
113
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
114
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_label.Label, { children: "Mint into collection" }),
115
+ collections.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-destructive", children: "No eligible collections." }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select, { value: effectiveKey ?? "", onValueChange: setSelectedKey, children: [
116
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectValue, { placeholder: "Select collection" }) }),
117
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectContent, { children: collections.map((c) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.SelectItem, { value: keyOf(c), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex items-center gap-2", children: [
118
+ c.name ?? `${c.contractAddress.slice(0, 14)}\u2026`,
119
+ c.standard && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-2xs tabular-nums text-muted-foreground", children: c.standard })
120
+ ] }) }, keyOf(c))) })
121
+ ] })
122
+ ] })
123
+ ] }),
124
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-5 pt-3 pb-5 border-t border-border/60 space-y-3", children: [
125
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
126
+ "button",
127
+ {
128
+ className: "w-full h-11 rounded-[11px] bg-brand-purple text-white text-sm font-semibold flex items-center justify-center gap-2 hover:brightness-110 active:scale-[0.98] transition-all disabled:opacity-50",
129
+ onClick: () => {
130
+ if (selected) onApprove(selected, effectiveName);
131
+ },
132
+ disabled: busy || !selected,
133
+ children: [
134
+ busy ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
135
+ "Grant license & mint"
136
+ ]
137
+ }
138
+ ),
139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-2xs text-center text-muted-foreground", children: footerNote })
140
+ ] })
141
+ ]
142
+ }
143
+ )
144
+ ] }) });
145
+ }
146
+ // Annotate the CommonJS export names for ESM import in node:
147
+ 0 && (module.exports = {
148
+ ApproveMintDialog
149
+ });
150
+ //# sourceMappingURL=approve-mint-dialog.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/approve-mint-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { AlertCircle, GitBranch, Loader2 } from \"lucide-react\";\nimport type { ApiCollection, ApiRemixOffer } from \"@medialane/sdk\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"./select.js\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { TransactionDialogStates } from \"./transaction-dialog-states.js\";\nimport { isBusyPhase, type TransactionPhase } from \"../utils/use-transaction.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\n\nexport interface ApproveMintDialogProps {\n offer: ApiRemixOffer | null;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n collections: ApiCollection[];\n footerNote: string;\n newAssetHref?: string | null;\n tx: {\n phase: TransactionPhase;\n txHash: string | null;\n error: string | null;\n retryable?: boolean;\n reset: () => void;\n };\n onApprove: (collection: ApiCollection, name: string) => void;\n}\n\nconst keyOf = (c: ApiCollection) => c.collectionId ?? c.contractAddress;\n\nexport function ApproveMintDialog({ offer, open, onOpenChange, collections, footerNote, newAssetHref, tx, onApprove }: ApproveMintDialogProps) {\n const { phase, txHash, error, retryable = true, reset } = tx;\n const busy = isBusyPhase(phase);\n const [selectedKey, setSelectedKey] = useState<string | null>(null);\n const [remixName, setRemixName] = useState(\"\");\n\n const defaultCollection = collections.find((c) => c.contractAddress === offer?.originalContract) ?? collections[0];\n const effectiveKey = selectedKey ?? (defaultCollection ? keyOf(defaultCollection) : null);\n const selected = collections.find((c) => keyOf(c) === effectiveKey);\n const effectiveName = remixName.trim() || `Remix of Token #${offer?.originalTokenId}`;\n const priceDisplay = offer?.price ? `${formatDisplayPrice(offer.price.formatted)} ${offer.price.currency}` : \"—\";\n\n const clear = () => {\n setSelectedKey(null);\n setRemixName(\"\");\n reset();\n };\n\n useEffect(() => {\n if (open) clear();\n }, [open]);\n\n const close = () => {\n clear();\n onOpenChange(false);\n };\n\n const handleOpenChange = (value: boolean) => {\n if (!value && !busy) close();\n };\n\n return (\n <Dialog open={open} onOpenChange={handleOpenChange}>\n <DialogContent className=\"w-full max-w-sm p-0 overflow-hidden gap-0 flex flex-col max-h-[90svh]\">\n <div className=\"flex items-center gap-2 pr-10 pl-5 py-4 border-b border-border/60\">\n <GitBranch className=\"h-4 w-4 text-primary shrink-0\" />\n <DialogTitle className=\"text-base font-bold\">Grant license &amp; mint</DialogTitle>\n </div>\n <DialogDescription className=\"sr-only\">Mint the derivative into one of your collections and list it for the requester.</DialogDescription>\n\n <TransactionDialogStates\n phase={phase}\n asset={{ name: effectiveName }}\n statusMessage=\"Minting and listing…\"\n txHash={txHash}\n error={error}\n success={successMessages.licenseGranted({ price: priceDisplay })}\n successActions={[\n { label: \"Done\", onClick: close },\n ...(newAssetHref ? [{ label: \"View new asset\", href: newAssetHref }] : []),\n ]}\n errorTitle=\"Minting failed\"\n errorDescription=\"The transaction was submitted, but the remix could not be completed.\"\n onRetry={retryable ? reset : undefined}\n onDone={close}\n >\n <div className=\"flex-1 overflow-y-auto px-5 py-4 space-y-5\">\n {error && (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n {offer && (\n <div className=\"rounded-xl border border-border bg-muted/30 p-3 text-sm space-y-1\">\n <p><span className=\"text-muted-foreground\">License</span> {offer.licenseType}</p>\n <p><span className=\"text-muted-foreground\">Price</span> {priceDisplay}</p>\n {offer.message && <p className=\"text-muted-foreground italic\">&quot;{offer.message}&quot;</p>}\n </div>\n )}\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"remix-name\">Remix Name</Label>\n <Input id=\"remix-name\" placeholder={effectiveName} value={remixName} onChange={(e) => setRemixName(e.target.value)} />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label>Mint into collection</Label>\n {collections.length === 0 ? (\n <p className=\"text-xs text-destructive\">No eligible collections.</p>\n ) : (\n <Select value={effectiveKey ?? \"\"} onValueChange={setSelectedKey}>\n <SelectTrigger>\n <SelectValue placeholder=\"Select collection\" />\n </SelectTrigger>\n <SelectContent>\n {collections.map((c) => (\n <SelectItem key={keyOf(c)} value={keyOf(c)}>\n <span className=\"flex items-center gap-2\">\n {c.name ?? `${c.contractAddress.slice(0, 14)}…`}\n {c.standard && <span className=\"text-2xs tabular-nums text-muted-foreground\">{c.standard}</span>}\n </span>\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n )}\n </div>\n </div>\n\n <div className=\"px-5 pt-3 pb-5 border-t border-border/60 space-y-3\">\n <button\n className=\"w-full h-11 rounded-[11px] bg-brand-purple text-white text-sm font-semibold flex items-center justify-center gap-2 hover:brightness-110 active:scale-[0.98] transition-all disabled:opacity-50\"\n onClick={() => { if (selected) onApprove(selected, effectiveName); }}\n disabled={busy || !selected}\n >\n {busy ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <GitBranch className=\"h-4 w-4\" />}\n Grant license &amp; mint\n </button>\n <p className=\"text-2xs text-center text-muted-foreground\">{footerNote}</p>\n </div>\n </TransactionDialogStates>\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAoEQ;AAlER,mBAAoC;AACpC,0BAAgD;AAEhD,oBAAsE;AACtE,mBAAsB;AACtB,mBAAsB;AACtB,oBAA8E;AAC9E,mBAAwC;AACxC,uCAAwC;AACxC,6BAAmD;AACnD,oBAAmC;AACnC,8BAAgC;AAmBhC,MAAM,QAAQ,CAAC,MAAqB,EAAE,gBAAgB,EAAE;AAEjD,SAAS,kBAAkB,EAAE,OAAO,MAAM,cAAc,aAAa,YAAY,cAAc,IAAI,UAAU,GAA2B;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,eAAe,gBAChD;AAAA,4DAAC,+BACC,sDAAC,6BAAY,aAAY,qBAAoB,GAC/C;AAAA,gBACA,4CAAC,+BACE,sBAAY,IAAI,CAAC,MAChB,4CAAC,4BAA0B,OAAO,MAAM,CAAC,GACvC,uDAAC,UAAK,WAAU,2BACb;AAAA,oBAAE,QAAQ,GAAG,EAAE,gBAAgB,MAAM,GAAG,EAAE,CAAC;AAAA,kBAC3C,EAAE,YAAY,4CAAC,UAAK,WAAU,+CAA+C,YAAE,UAAS;AAAA,mBAC3F,KAJe,MAAM,CAAC,CAKxB,CACD,GACH;AAAA,iBACF;AAAA,eAEJ;AAAA,aACF;AAAA,UAEA,6CAAC,SAAI,WAAU,sDACb;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS,MAAM;AAAE,sBAAI,SAAU,WAAU,UAAU,aAAa;AAAA,gBAAG;AAAA,gBACnE,UAAU,QAAQ,CAAC;AAAA,gBAElB;AAAA,yBAAO,4CAAC,+BAAQ,WAAU,wBAAuB,IAAK,4CAAC,iCAAU,WAAU,WAAU;AAAA,kBAAG;AAAA;AAAA;AAAA,YAE3F;AAAA,YACA,4CAAC,OAAE,WAAU,8CAA8C,sBAAW;AAAA,aACxE;AAAA;AAAA;AAAA,IACF;AAAA,KACF,GACF;AAEJ;","names":[]}
@@ -0,0 +1,27 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ApiRemixOffer, ApiCollection } from '@medialane/sdk';
3
+ import { TransactionPhase } from '../utils/use-transaction.cjs';
4
+ import '@medialane/sdk/starknet';
5
+ import './fast-mint/types.cjs';
6
+ import 'react';
7
+ import 'starknet';
8
+
9
+ interface ApproveMintDialogProps {
10
+ offer: ApiRemixOffer | null;
11
+ open: boolean;
12
+ onOpenChange: (open: boolean) => void;
13
+ collections: ApiCollection[];
14
+ footerNote: string;
15
+ newAssetHref?: string | null;
16
+ tx: {
17
+ phase: TransactionPhase;
18
+ txHash: string | null;
19
+ error: string | null;
20
+ retryable?: boolean;
21
+ reset: () => void;
22
+ };
23
+ onApprove: (collection: ApiCollection, name: string) => void;
24
+ }
25
+ declare function ApproveMintDialog({ offer, open, onOpenChange, collections, footerNote, newAssetHref, tx, onApprove }: ApproveMintDialogProps): react_jsx_runtime.JSX.Element;
26
+
27
+ export { ApproveMintDialog, type ApproveMintDialogProps };
@@ -0,0 +1,27 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ApiRemixOffer, ApiCollection } from '@medialane/sdk';
3
+ import { TransactionPhase } from '../utils/use-transaction.js';
4
+ import '@medialane/sdk/starknet';
5
+ import './fast-mint/types.js';
6
+ import 'react';
7
+ import 'starknet';
8
+
9
+ interface ApproveMintDialogProps {
10
+ offer: ApiRemixOffer | null;
11
+ open: boolean;
12
+ onOpenChange: (open: boolean) => void;
13
+ collections: ApiCollection[];
14
+ footerNote: string;
15
+ newAssetHref?: string | null;
16
+ tx: {
17
+ phase: TransactionPhase;
18
+ txHash: string | null;
19
+ error: string | null;
20
+ retryable?: boolean;
21
+ reset: () => void;
22
+ };
23
+ onApprove: (collection: ApiCollection, name: string) => void;
24
+ }
25
+ declare function ApproveMintDialog({ offer, open, onOpenChange, collections, footerNote, newAssetHref, tx, onApprove }: ApproveMintDialogProps): react_jsx_runtime.JSX.Element;
26
+
27
+ export { ApproveMintDialog, type ApproveMintDialogProps };
@@ -0,0 +1,126 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useState } from "react";
4
+ import { AlertCircle, GitBranch, Loader2 } from "lucide-react";
5
+ import { Dialog, DialogContent, DialogDescription, DialogTitle } from "./dialog.js";
6
+ import { Input } from "./input.js";
7
+ import { Label } from "./label.js";
8
+ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.js";
9
+ import { Alert, AlertDescription } from "./alert.js";
10
+ import { TransactionDialogStates } from "./transaction-dialog-states.js";
11
+ import { isBusyPhase } from "../utils/use-transaction.js";
12
+ import { formatDisplayPrice } from "../utils/format.js";
13
+ import { successMessages } from "../utils/success-messages.js";
14
+ const keyOf = (c) => c.collectionId ?? c.contractAddress;
15
+ function ApproveMintDialog({ offer, open, onOpenChange, collections, footerNote, newAssetHref, tx, onApprove }) {
16
+ const { phase, txHash, error, retryable = true, reset } = tx;
17
+ const busy = isBusyPhase(phase);
18
+ const [selectedKey, setSelectedKey] = useState(null);
19
+ const [remixName, setRemixName] = useState("");
20
+ const defaultCollection = collections.find((c) => c.contractAddress === offer?.originalContract) ?? collections[0];
21
+ const effectiveKey = selectedKey ?? (defaultCollection ? keyOf(defaultCollection) : null);
22
+ const selected = collections.find((c) => keyOf(c) === effectiveKey);
23
+ const effectiveName = remixName.trim() || `Remix of Token #${offer?.originalTokenId}`;
24
+ const priceDisplay = offer?.price ? `${formatDisplayPrice(offer.price.formatted)} ${offer.price.currency}` : "\u2014";
25
+ const clear = () => {
26
+ setSelectedKey(null);
27
+ setRemixName("");
28
+ reset();
29
+ };
30
+ useEffect(() => {
31
+ if (open) clear();
32
+ }, [open]);
33
+ const close = () => {
34
+ clear();
35
+ onOpenChange(false);
36
+ };
37
+ const handleOpenChange = (value) => {
38
+ if (!value && !busy) close();
39
+ };
40
+ return /* @__PURE__ */ jsx(Dialog, { open, onOpenChange: handleOpenChange, children: /* @__PURE__ */ jsxs(DialogContent, { className: "w-full max-w-sm p-0 overflow-hidden gap-0 flex flex-col max-h-[90svh]", children: [
41
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pr-10 pl-5 py-4 border-b border-border/60", children: [
42
+ /* @__PURE__ */ jsx(GitBranch, { className: "h-4 w-4 text-primary shrink-0" }),
43
+ /* @__PURE__ */ jsx(DialogTitle, { className: "text-base font-bold", children: "Grant license & mint" })
44
+ ] }),
45
+ /* @__PURE__ */ jsx(DialogDescription, { className: "sr-only", children: "Mint the derivative into one of your collections and list it for the requester." }),
46
+ /* @__PURE__ */ jsxs(
47
+ TransactionDialogStates,
48
+ {
49
+ phase,
50
+ asset: { name: effectiveName },
51
+ statusMessage: "Minting and listing\u2026",
52
+ txHash,
53
+ error,
54
+ success: successMessages.licenseGranted({ price: priceDisplay }),
55
+ successActions: [
56
+ { label: "Done", onClick: close },
57
+ ...newAssetHref ? [{ label: "View new asset", href: newAssetHref }] : []
58
+ ],
59
+ errorTitle: "Minting failed",
60
+ errorDescription: "The transaction was submitted, but the remix could not be completed.",
61
+ onRetry: retryable ? reset : void 0,
62
+ onDone: close,
63
+ children: [
64
+ /* @__PURE__ */ jsxs("div", { className: "flex-1 overflow-y-auto px-5 py-4 space-y-5", children: [
65
+ error && /* @__PURE__ */ jsxs(Alert, { variant: "destructive", children: [
66
+ /* @__PURE__ */ jsx(AlertCircle, { className: "h-4 w-4" }),
67
+ /* @__PURE__ */ jsx(AlertDescription, { children: error })
68
+ ] }),
69
+ offer && /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border bg-muted/30 p-3 text-sm space-y-1", children: [
70
+ /* @__PURE__ */ jsxs("p", { children: [
71
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "License" }),
72
+ " ",
73
+ offer.licenseType
74
+ ] }),
75
+ /* @__PURE__ */ jsxs("p", { children: [
76
+ /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "Price" }),
77
+ " ",
78
+ priceDisplay
79
+ ] }),
80
+ offer.message && /* @__PURE__ */ jsxs("p", { className: "text-muted-foreground italic", children: [
81
+ '"',
82
+ offer.message,
83
+ '"'
84
+ ] })
85
+ ] }),
86
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
87
+ /* @__PURE__ */ jsx(Label, { htmlFor: "remix-name", children: "Remix Name" }),
88
+ /* @__PURE__ */ jsx(Input, { id: "remix-name", placeholder: effectiveName, value: remixName, onChange: (e) => setRemixName(e.target.value) })
89
+ ] }),
90
+ /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
91
+ /* @__PURE__ */ jsx(Label, { children: "Mint into collection" }),
92
+ collections.length === 0 ? /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive", children: "No eligible collections." }) : /* @__PURE__ */ jsxs(Select, { value: effectiveKey ?? "", onValueChange: setSelectedKey, children: [
93
+ /* @__PURE__ */ jsx(SelectTrigger, { children: /* @__PURE__ */ jsx(SelectValue, { placeholder: "Select collection" }) }),
94
+ /* @__PURE__ */ jsx(SelectContent, { children: collections.map((c) => /* @__PURE__ */ jsx(SelectItem, { value: keyOf(c), children: /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2", children: [
95
+ c.name ?? `${c.contractAddress.slice(0, 14)}\u2026`,
96
+ c.standard && /* @__PURE__ */ jsx("span", { className: "text-2xs tabular-nums text-muted-foreground", children: c.standard })
97
+ ] }) }, keyOf(c))) })
98
+ ] })
99
+ ] })
100
+ ] }),
101
+ /* @__PURE__ */ jsxs("div", { className: "px-5 pt-3 pb-5 border-t border-border/60 space-y-3", children: [
102
+ /* @__PURE__ */ jsxs(
103
+ "button",
104
+ {
105
+ className: "w-full h-11 rounded-[11px] bg-brand-purple text-white text-sm font-semibold flex items-center justify-center gap-2 hover:brightness-110 active:scale-[0.98] transition-all disabled:opacity-50",
106
+ onClick: () => {
107
+ if (selected) onApprove(selected, effectiveName);
108
+ },
109
+ disabled: busy || !selected,
110
+ children: [
111
+ busy ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx(GitBranch, { className: "h-4 w-4" }),
112
+ "Grant license & mint"
113
+ ]
114
+ }
115
+ ),
116
+ /* @__PURE__ */ jsx("p", { className: "text-2xs text-center text-muted-foreground", children: footerNote })
117
+ ] })
118
+ ]
119
+ }
120
+ )
121
+ ] }) });
122
+ }
123
+ export {
124
+ ApproveMintDialog
125
+ };
126
+ //# sourceMappingURL=approve-mint-dialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/approve-mint-dialog.tsx"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { AlertCircle, GitBranch, Loader2 } from \"lucide-react\";\nimport type { ApiCollection, ApiRemixOffer } from \"@medialane/sdk\";\nimport { Dialog, DialogContent, DialogDescription, DialogTitle } from \"./dialog.js\";\nimport { Input } from \"./input.js\";\nimport { Label } from \"./label.js\";\nimport { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from \"./select.js\";\nimport { Alert, AlertDescription } from \"./alert.js\";\nimport { TransactionDialogStates } from \"./transaction-dialog-states.js\";\nimport { isBusyPhase, type TransactionPhase } from \"../utils/use-transaction.js\";\nimport { formatDisplayPrice } from \"../utils/format.js\";\nimport { successMessages } from \"../utils/success-messages.js\";\n\nexport interface ApproveMintDialogProps {\n offer: ApiRemixOffer | null;\n open: boolean;\n onOpenChange: (open: boolean) => void;\n collections: ApiCollection[];\n footerNote: string;\n newAssetHref?: string | null;\n tx: {\n phase: TransactionPhase;\n txHash: string | null;\n error: string | null;\n retryable?: boolean;\n reset: () => void;\n };\n onApprove: (collection: ApiCollection, name: string) => void;\n}\n\nconst keyOf = (c: ApiCollection) => c.collectionId ?? c.contractAddress;\n\nexport function ApproveMintDialog({ offer, open, onOpenChange, collections, footerNote, newAssetHref, tx, onApprove }: ApproveMintDialogProps) {\n const { phase, txHash, error, retryable = true, reset } = tx;\n const busy = isBusyPhase(phase);\n const [selectedKey, setSelectedKey] = useState<string | null>(null);\n const [remixName, setRemixName] = useState(\"\");\n\n const defaultCollection = collections.find((c) => c.contractAddress === offer?.originalContract) ?? collections[0];\n const effectiveKey = selectedKey ?? (defaultCollection ? keyOf(defaultCollection) : null);\n const selected = collections.find((c) => keyOf(c) === effectiveKey);\n const effectiveName = remixName.trim() || `Remix of Token #${offer?.originalTokenId}`;\n const priceDisplay = offer?.price ? `${formatDisplayPrice(offer.price.formatted)} ${offer.price.currency}` : \"—\";\n\n const clear = () => {\n setSelectedKey(null);\n setRemixName(\"\");\n reset();\n };\n\n useEffect(() => {\n if (open) clear();\n }, [open]);\n\n const close = () => {\n clear();\n onOpenChange(false);\n };\n\n const handleOpenChange = (value: boolean) => {\n if (!value && !busy) close();\n };\n\n return (\n <Dialog open={open} onOpenChange={handleOpenChange}>\n <DialogContent className=\"w-full max-w-sm p-0 overflow-hidden gap-0 flex flex-col max-h-[90svh]\">\n <div className=\"flex items-center gap-2 pr-10 pl-5 py-4 border-b border-border/60\">\n <GitBranch className=\"h-4 w-4 text-primary shrink-0\" />\n <DialogTitle className=\"text-base font-bold\">Grant license &amp; mint</DialogTitle>\n </div>\n <DialogDescription className=\"sr-only\">Mint the derivative into one of your collections and list it for the requester.</DialogDescription>\n\n <TransactionDialogStates\n phase={phase}\n asset={{ name: effectiveName }}\n statusMessage=\"Minting and listing…\"\n txHash={txHash}\n error={error}\n success={successMessages.licenseGranted({ price: priceDisplay })}\n successActions={[\n { label: \"Done\", onClick: close },\n ...(newAssetHref ? [{ label: \"View new asset\", href: newAssetHref }] : []),\n ]}\n errorTitle=\"Minting failed\"\n errorDescription=\"The transaction was submitted, but the remix could not be completed.\"\n onRetry={retryable ? reset : undefined}\n onDone={close}\n >\n <div className=\"flex-1 overflow-y-auto px-5 py-4 space-y-5\">\n {error && (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n {offer && (\n <div className=\"rounded-xl border border-border bg-muted/30 p-3 text-sm space-y-1\">\n <p><span className=\"text-muted-foreground\">License</span> {offer.licenseType}</p>\n <p><span className=\"text-muted-foreground\">Price</span> {priceDisplay}</p>\n {offer.message && <p className=\"text-muted-foreground italic\">&quot;{offer.message}&quot;</p>}\n </div>\n )}\n\n <div className=\"space-y-1.5\">\n <Label htmlFor=\"remix-name\">Remix Name</Label>\n <Input id=\"remix-name\" placeholder={effectiveName} value={remixName} onChange={(e) => setRemixName(e.target.value)} />\n </div>\n\n <div className=\"space-y-1.5\">\n <Label>Mint into collection</Label>\n {collections.length === 0 ? (\n <p className=\"text-xs text-destructive\">No eligible collections.</p>\n ) : (\n <Select value={effectiveKey ?? \"\"} onValueChange={setSelectedKey}>\n <SelectTrigger>\n <SelectValue placeholder=\"Select collection\" />\n </SelectTrigger>\n <SelectContent>\n {collections.map((c) => (\n <SelectItem key={keyOf(c)} value={keyOf(c)}>\n <span className=\"flex items-center gap-2\">\n {c.name ?? `${c.contractAddress.slice(0, 14)}…`}\n {c.standard && <span className=\"text-2xs tabular-nums text-muted-foreground\">{c.standard}</span>}\n </span>\n </SelectItem>\n ))}\n </SelectContent>\n </Select>\n )}\n </div>\n </div>\n\n <div className=\"px-5 pt-3 pb-5 border-t border-border/60 space-y-3\">\n <button\n className=\"w-full h-11 rounded-[11px] bg-brand-purple text-white text-sm font-semibold flex items-center justify-center gap-2 hover:brightness-110 active:scale-[0.98] transition-all disabled:opacity-50\"\n onClick={() => { if (selected) onApprove(selected, effectiveName); }}\n disabled={busy || !selected}\n >\n {busy ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <GitBranch className=\"h-4 w-4\" />}\n Grant license &amp; mint\n </button>\n <p className=\"text-2xs text-center text-muted-foreground\">{footerNote}</p>\n </div>\n </TransactionDialogStates>\n </DialogContent>\n </Dialog>\n );\n}\n"],"mappings":";AAoEQ,SACE,KADF;AAlER,SAAS,WAAW,gBAAgB;AACpC,SAAS,aAAa,WAAW,eAAe;AAEhD,SAAS,QAAQ,eAAe,mBAAmB,mBAAmB;AACtE,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,QAAQ,eAAe,YAAY,eAAe,mBAAmB;AAC9E,SAAS,OAAO,wBAAwB;AACxC,SAAS,+BAA+B;AACxC,SAAS,mBAA0C;AACnD,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAmBhC,MAAM,QAAQ,CAAC,MAAqB,EAAE,gBAAgB,EAAE;AAEjD,SAAS,kBAAkB,EAAE,OAAO,MAAM,cAAc,aAAa,YAAY,cAAc,IAAI,UAAU,GAA2B;AAC7I,QAAM,EAAE,OAAO,QAAQ,OAAO,YAAY,M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GAC/C;AAAA,gBACA,oBAAC,iBACE,sBAAY,IAAI,CAAC,MAChB,oBAAC,cAA0B,OAAO,MAAM,CAAC,GACvC,+BAAC,UAAK,WAAU,2BACb;AAAA,oBAAE,QAAQ,GAAG,EAAE,gBAAgB,MAAM,GAAG,EAAE,CAAC;AAAA,kBAC3C,EAAE,YAAY,oBAAC,UAAK,WAAU,+CAA+C,YAAE,UAAS;AAAA,mBAC3F,KAJe,MAAM,CAAC,CAKxB,CACD,GACH;AAAA,iBACF;AAAA,eAEJ;AAAA,aACF;AAAA,UAEA,qBAAC,SAAI,WAAU,sDACb;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAU;AAAA,gBACV,SAAS,MAAM;AAAE,sBAAI,SAAU,WAAU,UAAU,aAAa;AAAA,gBAAG;AAAA,gBACnE,UAAU,QAAQ,CAAC;AAAA,gBAElB;AAAA,yBAAO,oBAAC,WAAQ,WAAU,wBAAuB,IAAK,oBAAC,aAAU,WAAU,WAAU;AAAA,kBAAG;AAAA;AAAA;AAAA,YAE3F;AAAA,YACA,oBAAC,OAAE,WAAU,8CAA8C,sBAAW;AAAA,aACxE;AAAA;AAAA;AAAA,IACF;AAAA,KACF,GACF;AAEJ;","names":[]}
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
- size?: "default" | "icon" | "sm" | "lg" | null | undefined;
6
+ variant?: "ghost" | "link" | "default" | "destructive" | "outline" | "secondary" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
+ size?: "icon" | "default" | "sm" | "lg" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  asChild?: boolean;
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
- size?: "default" | "icon" | "sm" | "lg" | null | undefined;
6
+ variant?: "ghost" | "link" | "default" | "destructive" | "outline" | "secondary" | "premium" | "tonal" | "gradient-border" | "gradient-fill" | null | undefined;
7
+ size?: "icon" | "default" | "sm" | "lg" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  asChild?: boolean;
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
3
  import { FastMintProps } from './types.cjs';
4
4
  import 'starknet';
5
5
  import '@medialane/sdk';
6
6
  import '@medialane/sdk/starknet';
7
7
 
8
- declare function FastMint(props: FastMintProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
8
+ declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
9
9
 
10
10
  export { FastMint };
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
3
  import { FastMintProps } from './types.js';
4
4
  import 'starknet';
5
5
  import '@medialane/sdk';
6
6
  import '@medialane/sdk/starknet';
7
7
 
8
- declare function FastMint(props: FastMintProps): string | number | bigint | boolean | react_jsx_runtime.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
8
+ declare function FastMint(props: FastMintProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null | undefined;
9
9
 
10
10
  export { FastMint };
@@ -16,6 +16,7 @@ declare const editionMintSchema: zod.ZodObject<{
16
16
  royalty: zod.ZodNumber;
17
17
  }, "strip", zod.ZodTypeAny, {
18
18
  name: string;
19
+ value: string;
19
20
  ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
20
21
  licenseType: string;
21
22
  commercialUse: "Yes" | "No";
@@ -24,12 +25,12 @@ declare const editionMintSchema: zod.ZodObject<{
24
25
  geographicScope: string;
25
26
  aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
26
27
  royalty: number;
27
- value: string;
28
28
  recipient: string;
29
29
  description?: string | undefined;
30
30
  external_url?: string | undefined;
31
31
  }, {
32
32
  name: string;
33
+ value: string;
33
34
  ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
34
35
  licenseType: string;
35
36
  commercialUse: "Yes" | "No";
@@ -38,7 +39,6 @@ declare const editionMintSchema: zod.ZodObject<{
38
39
  geographicScope: string;
39
40
  aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
40
41
  royalty: number;
41
- value: string;
42
42
  recipient: string;
43
43
  description?: string | undefined;
44
44
  external_url?: string | undefined;
@@ -16,6 +16,7 @@ declare const editionMintSchema: zod.ZodObject<{
16
16
  royalty: zod.ZodNumber;
17
17
  }, "strip", zod.ZodTypeAny, {
18
18
  name: string;
19
+ value: string;
19
20
  ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
20
21
  licenseType: string;
21
22
  commercialUse: "Yes" | "No";
@@ -24,12 +25,12 @@ declare const editionMintSchema: zod.ZodObject<{
24
25
  geographicScope: string;
25
26
  aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
26
27
  royalty: number;
27
- value: string;
28
28
  recipient: string;
29
29
  description?: string | undefined;
30
30
  external_url?: string | undefined;
31
31
  }, {
32
32
  name: string;
33
+ value: string;
33
34
  ipType: "Audio" | "Video" | "Art" | "Photography" | "NFT" | "Software" | "RWA" | "Patents" | "Posts" | "Publications" | "Documents" | "Custom";
34
35
  licenseType: string;
35
36
  commercialUse: "Yes" | "No";
@@ -38,7 +39,6 @@ declare const editionMintSchema: zod.ZodObject<{
38
39
  geographicScope: string;
39
40
  aiPolicy: "Allowed" | "Not Allowed" | "Training Only";
40
41
  royalty: number;
41
- value: string;
42
42
  recipient: string;
43
43
  description?: string | undefined;
44
44
  external_url?: string | undefined;