@medialane/ui 0.77.0 → 0.78.1
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/asset-picker-cell.cjs +69 -0
- package/dist/components/asset-picker-cell.cjs.map +1 -0
- package/dist/components/asset-picker-cell.d.cts +15 -0
- package/dist/components/asset-picker-cell.d.ts +15 -0
- package/dist/components/asset-picker-cell.js +34 -0
- package/dist/components/asset-picker-cell.js.map +1 -0
- package/dist/components/asset-picker.cjs +10 -33
- package/dist/components/asset-picker.cjs.map +1 -1
- package/dist/components/asset-picker.js +11 -24
- package/dist/components/asset-picker.js.map +1 -1
- package/dist/components/asset-search-picker.cjs +10 -33
- package/dist/components/asset-search-picker.cjs.map +1 -1
- package/dist/components/asset-search-picker.js +11 -24
- package/dist/components/asset-search-picker.js.map +1 -1
- package/dist/components/license-terms-builder.cjs +314 -55
- package/dist/components/license-terms-builder.cjs.map +1 -1
- package/dist/components/license-terms-builder.d.cts +30 -6
- package/dist/components/license-terms-builder.d.ts +30 -6
- package/dist/components/license-terms-builder.js +311 -54
- package/dist/components/license-terms-builder.js.map +1 -1
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,86 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import { ChevronDown, ScrollText } from "lucide-react";
|
|
3
5
|
import { cn } from "../utils/cn.js";
|
|
6
|
+
import { CurrencyIcon } from "./currency-icon.js";
|
|
7
|
+
import { LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES } from "../data/ip.js";
|
|
8
|
+
const MEDIA_TYPES = [
|
|
9
|
+
"Social Media",
|
|
10
|
+
"Video",
|
|
11
|
+
"Photo",
|
|
12
|
+
"Article/Blog",
|
|
13
|
+
"Print",
|
|
14
|
+
"Broadcast",
|
|
15
|
+
"Podcast/Audio",
|
|
16
|
+
"Livestream"
|
|
17
|
+
];
|
|
4
18
|
const EMPTY_SPONSORSHIP_TERMS = {
|
|
5
19
|
amount: "",
|
|
6
20
|
paymentTokenSymbol: "",
|
|
7
21
|
durationDays: "30",
|
|
8
22
|
transferable: true,
|
|
9
23
|
royaltyPercent: "5",
|
|
10
|
-
licenseText: ""
|
|
24
|
+
licenseText: "",
|
|
25
|
+
licenseType: "CC BY-SA",
|
|
26
|
+
commercialUse: "Yes",
|
|
27
|
+
derivatives: "Share-Alike",
|
|
28
|
+
attribution: "Required",
|
|
29
|
+
territory: "Worldwide",
|
|
30
|
+
aiPolicy: "Allowed",
|
|
31
|
+
scope: "",
|
|
32
|
+
deliverables: "",
|
|
33
|
+
exclusive: false,
|
|
34
|
+
approvalRequired: false,
|
|
35
|
+
media: [],
|
|
36
|
+
mediaOther: ""
|
|
11
37
|
};
|
|
38
|
+
function toLicenseMetadata(terms) {
|
|
39
|
+
return {
|
|
40
|
+
terms: terms.licenseText,
|
|
41
|
+
transferable: terms.transferable,
|
|
42
|
+
royaltyPercent: Number(terms.royaltyPercent || "0"),
|
|
43
|
+
licenseType: terms.licenseType,
|
|
44
|
+
commercialUse: terms.commercialUse,
|
|
45
|
+
derivatives: terms.derivatives,
|
|
46
|
+
attribution: terms.attribution,
|
|
47
|
+
territory: terms.territory,
|
|
48
|
+
aiPolicy: terms.aiPolicy,
|
|
49
|
+
scope: terms.scope,
|
|
50
|
+
deliverables: terms.deliverables,
|
|
51
|
+
exclusive: terms.exclusive,
|
|
52
|
+
approvalRequired: terms.approvalRequired,
|
|
53
|
+
media: terms.media,
|
|
54
|
+
mediaOther: terms.mediaOther
|
|
55
|
+
};
|
|
56
|
+
}
|
|
12
57
|
const FIELD_LABEL = "text-xs font-semibold text-foreground";
|
|
13
58
|
const FIELD_HELP = "text-xs text-muted-foreground";
|
|
14
59
|
const INPUT_BASE = "w-full h-10 rounded-xl border border-border bg-card px-3 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-brand-purple/40 focus:border-brand-purple/40 disabled:opacity-50";
|
|
60
|
+
function ToggleGroup({ value, options, onChange, disabled }) {
|
|
61
|
+
return /* @__PURE__ */ jsx("div", { className: "flex rounded-lg border border-border overflow-hidden w-full", children: options.map((opt, i) => /* @__PURE__ */ jsx(
|
|
62
|
+
"button",
|
|
63
|
+
{
|
|
64
|
+
type: "button",
|
|
65
|
+
disabled,
|
|
66
|
+
onClick: () => onChange(opt),
|
|
67
|
+
className: cn(
|
|
68
|
+
"flex-1 px-3 py-2 text-xs sm:text-sm transition-colors disabled:opacity-50",
|
|
69
|
+
i > 0 && "border-l border-border",
|
|
70
|
+
value === opt ? "bg-primary text-primary-foreground font-medium" : "bg-background hover:bg-muted text-muted-foreground"
|
|
71
|
+
),
|
|
72
|
+
children: opt
|
|
73
|
+
},
|
|
74
|
+
opt
|
|
75
|
+
)) });
|
|
76
|
+
}
|
|
77
|
+
function YesNoToggle({ label, help, checked, onChange, disabled }) {
|
|
78
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
79
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: label }),
|
|
80
|
+
/* @__PURE__ */ jsx(ToggleGroup, { value: checked ? "Yes" : "No", options: ["Yes", "No"], onChange: (v) => onChange(v === "Yes"), disabled }),
|
|
81
|
+
/* @__PURE__ */ jsx("p", { className: FIELD_HELP, children: help })
|
|
82
|
+
] });
|
|
83
|
+
}
|
|
15
84
|
function LicenseTermsBuilder({
|
|
16
85
|
value,
|
|
17
86
|
onChange,
|
|
@@ -20,57 +89,59 @@ function LicenseTermsBuilder({
|
|
|
20
89
|
disabled,
|
|
21
90
|
className
|
|
22
91
|
}) {
|
|
92
|
+
const [panelOpen, setPanelOpen] = useState(false);
|
|
23
93
|
const set = (key, v) => onChange({ ...value, [key]: v });
|
|
94
|
+
const handleLicenseTypeChange = (licenseType) => {
|
|
95
|
+
const def = LICENSE_TYPES.find((l) => l.value === licenseType);
|
|
96
|
+
onChange({
|
|
97
|
+
...value,
|
|
98
|
+
licenseType,
|
|
99
|
+
...def ? { commercialUse: def.commercialUse, derivatives: def.derivatives, attribution: def.attribution } : {}
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
const selectedLicense = LICENSE_TYPES.find((l) => l.value === value.licenseType);
|
|
103
|
+
const toggleMedia = (m) => {
|
|
104
|
+
const next = value.media.includes(m) ? value.media.filter((x) => x !== m) : [...value.media, m];
|
|
105
|
+
set("media", next);
|
|
106
|
+
};
|
|
24
107
|
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), children: [
|
|
25
|
-
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-[1fr_auto] gap-2", children: [
|
|
26
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
27
|
-
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: amountLabel }),
|
|
28
|
-
/* @__PURE__ */ jsx(
|
|
29
|
-
"input",
|
|
30
|
-
{
|
|
31
|
-
type: "number",
|
|
32
|
-
min: 0,
|
|
33
|
-
step: "0.01",
|
|
34
|
-
inputMode: "decimal",
|
|
35
|
-
disabled,
|
|
36
|
-
value: value.amount,
|
|
37
|
-
onChange: (e) => set("amount", e.target.value),
|
|
38
|
-
placeholder: "0.00",
|
|
39
|
-
className: INPUT_BASE
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
] }),
|
|
43
|
-
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
44
|
-
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "Currency" }),
|
|
45
|
-
/* @__PURE__ */ jsxs(
|
|
46
|
-
"select",
|
|
47
|
-
{
|
|
48
|
-
disabled,
|
|
49
|
-
value: value.paymentTokenSymbol,
|
|
50
|
-
onChange: (e) => set("paymentTokenSymbol", e.target.value),
|
|
51
|
-
className: cn(INPUT_BASE, "w-24"),
|
|
52
|
-
children: [
|
|
53
|
-
/* @__PURE__ */ jsx("option", { value: "", disabled: true, children: "\u2014" }),
|
|
54
|
-
tokenOptions.map((symbol) => /* @__PURE__ */ jsx("option", { value: symbol, children: symbol }, symbol))
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
)
|
|
58
|
-
] })
|
|
59
|
-
] }),
|
|
60
108
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
61
|
-
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children:
|
|
109
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: amountLabel }),
|
|
62
110
|
/* @__PURE__ */ jsx(
|
|
63
111
|
"input",
|
|
64
112
|
{
|
|
65
113
|
type: "number",
|
|
66
|
-
min:
|
|
114
|
+
min: 0,
|
|
115
|
+
step: "0.01",
|
|
116
|
+
inputMode: "decimal",
|
|
67
117
|
disabled,
|
|
68
|
-
value: value.
|
|
69
|
-
onChange: (e) => set("
|
|
118
|
+
value: value.amount,
|
|
119
|
+
onChange: (e) => set("amount", e.target.value),
|
|
120
|
+
placeholder: "0.00",
|
|
70
121
|
className: INPUT_BASE
|
|
71
122
|
}
|
|
72
|
-
)
|
|
73
|
-
|
|
123
|
+
)
|
|
124
|
+
] }),
|
|
125
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
126
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "Currency" }),
|
|
127
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 sm:grid-cols-5 gap-1.5", children: tokenOptions.map((symbol) => /* @__PURE__ */ jsxs(
|
|
128
|
+
"button",
|
|
129
|
+
{
|
|
130
|
+
type: "button",
|
|
131
|
+
disabled,
|
|
132
|
+
onClick: () => set("paymentTokenSymbol", symbol),
|
|
133
|
+
"aria-pressed": value.paymentTokenSymbol === symbol,
|
|
134
|
+
className: cn(
|
|
135
|
+
"h-10 px-2 rounded-xl border text-xs font-semibold flex items-center justify-center gap-1.5 transition-colors disabled:opacity-50",
|
|
136
|
+
value.paymentTokenSymbol === symbol ? "border-brand-purple bg-brand-purple/10 text-foreground" : "border-border bg-card text-muted-foreground hover:text-foreground"
|
|
137
|
+
),
|
|
138
|
+
children: [
|
|
139
|
+
/* @__PURE__ */ jsx(CurrencyIcon, { symbol, size: 14 }),
|
|
140
|
+
symbol
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
symbol
|
|
144
|
+
)) })
|
|
74
145
|
] }),
|
|
75
146
|
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
76
147
|
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "Resale royalty (%)" }),
|
|
@@ -105,25 +176,211 @@ function LicenseTermsBuilder({
|
|
|
105
176
|
/* @__PURE__ */ jsx("span", { className: cn(FIELD_HELP, "block"), children: "Off means it's meant to stay with the sponsor who accepts it \u2014 resale still isn't blocked on-chain, this is just the stated intent." })
|
|
106
177
|
] })
|
|
107
178
|
] }),
|
|
108
|
-
/* @__PURE__ */ jsxs("div", { className: "
|
|
109
|
-
/* @__PURE__ */
|
|
110
|
-
|
|
111
|
-
"textarea",
|
|
179
|
+
/* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border overflow-hidden bg-card/40", children: [
|
|
180
|
+
/* @__PURE__ */ jsxs(
|
|
181
|
+
"button",
|
|
112
182
|
{
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
183
|
+
type: "button",
|
|
184
|
+
onClick: () => setPanelOpen((o) => !o),
|
|
185
|
+
className: "w-full flex items-center justify-between gap-3 px-4 py-3 text-left transition-colors hover:bg-card/80",
|
|
186
|
+
children: [
|
|
187
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2.5 min-w-0", children: [
|
|
188
|
+
/* @__PURE__ */ jsx(ScrollText, { className: "h-4 w-4 text-brand-purple shrink-0" }),
|
|
189
|
+
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
190
|
+
/* @__PURE__ */ jsx("span", { className: "block text-sm font-semibold", children: "How long, where, and what for" }),
|
|
191
|
+
!panelOpen ? /* @__PURE__ */ jsxs("span", { className: "block text-xs text-muted-foreground truncate", children: [
|
|
192
|
+
value.durationDays || "30",
|
|
193
|
+
" days \xB7 ",
|
|
194
|
+
value.territory,
|
|
195
|
+
" \xB7 ",
|
|
196
|
+
value.licenseType
|
|
197
|
+
] }) : null
|
|
198
|
+
] })
|
|
199
|
+
] }),
|
|
200
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: cn("h-4 w-4 transition-transform text-muted-foreground shrink-0", panelOpen && "rotate-180") })
|
|
201
|
+
]
|
|
119
202
|
}
|
|
120
203
|
),
|
|
121
|
-
/* @__PURE__ */
|
|
204
|
+
panelOpen ? /* @__PURE__ */ jsxs("div", { className: "px-4 pb-4 space-y-4 border-t border-border pt-4", children: [
|
|
205
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
206
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "License length (days)" }),
|
|
207
|
+
/* @__PURE__ */ jsx(
|
|
208
|
+
"input",
|
|
209
|
+
{
|
|
210
|
+
type: "number",
|
|
211
|
+
min: 1,
|
|
212
|
+
disabled,
|
|
213
|
+
value: value.durationDays,
|
|
214
|
+
onChange: (e) => set("durationDays", e.target.value),
|
|
215
|
+
className: INPUT_BASE
|
|
216
|
+
}
|
|
217
|
+
),
|
|
218
|
+
/* @__PURE__ */ jsx("p", { className: FIELD_HELP, children: "Counted from the moment the deal is accepted, not from today." })
|
|
219
|
+
] }),
|
|
220
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
221
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "License type" }),
|
|
222
|
+
/* @__PURE__ */ jsx(
|
|
223
|
+
"select",
|
|
224
|
+
{
|
|
225
|
+
disabled,
|
|
226
|
+
value: value.licenseType,
|
|
227
|
+
onChange: (e) => handleLicenseTypeChange(e.target.value),
|
|
228
|
+
className: INPUT_BASE,
|
|
229
|
+
children: LICENSE_TYPES.map((l) => /* @__PURE__ */ jsx("option", { value: l.value, children: l.label }, l.value))
|
|
230
|
+
}
|
|
231
|
+
),
|
|
232
|
+
selectedLicense ? /* @__PURE__ */ jsx("p", { className: FIELD_HELP, children: selectedLicense.description }) : null
|
|
233
|
+
] }),
|
|
234
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
235
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "Commercial use" }),
|
|
236
|
+
/* @__PURE__ */ jsx(ToggleGroup, { value: value.commercialUse, options: ["Yes", "No"], onChange: (v) => set("commercialUse", v), disabled })
|
|
237
|
+
] }),
|
|
238
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
239
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "Derivatives" }),
|
|
240
|
+
/* @__PURE__ */ jsx(ToggleGroup, { value: value.derivatives, options: ["Allowed", "Not Allowed", "Share-Alike"], onChange: (v) => set("derivatives", v), disabled })
|
|
241
|
+
] }),
|
|
242
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
243
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "Attribution" }),
|
|
244
|
+
/* @__PURE__ */ jsx(ToggleGroup, { value: value.attribution, options: ["Required", "Not Required"], onChange: (v) => set("attribution", v), disabled })
|
|
245
|
+
] }),
|
|
246
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
247
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "Territory" }),
|
|
248
|
+
/* @__PURE__ */ jsx(
|
|
249
|
+
"select",
|
|
250
|
+
{
|
|
251
|
+
disabled,
|
|
252
|
+
value: value.territory,
|
|
253
|
+
onChange: (e) => set("territory", e.target.value),
|
|
254
|
+
className: INPUT_BASE,
|
|
255
|
+
children: GEOGRAPHIC_SCOPES.map((t) => /* @__PURE__ */ jsx("option", { value: t, children: t }, t))
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
] }),
|
|
259
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
260
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "AI policy" }),
|
|
261
|
+
/* @__PURE__ */ jsx(
|
|
262
|
+
"select",
|
|
263
|
+
{
|
|
264
|
+
disabled,
|
|
265
|
+
value: value.aiPolicy,
|
|
266
|
+
onChange: (e) => set("aiPolicy", e.target.value),
|
|
267
|
+
className: INPUT_BASE,
|
|
268
|
+
children: AI_POLICIES.map((p) => /* @__PURE__ */ jsx("option", { value: p, children: p }, p))
|
|
269
|
+
}
|
|
270
|
+
),
|
|
271
|
+
/* @__PURE__ */ jsx("p", { className: FIELD_HELP, children: "Whether this work can be used to train AI models." })
|
|
272
|
+
] }),
|
|
273
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
274
|
+
/* @__PURE__ */ jsxs("label", { className: FIELD_LABEL, children: [
|
|
275
|
+
"Scope ",
|
|
276
|
+
/* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
277
|
+
] }),
|
|
278
|
+
/* @__PURE__ */ jsx(
|
|
279
|
+
"input",
|
|
280
|
+
{
|
|
281
|
+
type: "text",
|
|
282
|
+
disabled,
|
|
283
|
+
value: value.scope,
|
|
284
|
+
onChange: (e) => set("scope", e.target.value),
|
|
285
|
+
placeholder: "e.g. Instagram + YouTube only",
|
|
286
|
+
className: INPUT_BASE
|
|
287
|
+
}
|
|
288
|
+
)
|
|
289
|
+
] }),
|
|
290
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
291
|
+
/* @__PURE__ */ jsxs("label", { className: FIELD_LABEL, children: [
|
|
292
|
+
"Deliverables ",
|
|
293
|
+
/* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
294
|
+
] }),
|
|
295
|
+
/* @__PURE__ */ jsx(
|
|
296
|
+
"textarea",
|
|
297
|
+
{
|
|
298
|
+
disabled,
|
|
299
|
+
value: value.deliverables,
|
|
300
|
+
onChange: (e) => set("deliverables", e.target.value),
|
|
301
|
+
placeholder: "e.g. 3 posts, 1 video",
|
|
302
|
+
rows: 2,
|
|
303
|
+
className: cn(INPUT_BASE, "h-auto py-2.5 resize-y")
|
|
304
|
+
}
|
|
305
|
+
)
|
|
306
|
+
] }),
|
|
307
|
+
/* @__PURE__ */ jsx(
|
|
308
|
+
YesNoToggle,
|
|
309
|
+
{
|
|
310
|
+
label: "Exclusive to this sponsor",
|
|
311
|
+
help: "No other sponsors during the license term.",
|
|
312
|
+
checked: value.exclusive,
|
|
313
|
+
onChange: (v) => set("exclusive", v),
|
|
314
|
+
disabled
|
|
315
|
+
}
|
|
316
|
+
),
|
|
317
|
+
/* @__PURE__ */ jsx(
|
|
318
|
+
YesNoToggle,
|
|
319
|
+
{
|
|
320
|
+
label: "Content approval required",
|
|
321
|
+
help: "Sponsor reviews content before it's published.",
|
|
322
|
+
checked: value.approvalRequired,
|
|
323
|
+
onChange: (v) => set("approvalRequired", v),
|
|
324
|
+
disabled
|
|
325
|
+
}
|
|
326
|
+
),
|
|
327
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
328
|
+
/* @__PURE__ */ jsxs("label", { className: FIELD_LABEL, children: [
|
|
329
|
+
"Media ",
|
|
330
|
+
/* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
331
|
+
] }),
|
|
332
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1.5", children: MEDIA_TYPES.map((m) => /* @__PURE__ */ jsx(
|
|
333
|
+
"button",
|
|
334
|
+
{
|
|
335
|
+
type: "button",
|
|
336
|
+
disabled,
|
|
337
|
+
onClick: () => toggleMedia(m),
|
|
338
|
+
className: cn(
|
|
339
|
+
"h-8 px-2.5 rounded-full border text-xs font-medium transition-colors disabled:opacity-50",
|
|
340
|
+
value.media.includes(m) ? "border-brand-purple bg-brand-purple/10 text-foreground" : "border-border bg-card text-muted-foreground hover:text-foreground"
|
|
341
|
+
),
|
|
342
|
+
children: m
|
|
343
|
+
},
|
|
344
|
+
m
|
|
345
|
+
)) }),
|
|
346
|
+
/* @__PURE__ */ jsx(
|
|
347
|
+
"input",
|
|
348
|
+
{
|
|
349
|
+
type: "text",
|
|
350
|
+
disabled,
|
|
351
|
+
value: value.mediaOther,
|
|
352
|
+
onChange: (e) => set("mediaOther", e.target.value),
|
|
353
|
+
placeholder: "Other media type",
|
|
354
|
+
className: cn(INPUT_BASE, "mt-1.5")
|
|
355
|
+
}
|
|
356
|
+
)
|
|
357
|
+
] }),
|
|
358
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
359
|
+
/* @__PURE__ */ jsxs("label", { className: FIELD_LABEL, children: [
|
|
360
|
+
"Additional terms ",
|
|
361
|
+
/* @__PURE__ */ jsx("span", { className: "font-normal text-muted-foreground", children: "(optional)" })
|
|
362
|
+
] }),
|
|
363
|
+
/* @__PURE__ */ jsx(
|
|
364
|
+
"textarea",
|
|
365
|
+
{
|
|
366
|
+
disabled,
|
|
367
|
+
value: value.licenseText,
|
|
368
|
+
onChange: (e) => set("licenseText", e.target.value),
|
|
369
|
+
placeholder: "Anything else worth spelling out.",
|
|
370
|
+
rows: 3,
|
|
371
|
+
className: cn(INPUT_BASE, "h-auto py-2.5 resize-y")
|
|
372
|
+
}
|
|
373
|
+
),
|
|
374
|
+
/* @__PURE__ */ jsx("p", { className: FIELD_HELP, children: "Saved permanently and shown to anyone who holds the license." })
|
|
375
|
+
] })
|
|
376
|
+
] }) : null
|
|
122
377
|
] })
|
|
123
378
|
] });
|
|
124
379
|
}
|
|
125
380
|
export {
|
|
126
381
|
EMPTY_SPONSORSHIP_TERMS,
|
|
127
|
-
LicenseTermsBuilder
|
|
382
|
+
LicenseTermsBuilder,
|
|
383
|
+
MEDIA_TYPES,
|
|
384
|
+
toLicenseMetadata
|
|
128
385
|
};
|
|
129
386
|
//# sourceMappingURL=license-terms-builder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/license-terms-builder.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\n/**\n * The deal terms a sponsorship offer/proposal needs, in plain-language shape\n * — no bps, no IPFS, no ByteArray. `royaltyPercent` is a plain 0–100 number\n * (multiply by 100 for the contract's basis-points argument); `licenseText`\n * is the terms document's raw content — the caller pins it to IPFS (via\n * their own existing upload helper) and passes the resulting `ipfs://` URI\n * to the SDK call. This component only collects and validates the data, it\n * never fetches or uploads anything itself.\n */\nexport interface SponsorshipTerms {\n amount: string;\n paymentTokenSymbol: string;\n durationDays: string;\n transferable: boolean;\n royaltyPercent: string;\n licenseText: string;\n}\n\nexport const EMPTY_SPONSORSHIP_TERMS: SponsorshipTerms = {\n amount: \"\",\n paymentTokenSymbol: \"\",\n durationDays: \"30\",\n transferable: true,\n royaltyPercent: \"5\",\n licenseText: \"\",\n};\n\nexport interface LicenseTermsBuilderProps {\n value: SponsorshipTerms;\n onChange: (next: SponsorshipTerms) => void;\n /** Payment token symbols to offer — e.g. from SUPPORTED_TOKENS. */\n tokenOptions: string[];\n /** Copy override for the amount field — \"Minimum bid\" for an owner's\n * offer, \"Amount you'll pay\" for a sponsor's proposal. Default: \"Amount\". */\n amountLabel?: string;\n disabled?: boolean;\n className?: string;\n}\n\nconst FIELD_LABEL = \"text-xs font-semibold text-foreground\";\nconst FIELD_HELP = \"text-xs text-muted-foreground\";\nconst INPUT_BASE =\n \"w-full h-10 rounded-xl border border-border bg-card px-3 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-brand-purple/40 focus:border-brand-purple/40 disabled:opacity-50\";\n\nexport function LicenseTermsBuilder({\n value, onChange, tokenOptions, amountLabel = \"Amount\", disabled, className,\n}: LicenseTermsBuilderProps) {\n const set = <K extends keyof SponsorshipTerms>(key: K, v: SponsorshipTerms[K]) =>\n onChange({ ...value, [key]: v });\n\n return (\n <div className={cn(\"space-y-4\", className)}>\n <div className=\"grid grid-cols-[1fr_auto] gap-2\">\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>{amountLabel}</label>\n <input\n type=\"number\"\n min={0}\n step=\"0.01\"\n inputMode=\"decimal\"\n disabled={disabled}\n value={value.amount}\n onChange={(e) => set(\"amount\", e.target.value)}\n placeholder=\"0.00\"\n className={INPUT_BASE}\n />\n </div>\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Currency</label>\n <select\n disabled={disabled}\n value={value.paymentTokenSymbol}\n onChange={(e) => set(\"paymentTokenSymbol\", e.target.value)}\n className={cn(INPUT_BASE, \"w-24\")}\n >\n <option value=\"\" disabled>—</option>\n {tokenOptions.map((symbol) => (\n <option key={symbol} value={symbol}>{symbol}</option>\n ))}\n </select>\n </div>\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>License length (days)</label>\n <input\n type=\"number\"\n min={1}\n disabled={disabled}\n value={value.durationDays}\n onChange={(e) => set(\"durationDays\", e.target.value)}\n className={INPUT_BASE}\n />\n <p className={FIELD_HELP}>Counted from the moment the deal is accepted, not from today.</p>\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Resale royalty (%)</label>\n <input\n type=\"number\"\n min={0}\n max={100}\n step=\"0.1\"\n disabled={disabled}\n value={value.royaltyPercent}\n onChange={(e) => set(\"royaltyPercent\", e.target.value)}\n className={INPUT_BASE}\n />\n <p className={FIELD_HELP}>You get this share automatically if the license is ever resold.</p>\n </div>\n\n <label className=\"flex items-start gap-2.5 cursor-pointer select-none\">\n <input\n type=\"checkbox\"\n disabled={disabled}\n checked={value.transferable}\n onChange={(e) => set(\"transferable\", e.target.checked)}\n className=\"mt-0.5 h-4 w-4 rounded border-border text-brand-purple focus:ring-brand-purple/40\"\n />\n <span className=\"text-sm\">\n <span className=\"font-medium\">Sponsor can resell this license</span>\n <span className={cn(FIELD_HELP, \"block\")}>Off means it's meant to stay with the sponsor who accepts it — resale still isn't blocked on-chain, this is just the stated intent.</span>\n </span>\n </label>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>License terms</label>\n <textarea\n disabled={disabled}\n value={value.licenseText}\n onChange={(e) => set(\"licenseText\", e.target.value)}\n placeholder=\"What can the sponsor do with this license? Usage rights, credit requirements, territory, anything else worth spelling out.\"\n rows={4}\n className={cn(INPUT_BASE, \"h-auto py-2.5 resize-y\")}\n />\n <p className={FIELD_HELP}>Saved permanently and shown to anyone who holds the license.</p>\n </div>\n </div>\n );\n}\n"],"mappings":";AAyDQ,SACE,KADF;AAvDR,SAAS,UAAU;AAoBZ,MAAM,0BAA4C;AAAA,EACvD,QAAQ;AAAA,EACR,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,aAAa;AACf;AAcA,MAAM,cAAc;AACpB,MAAM,aAAa;AACnB,MAAM,aACJ;AAEK,SAAS,oBAAoB;AAAA,EAClC;AAAA,EAAO;AAAA,EAAU;AAAA,EAAc,cAAc;AAAA,EAAU;AAAA,EAAU;AACnE,GAA6B;AAC3B,QAAM,MAAM,CAAmC,KAAQ,MACrD,SAAS,EAAE,GAAG,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC;AAEjC,SACE,qBAAC,SAAI,WAAW,GAAG,aAAa,SAAS,GACvC;AAAA,yBAAC,SAAI,WAAU,mCACb;AAAA,2BAAC,SAAI,WAAU,eACb;AAAA,4BAAC,WAAM,WAAW,aAAc,uBAAY;AAAA,QAC5C;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL,KAAK;AAAA,YACL,M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AA,MACb;AAAA,MACA,oBAAC,OAAE,WAAW,YAAY,6EAA+D;AAAA,OAC3F;AAAA,IAEA,qBAAC,WAAM,WAAU,uDACf;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,MAAK;AAAA,UACL;AAAA,UACA,SAAS,MAAM;AAAA,UACf,UAAU,CAAC,MAAM,IAAI,gBAAgB,EAAE,OAAO,OAAO;AAAA,UACrD,WAAU;AAAA;AAAA,MACZ;AAAA,MACA,qBAAC,UAAK,WAAU,WACd;AAAA,4BAAC,UAAK,WAAU,eAAc,6CAA+B;AAAA,QAC7D,oBAAC,UAAK,WAAW,GAAG,YAAY,OAAO,GAAG,sJAA6I;AAAA,SACzL;AAAA,OACF;AAAA,IAEA,qBAAC,SAAI,WAAU,eACb;AAAA,0BAAC,WAAM,WAAW,aAAa,2BAAa;AAAA,MAC5C;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA,OAAO,MAAM;AAAA,UACb,UAAU,CAAC,MAAM,IAAI,eAAe,EAAE,OAAO,KAAK;AAAA,UAClD,aAAY;AAAA,UACZ,MAAM;AAAA,UACN,WAAW,GAAG,YAAY,wBAAwB;AAAA;AAAA,MACpD;AAAA,MACA,oBAAC,OAAE,WAAW,YAAY,0EAA4D;AAAA,OACxF;AAAA,KACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/license-terms-builder.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { ChevronDown, ScrollText } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES } from \"../data/ip.js\";\n\n/** Common sponsorship media/channel types — deliberately not part of the\n * general IP taxonomy in `data/ip.ts` (that's about the asset itself;\n * this is about the sponsorship deal's channels), so it stays local here. */\nexport const MEDIA_TYPES = [\n \"Social Media\", \"Video\", \"Photo\", \"Article/Blog\", \"Print\", \"Broadcast\", \"Podcast/Audio\", \"Livestream\",\n] as const;\n\n/**\n * The deal terms a sponsorship offer/proposal needs, in plain-language shape\n * — no bps, no IPFS, no ByteArray. `royaltyPercent` is a plain 0–100 number\n * (multiply by 100 for the contract's basis-points argument). Every field\n * here is declarative metadata carried in the pinned IPFS document (see\n * `toLicenseMetadata`) — the contract never reads any of it, so none of it\n * is enforced beyond the atomic accept-and-mint payment itself. This\n * component only collects and validates the data, it never fetches or\n * uploads anything itself.\n */\nexport interface SponsorshipTerms {\n amount: string;\n paymentTokenSymbol: string;\n durationDays: string;\n transferable: boolean;\n royaltyPercent: string;\n /** Free-text notes that don't fit any structured field below. */\n licenseText: string;\n licenseType: string;\n commercialUse: \"Yes\" | \"No\";\n derivatives: \"Allowed\" | \"Not Allowed\" | \"Share-Alike\";\n attribution: \"Required\" | \"Not Required\";\n territory: string;\n aiPolicy: string;\n /** e.g. \"Instagram + YouTube only\" — too deal-specific to bound into an enum. */\n scope: string;\n /** e.g. \"3 posts, 1 video\" */\n deliverables: string;\n exclusive: boolean;\n approvalRequired: boolean;\n media: string[];\n mediaOther: string;\n}\n\nexport const EMPTY_SPONSORSHIP_TERMS: SponsorshipTerms = {\n amount: \"\",\n paymentTokenSymbol: \"\",\n durationDays: \"30\",\n transferable: true,\n royaltyPercent: \"5\",\n licenseText: \"\",\n licenseType: \"CC BY-SA\",\n commercialUse: \"Yes\",\n derivatives: \"Share-Alike\",\n attribution: \"Required\",\n territory: \"Worldwide\",\n aiPolicy: \"Allowed\",\n scope: \"\",\n deliverables: \"\",\n exclusive: false,\n approvalRequired: false,\n media: [],\n mediaOther: \"\",\n};\n\n/** Shapes the pinned-IPFS-JSON payload — the single place both apps build\n * this object, so it can't drift across call sites. Purely additive; the\n * contract never reads any of it. */\nexport function toLicenseMetadata(terms: SponsorshipTerms): Record<string, unknown> {\n return {\n terms: terms.licenseText,\n transferable: terms.transferable,\n royaltyPercent: Number(terms.royaltyPercent || \"0\"),\n licenseType: terms.licenseType,\n commercialUse: terms.commercialUse,\n derivatives: terms.derivatives,\n attribution: terms.attribution,\n territory: terms.territory,\n aiPolicy: terms.aiPolicy,\n scope: terms.scope,\n deliverables: terms.deliverables,\n exclusive: terms.exclusive,\n approvalRequired: terms.approvalRequired,\n media: terms.media,\n mediaOther: terms.mediaOther,\n };\n}\n\nexport interface LicenseTermsBuilderProps {\n value: SponsorshipTerms;\n onChange: (next: SponsorshipTerms) => void;\n /** Payment token symbols to offer — e.g. from SUPPORTED_TOKENS. */\n tokenOptions: string[];\n /** Copy override for the amount field — \"Minimum bid\" for an owner's\n * offer, \"Amount you'll pay\" for a sponsor's proposal. Default: \"Amount\". */\n amountLabel?: string;\n disabled?: boolean;\n className?: string;\n}\n\nconst FIELD_LABEL = \"text-xs font-semibold text-foreground\";\nconst FIELD_HELP = \"text-xs text-muted-foreground\";\nconst INPUT_BASE =\n \"w-full h-10 rounded-xl border border-border bg-card px-3 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-brand-purple/40 focus:border-brand-purple/40 disabled:opacity-50\";\n\nfunction ToggleGroup({ value, options, onChange, disabled }: { value: string; options: readonly string[]; onChange: (v: string) => void; disabled?: boolean }) {\n return (\n <div className=\"flex rounded-lg border border-border overflow-hidden w-full\">\n {options.map((opt, i) => (\n <button\n key={opt}\n type=\"button\"\n disabled={disabled}\n onClick={() => onChange(opt)}\n className={cn(\n \"flex-1 px-3 py-2 text-xs sm:text-sm transition-colors disabled:opacity-50\",\n i > 0 && \"border-l border-border\",\n value === opt\n ? \"bg-primary text-primary-foreground font-medium\"\n : \"bg-background hover:bg-muted text-muted-foreground\",\n )}\n >\n {opt}\n </button>\n ))}\n </div>\n );\n}\n\nfunction YesNoToggle({ label, help, checked, onChange, disabled }: { label: string; help: string; checked: boolean; onChange: (v: boolean) => void; disabled?: boolean }) {\n return (\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>{label}</label>\n <ToggleGroup value={checked ? \"Yes\" : \"No\"} options={[\"Yes\", \"No\"]} onChange={(v) => onChange(v === \"Yes\")} disabled={disabled} />\n <p className={FIELD_HELP}>{help}</p>\n </div>\n );\n}\n\nexport function LicenseTermsBuilder({\n value, onChange, tokenOptions, amountLabel = \"Amount\", disabled, className,\n}: LicenseTermsBuilderProps) {\n const [panelOpen, setPanelOpen] = useState(false);\n const set = <K extends keyof SponsorshipTerms>(key: K, v: SponsorshipTerms[K]) =>\n onChange({ ...value, [key]: v });\n\n const handleLicenseTypeChange = (licenseType: string) => {\n const def = LICENSE_TYPES.find((l) => l.value === licenseType);\n onChange({\n ...value,\n licenseType,\n ...(def ? { commercialUse: def.commercialUse, derivatives: def.derivatives, attribution: def.attribution } : {}),\n });\n };\n\n const selectedLicense = LICENSE_TYPES.find((l) => l.value === value.licenseType);\n const toggleMedia = (m: string) => {\n const next = value.media.includes(m) ? value.media.filter((x) => x !== m) : [...value.media, m];\n set(\"media\", next);\n };\n\n return (\n <div className={cn(\"space-y-4\", className)}>\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>{amountLabel}</label>\n <input\n type=\"number\"\n min={0}\n step=\"0.01\"\n inputMode=\"decimal\"\n disabled={disabled}\n value={value.amount}\n onChange={(e) => set(\"amount\", e.target.value)}\n placeholder=\"0.00\"\n className={INPUT_BASE}\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Currency</label>\n <div className=\"grid grid-cols-3 sm:grid-cols-5 gap-1.5\">\n {tokenOptions.map((symbol) => (\n <button\n key={symbol}\n type=\"button\"\n disabled={disabled}\n onClick={() => set(\"paymentTokenSymbol\", symbol)}\n aria-pressed={value.paymentTokenSymbol === symbol}\n className={cn(\n \"h-10 px-2 rounded-xl border text-xs font-semibold flex items-center justify-center gap-1.5 transition-colors disabled:opacity-50\",\n value.paymentTokenSymbol === symbol\n ? \"border-brand-purple bg-brand-purple/10 text-foreground\"\n : \"border-border bg-card text-muted-foreground hover:text-foreground\",\n )}\n >\n <CurrencyIcon symbol={symbol} size={14} />\n {symbol}\n </button>\n ))}\n </div>\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Resale royalty (%)</label>\n <input\n type=\"number\"\n min={0}\n max={100}\n step=\"0.1\"\n disabled={disabled}\n value={value.royaltyPercent}\n onChange={(e) => set(\"royaltyPercent\", e.target.value)}\n className={INPUT_BASE}\n />\n <p className={FIELD_HELP}>You get this share automatically if the license is ever resold.</p>\n </div>\n\n <label className=\"flex items-start gap-2.5 cursor-pointer select-none\">\n <input\n type=\"checkbox\"\n disabled={disabled}\n checked={value.transferable}\n onChange={(e) => set(\"transferable\", e.target.checked)}\n className=\"mt-0.5 h-4 w-4 rounded border-border text-brand-purple focus:ring-brand-purple/40\"\n />\n <span className=\"text-sm\">\n <span className=\"font-medium\">Sponsor can resell this license</span>\n <span className={cn(FIELD_HELP, \"block\")}>Off means it's meant to stay with the sponsor who accepts it — resale still isn't blocked on-chain, this is just the stated intent.</span>\n </span>\n </label>\n\n <div className=\"rounded-xl border border-border overflow-hidden bg-card/40\">\n <button\n type=\"button\"\n onClick={() => setPanelOpen((o) => !o)}\n className=\"w-full flex items-center justify-between gap-3 px-4 py-3 text-left transition-colors hover:bg-card/80\"\n >\n <span className=\"flex items-center gap-2.5 min-w-0\">\n <ScrollText className=\"h-4 w-4 text-brand-purple shrink-0\" />\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-semibold\">How long, where, and what for</span>\n {!panelOpen ? (\n <span className=\"block text-xs text-muted-foreground truncate\">\n {value.durationDays || \"30\"} days · {value.territory} · {value.licenseType}\n </span>\n ) : null}\n </span>\n </span>\n <ChevronDown className={cn(\"h-4 w-4 transition-transform text-muted-foreground shrink-0\", panelOpen && \"rotate-180\")} />\n </button>\n\n {panelOpen ? (\n <div className=\"px-4 pb-4 space-y-4 border-t border-border pt-4\">\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>License length (days)</label>\n <input\n type=\"number\"\n min={1}\n disabled={disabled}\n value={value.durationDays}\n onChange={(e) => set(\"durationDays\", e.target.value)}\n className={INPUT_BASE}\n />\n <p className={FIELD_HELP}>Counted from the moment the deal is accepted, not from today.</p>\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>License type</label>\n <select\n disabled={disabled}\n value={value.licenseType}\n onChange={(e) => handleLicenseTypeChange(e.target.value)}\n className={INPUT_BASE}\n >\n {LICENSE_TYPES.map((l) => (\n <option key={l.value} value={l.value}>{l.label}</option>\n ))}\n </select>\n {selectedLicense ? <p className={FIELD_HELP}>{selectedLicense.description}</p> : null}\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Commercial use</label>\n <ToggleGroup value={value.commercialUse} options={[\"Yes\", \"No\"]} onChange={(v) => set(\"commercialUse\", v as SponsorshipTerms[\"commercialUse\"])} disabled={disabled} />\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Derivatives</label>\n <ToggleGroup value={value.derivatives} options={[\"Allowed\", \"Not Allowed\", \"Share-Alike\"]} onChange={(v) => set(\"derivatives\", v as SponsorshipTerms[\"derivatives\"])} disabled={disabled} />\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Attribution</label>\n <ToggleGroup value={value.attribution} options={[\"Required\", \"Not Required\"]} onChange={(v) => set(\"attribution\", v as SponsorshipTerms[\"attribution\"])} disabled={disabled} />\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Territory</label>\n <select\n disabled={disabled}\n value={value.territory}\n onChange={(e) => set(\"territory\", e.target.value)}\n className={INPUT_BASE}\n >\n {GEOGRAPHIC_SCOPES.map((t) => (\n <option key={t} value={t}>{t}</option>\n ))}\n </select>\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>AI policy</label>\n <select\n disabled={disabled}\n value={value.aiPolicy}\n onChange={(e) => set(\"aiPolicy\", e.target.value)}\n className={INPUT_BASE}\n >\n {AI_POLICIES.map((p) => (\n <option key={p} value={p}>{p}</option>\n ))}\n </select>\n <p className={FIELD_HELP}>Whether this work can be used to train AI models.</p>\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Scope <span className=\"font-normal text-muted-foreground\">(optional)</span></label>\n <input\n type=\"text\"\n disabled={disabled}\n value={value.scope}\n onChange={(e) => set(\"scope\", e.target.value)}\n placeholder=\"e.g. Instagram + YouTube only\"\n className={INPUT_BASE}\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Deliverables <span className=\"font-normal text-muted-foreground\">(optional)</span></label>\n <textarea\n disabled={disabled}\n value={value.deliverables}\n onChange={(e) => set(\"deliverables\", e.target.value)}\n placeholder=\"e.g. 3 posts, 1 video\"\n rows={2}\n className={cn(INPUT_BASE, \"h-auto py-2.5 resize-y\")}\n />\n </div>\n\n <YesNoToggle\n label=\"Exclusive to this sponsor\"\n help=\"No other sponsors during the license term.\"\n checked={value.exclusive}\n onChange={(v) => set(\"exclusive\", v)}\n disabled={disabled}\n />\n\n <YesNoToggle\n label=\"Content approval required\"\n help=\"Sponsor reviews content before it's published.\"\n checked={value.approvalRequired}\n onChange={(v) => set(\"approvalRequired\", v)}\n disabled={disabled}\n />\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Media <span className=\"font-normal text-muted-foreground\">(optional)</span></label>\n <div className=\"flex flex-wrap gap-1.5\">\n {MEDIA_TYPES.map((m) => (\n <button\n key={m}\n type=\"button\"\n disabled={disabled}\n onClick={() => toggleMedia(m)}\n className={cn(\n \"h-8 px-2.5 rounded-full border text-xs font-medium transition-colors disabled:opacity-50\",\n value.media.includes(m)\n ? \"border-brand-purple bg-brand-purple/10 text-foreground\"\n : \"border-border bg-card text-muted-foreground hover:text-foreground\",\n )}\n >\n {m}\n </button>\n ))}\n </div>\n <input\n type=\"text\"\n disabled={disabled}\n value={value.mediaOther}\n onChange={(e) => set(\"mediaOther\", e.target.value)}\n placeholder=\"Other media type\"\n className={cn(INPUT_BASE, \"mt-1.5\")}\n />\n </div>\n\n <div className=\"space-y-1.5\">\n <label className={FIELD_LABEL}>Additional terms <span className=\"font-normal text-muted-foreground\">(optional)</span></label>\n <textarea\n disabled={disabled}\n value={value.licenseText}\n onChange={(e) => set(\"licenseText\", e.target.value)}\n placeholder=\"Anything else worth spelling out.\"\n rows={3}\n className={cn(INPUT_BASE, \"h-auto py-2.5 resize-y\")}\n />\n <p className={FIELD_HELP}>Saved permanently and shown to anyone who holds the license.</p>\n </div>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";AAkHQ,cAsBJ,YAtBI;AAhHR,SAAS,gBAAgB;AACzB,SAAS,aAAa,kBAAkB;AACxC,SAAS,UAAU;AACnB,SAAS,oBAAoB;AAC7B,SAAS,eAAe,mBAAmB,mBAAmB;AAKvD,MAAM,cAAc;AAAA,EACzB;AAAA,EAAgB;AAAA,EAAS;AAAA,EAAS;AAAA,EAAgB;AAAA,EAAS;AAAA,EAAa;AAAA,EAAiB;AAC3F;AAoCO,MAAM,0BAA4C;AAAA,EACvD,QAAQ;AAAA,EACR,oBAAoB;AAAA,EACpB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,aAAa;AAAA,EACb,eAAe;AAAA,EACf,aAAa;AAAA,EACb,aAAa;AAAA,EACb,WAAW;AAAA,EACX,UAAU;AAAA,EACV,OAAO;AAAA,EACP,cAAc;AAAA,EACd,WAAW;AAAA,EACX,kBAAkB;AAAA,EAClB,OAAO,CAAC;AAAA,EACR,YAAY;AACd;AAKO,SAAS,kBAAkB,OAAkD;AAClF,SAAO;AAAA,IACL,OAAO,MAAM;AAAA,IACb,cAAc,MAAM;AAAA,IACpB,gBAAgB,OAAO,MAAM,kBAAkB,GAAG;AAAA,IAClD,aAAa,MAAM;AAAA,IACnB,eAAe,MAAM;AAAA,IACrB,aAAa,MAAM;AAAA,IACnB,aAAa,MAAM;AAAA,IACnB,WAAW,MAAM;AAAA,IACjB,UAA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CACD,GACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL;AAAA,cACA,OAAO,MAAM;AAAA,cACb,UAAU,CAAC,MAAM,IAAI,cAAc,EAAE,OAAO,KAAK;AAAA,cACjD,aAAY;AAAA,cACZ,WAAW,GAAG,YAAY,QAAQ;AAAA;AAAA,UACpC;AAAA,WACF;AAAA,QAEA,qBAAC,SAAI,WAAU,eACb;AAAA,+BAAC,WAAM,WAAW,aAAa;AAAA;AAAA,YAAiB,oBAAC,UAAK,WAAU,qCAAoC,wBAAU;AAAA,aAAO;AAAA,UACrH;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA,OAAO,MAAM;AAAA,cACb,UAAU,CAAC,MAAM,IAAI,eAAe,EAAE,OAAO,KAAK;AAAA,cAClD,aAAY;AAAA,cACZ,MAAM;AAAA,cACN,WAAW,GAAG,YAAY,wBAAwB;AAAA;AAAA,UACpD;AAAA,UACA,oBAAC,OAAE,WAAW,YAAY,0EAA4D;AAAA,WACxF;AAAA,SACF,IACE;AAAA,OACN;AAAA,KACF;AAEJ;","names":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -115,6 +115,7 @@ __export(index_exports, {
|
|
|
115
115
|
ListingCard: () => import_listing_card.ListingCard,
|
|
116
116
|
ListingCardSkeleton: () => import_listing_card.ListingCardSkeleton,
|
|
117
117
|
LoadMoreSentinel: () => import_load_more_sentinel.LoadMoreSentinel,
|
|
118
|
+
MEDIA_TYPES: () => import_license_terms_builder.MEDIA_TYPES,
|
|
118
119
|
MedialaneCollectionCard: () => import_medialane_collection_card.MedialaneCollectionCard,
|
|
119
120
|
MedialaneLogoFull: () => import_brand_logo.MedialaneLogoFull,
|
|
120
121
|
MotionCard: () => import_motion_primitives.MotionCard,
|
|
@@ -162,6 +163,7 @@ __export(index_exports, {
|
|
|
162
163
|
shortenAddress: () => import_address.shortenAddress,
|
|
163
164
|
timeAgo: () => import_time.timeAgo,
|
|
164
165
|
timeUntil: () => import_time.timeUntil,
|
|
166
|
+
toLicenseMetadata: () => import_license_terms_builder.toLicenseMetadata,
|
|
165
167
|
useCollectionFilters: () => import_collection_filters.useCollectionFilters,
|
|
166
168
|
useLaunchpadFilter: () => import_launchpad_services.useLaunchpadFilter,
|
|
167
169
|
useNavAccountSheet: () => import_nav_shell.useNavAccountSheet,
|
|
@@ -348,6 +350,7 @@ var import_action_dialog = require("./components/action-dialog.js");
|
|
|
348
350
|
ListingCard,
|
|
349
351
|
ListingCardSkeleton,
|
|
350
352
|
LoadMoreSentinel,
|
|
353
|
+
MEDIA_TYPES,
|
|
351
354
|
MedialaneCollectionCard,
|
|
352
355
|
MedialaneLogoFull,
|
|
353
356
|
MotionCard,
|
|
@@ -395,6 +398,7 @@ var import_action_dialog = require("./components/action-dialog.js");
|
|
|
395
398
|
shortenAddress,
|
|
396
399
|
timeAgo,
|
|
397
400
|
timeUntil,
|
|
401
|
+
toLicenseMetadata,
|
|
398
402
|
useCollectionFilters,
|
|
399
403
|
useLaunchpadFilter,
|
|
400
404
|
useNavAccountSheet,
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, AssetOwnerRow, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport type { AssetOwnerRowProps } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\nexport { CurrencyIcon, CurrencyAmount } from \"./components/currency-icon.js\";\nexport type { CurrencyIconProps, CurrencyAmountProps } from \"./components/currency-icon.js\";\n\nexport { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./components/ip-type-badge.js\";\nexport type { IpTypeBadgeProps, IpTypeConfig } from \"./components/ip-type-badge.js\";\n\nexport { AddressDisplay } from \"./components/address-display.js\";\nexport type { AddressDisplayProps } from \"./components/address-display.js\";\n\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps } from \"./components/token-card.js\";\nexport {\n useCollectionFilters, SORT_OPTIONS, CollectionFiltersTrigger, CollectionFiltersBody,\n} from \"./components/collection-filters.js\";\nexport type { TraitSection, CollectionFiltersTriggerProps, CollectionFiltersBodyProps } from \"./components/collection-filters.js\";\nexport {\n DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem,\n DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel,\n DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup,\n DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent,\n DropdownMenuSubTrigger, DropdownMenuRadioGroup,\n} from \"./components/dropdown-menu.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\nexport { AssetPicker } from \"./components/asset-picker.js\";\nexport type { AssetPickerProps, OwnedAsset } from \"./components/asset-picker.js\";\nexport { AssetSearchPicker } from \"./components/asset-search-picker.js\";\nexport type { AssetSearchPickerProps } from \"./components/asset-search-picker.js\";\nexport { LicenseTermsBuilder, EMPTY_SPONSORSHIP_TERMS } from \"./components/license-terms-builder.js\";\nexport type { LicenseTermsBuilderProps, SponsorshipTerms } from \"./components/license-terms-builder.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection, DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps, DiscoverActivityStripProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES, useLaunchpadFilter } from \"./components/launchpad-services.js\";\nexport { LaunchpadFilterBar } from \"./components/launchpad-filter-bar.js\";\nexport type { LaunchpadFilterBarProps } from \"./components/launchpad-filter-bar.js\";\nexport { LaunchpadStrip } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadStripProps } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.62.0 — nav shell (brand trigger + header buttons + account sheet) ─────\nexport {\n NavBrandButton,\n NavIconButton,\n NavAccountSheet,\n useNavAccountSheet,\n} from \"./components/nav-shell.js\";\nexport type {\n NavBrandButtonProps,\n NavIconButtonProps,\n NavAccountSheetProps,\n} from \"./components/nav-shell.js\";\n\n// ── v0.59.0 — portfolio shell (two-level nav + header + overview) ────────────\nexport { PortfolioNav } from \"./components/portfolio-nav.js\";\nexport type {\n PortfolioNavProps,\n PortfolioNavSection,\n PortfolioNavChild,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-nav.js\";\nexport { PortfolioHeader } from \"./components/portfolio-header.js\";\nexport type {\n PortfolioHeaderProps,\n PortfolioHeaderScore,\n} from \"./components/portfolio-header.js\";\nexport { PortfolioOverview } from \"./components/portfolio-overview.js\";\nexport type {\n PortfolioOverviewProps,\n PortfolioOverviewStat,\n PortfolioAttentionItem,\n PortfolioQuickAction,\n} from \"./components/portfolio-overview.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n\n// Rewards score kit (v0.36.0)\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelLadder } from \"./components/rewards/level-ladder.js\";\nexport type { LevelLadderProps } from \"./components/rewards/level-ladder.js\";\nexport { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\n\n// ── v0.37.0 additions — infinite-scroll trigger ──────────────────────────────\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n\n// ── v0.47.0 additions — community rewards section ────────────────────────────\nexport { CommunityRewardsSection } from \"./components/community-rewards-section.js\";\nexport type { CommunityRewardsSectionProps, CommunityRewardsEntry } from \"./components/community-rewards-section.js\";\nexport { CreatorAirdropBanner } from \"./components/creator-airdrop-banner.js\";\nexport type { CreatorAirdropBannerProps } from \"./components/creator-airdrop-banner.js\";\n\n// ── Design system primitives — action-focus pattern, tokens, data display ────\nexport { ActionButton } from \"./components/action-button.js\";\nexport type { ActionButtonProps, ActionKey, ToneKey } from \"./components/action-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\nexport { TokenGlyph, TokenAmount } from \"./components/token-glyph.js\";\nexport type { TokenGlyphProps, TokenAmountProps, TokenSymbol } from \"./components/token-glyph.js\";\n\nexport { StatTile, StatPill } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps } from \"./components/stat-tile.js\";\n\nexport { ActionDialog } from \"./components/action-dialog.js\";\nexport type { ActionDialogProps } from \"./components/action-dialog.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,gBAAmB;AACnB,oBAAsD;AACtD,qBAA+B;AAC/B,kBAA2B;AAC3B,6BAA+B;AAG/B,sBAA+C;AAE/C,gBAGO;AAEP,0BAEO;AAEP,6BAA8B;AAC9B,oCAAqC;AACrC,mCAAoC;AACpC,+BAAgC;AAChC,uCAAwC;AAExC,gCAAqF;AAErF,kCAAmC;AAEnC,iCAAkC;AAElC,qCAAsC;AAEtC,mBAAsB;AAGtB,2BAA6C;AAG7C,2BAAyD;AAGzD,6BAA+B;AAG/B,wBAAkC;AAIlC,+BAAyF;AACzF,4BAA8B;AAE9B,4BAA8B;AAE9B,0BAA4B;AAE5B,6BAAuD;AAEvD,wBAA6C;AAE7C,gCAEO;AAEP,2BAMO;AACP,wBAA6C;AAE7C,0BAA4B;AAE5B,iCAAkC;AAElC,mCAA6D;AAG7D,mBAGO;AACP,uBAA2F;AAC3F,4BAGO;AAGP,kBAAmC;AACnC,sBAAmD;AAEnD,yBAA+C;AAE/C,6BAA+B;AAE/B,0BAAiD;AAEjD,0BAA4B;AAE5B,iCAAkC;AAElC,2BAA4B;AAI5B,2BAA6B;AAE7B,+BAA2D;AAE3D,wCAAyC;AAEzC,qCAAsC;AAEtC,mCAA2D;AAE3D,2BAAsE;AAItE,gCAAiG;AACjG,kCAAmC;AAEnC,6BAA+B;AAG/B,IAAAA,6BAAwE;AAIxE,8BAAkD;AAIlD,uBAKO;AAQP,2BAA6B;AAO7B,8BAAgC;AAKhC,gCAAkC;AAOlC,8BAAsC;AAOtC,4BAA8B;AAE9B,wBAA0B;AAM1B,gCAAiC;AAEjC,sBAAwB;AAIxB,yBAA2B;AAE3B,yBAA2B;AAE3B,yBAA2B;AAE3B,gCAAiC;AAEjC,+BAAoD;AAEpD,0BAA4B;AAE5B,8BAA+B;AAI/B,gCAAiC;AAIjC,uCAAwC;AAExC,oCAAqC;AAIrC,2BAA6B;AAG7B,iCAAkC;AAElC,uCAAwC;AAExC,yBAAwC;AAGxC,uBAAmC;AAGnC,2BAA6B;","names":["import_launchpad_services"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["// ── Utils ─────────────────────────────────────────────────────────────────────\nexport { cn } from \"./utils/cn.js\";\nexport { formatDisplayPrice, parsePriceDisplay } from \"./utils/format.js\";\nexport { shortenAddress } from \"./utils/address.js\";\nexport { ipfsToHttp } from \"./utils/ipfs.js\";\nexport { licenseSummary } from \"./utils/license-summary.js\";\n\n// ── Data (server-safe — no React, safe in Server Components) ──────────────────\nexport { IP_TYPE_DATA, IP_TYPE_DATA_MAP } from \"./data/ip-types.js\";\nexport type { IpTypeData } from \"./data/ip-types.js\";\nexport {\n IP_TYPES, LICENSE_TYPES, GEOGRAPHIC_SCOPES, AI_POLICIES,\n DERIVATIVES_OPTIONS, LICENSE_TRAIT_TYPES,\n} from \"./data/ip.js\";\nexport type { IPType, LicenseType } from \"./data/ip.js\";\nexport {\n IP_TEMPLATES, EMBED_PLATFORM_META, SOCIAL_PLATFORM_META, TEMPLATE_TRAIT_TYPES, DOC_UPLOAD,\n} from \"./data/ip-templates.js\";\nexport type { EmbedPlatform, SocialPlatform, TraitSuggestion, IPTemplate, DocUploadConfig } from \"./data/ip-templates.js\";\nexport { IPTypeDisplay } from \"./components/ip-type-display.js\";\nexport { AssetOverviewContent } from \"./components/asset-overview-content.js\";\nexport { AssetLicenseSummary } from \"./components/asset-license-summary.js\";\nexport { AssetMarketsTab } from \"./components/asset-markets-tab.js\";\nexport { ParentAttributionBanner } from \"./components/parent-attribution-banner.js\";\nexport type { ParentBannerProps } from \"./components/parent-attribution-banner.js\";\nexport { AssetMediaColumn, AssetHeaderBlock, AssetOwnerRow, buildEditionStats } from \"./components/asset-top-sections.js\";\nexport type { AssetOwnerRowProps } from \"./components/asset-top-sections.js\";\nexport { AssetCollectionBar } from \"./components/asset-collection-bar.js\";\nexport type { AssetCollectionBarProps, AssetCollectionBarSibling } from \"./components/asset-collection-bar.js\";\nexport { AssetUtilityIcons } from \"./components/asset-utility-icons.js\";\nexport type { AssetUtilityIconsProps } from \"./components/asset-utility-icons.js\";\nexport { AssetMarketplacePanel } from \"./components/asset-marketplace-panel.js\";\nexport type { AssetMarketplacePanelProps, ApiOrderLike } from \"./components/asset-marketplace-panel.js\";\nexport { BRAND } from \"./data/brand.js\";\n\n// ── Components (client-only — all have \"use client\") ─────────────────────────\nexport { CurrencyIcon, CurrencyAmount } from \"./components/currency-icon.js\";\nexport type { CurrencyIconProps, CurrencyAmountProps } from \"./components/currency-icon.js\";\n\nexport { IpTypeBadge, IP_TYPE_CONFIG, IP_TYPE_MAP } from \"./components/ip-type-badge.js\";\nexport type { IpTypeBadgeProps, IpTypeConfig } from \"./components/ip-type-badge.js\";\n\nexport { AddressDisplay } from \"./components/address-display.js\";\nexport type { AddressDisplayProps } from \"./components/address-display.js\";\n\nexport { MedialaneLogoFull } from \"./components/brand-logo.js\";\nexport type { MedialaneLogoFullProps } from \"./components/brand-logo.js\";\n\n// ── v0.2 additions ────────────────────────────────────────────────────────────\nexport { MotionCard, FadeIn, Stagger, StaggerItem, KineticWords, SPRING, EASE_OUT } from \"./components/motion-primitives.js\";\nexport { PageContainer } from \"./components/page-container.js\";\nexport type { PageContainerProps } from \"./components/page-container.js\";\nexport { ScrollSection } from \"./components/scroll-section.js\";\nexport type { ScrollSectionProps } from \"./components/scroll-section.js\";\nexport { ShareButton } from \"./components/share-button.js\";\nexport type { ShareButtonProps } from \"./components/share-button.js\";\nexport { CollectionCard, CollectionCardSkeleton } from \"./components/collection-card.js\";\nexport type { CollectionCardProps } from \"./components/collection-card.js\";\nexport { TokenCard, TokenCardSkeleton } from \"./components/token-card.js\";\nexport type { TokenCardProps } from \"./components/token-card.js\";\nexport {\n useCollectionFilters, SORT_OPTIONS, CollectionFiltersTrigger, CollectionFiltersBody,\n} from \"./components/collection-filters.js\";\nexport type { TraitSection, CollectionFiltersTriggerProps, CollectionFiltersBodyProps } from \"./components/collection-filters.js\";\nexport {\n DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem,\n DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel,\n DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup,\n DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent,\n DropdownMenuSubTrigger, DropdownMenuRadioGroup,\n} from \"./components/dropdown-menu.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.js\";\nexport { AssetPicker } from \"./components/asset-picker.js\";\nexport type { AssetPickerProps, OwnedAsset } from \"./components/asset-picker.js\";\nexport { AssetSearchPicker } from \"./components/asset-search-picker.js\";\nexport type { AssetSearchPickerProps } from \"./components/asset-search-picker.js\";\nexport { LicenseTermsBuilder, EMPTY_SPONSORSHIP_TERMS, MEDIA_TYPES, toLicenseMetadata } from \"./components/license-terms-builder.js\";\nexport type { LicenseTermsBuilderProps, SponsorshipTerms } from \"./components/license-terms-builder.js\";\n// ── Coin discovery (chain-agnostic; price/data/href injected by the app) ─────\nexport {\n coinKind, formatCoinPrice, formatFdv,\n type CoinKind, type CoinCollectionLike, type CoinPriceLike,\n} from \"./data/coins.js\";\nexport { CoinCard, CoinRow, CoinCardSkeleton, type UseCoinPrice, type CoinTileProps } from \"./components/coin-card.js\";\nexport {\n CoinsExplorer,\n type CoinsExplorerProps, type CoinFilter, type CoinSort, type UseCoins,\n} from \"./components/coins-explorer.js\";\n\n// ── v0.3 additions ────────────────────────────────────────────────────────────\nexport { timeAgo, timeUntil } from \"./utils/time.js\";\nexport { ACTIVITY_TYPE_CONFIG, TYPE_FILTERS } from \"./data/activity.js\";\nexport type { ActivityTypeConfig } from \"./data/activity.js\";\nexport { HeroSlider, HeroSliderSkeleton } from \"./components/hero-slider.js\";\nexport type { HeroSliderProps } from \"./components/hero-slider.js\";\nexport { ActivityTicker } from \"./components/activity-ticker.js\";\nexport type { ActivityTickerProps } from \"./components/activity-ticker.js\";\nexport { ListingCard, ListingCardSkeleton } from \"./components/listing-card.js\";\nexport type { ListingCardProps } from \"./components/listing-card.js\";\nexport { ActivityRow } from \"./components/activity-row.js\";\nexport type { ActivityRowProps } from \"./components/activity-row.js\";\nexport { ActivityFeedShell } from \"./components/activity-feed-shell.js\";\nexport type { ActivityFeedShellProps } from \"./components/activity-feed-shell.js\";\nexport { CtaCardGrid } from \"./components/cta-card-grid.js\";\nexport type { CtaCardGridProps, CtaCardItem } from \"./components/cta-card-grid.js\";\n\n// ── v0.3.2 additions ─────────────────────────────────────────────────────────\nexport { DiscoverHero } from \"./components/discover-hero.js\";\nexport type { DiscoverHeroProps } from \"./components/discover-hero.js\";\nexport { FeaturedCarousel, FeaturedCarouselSkeleton } from \"./components/featured-carousel.js\";\nexport type { FeaturedCarouselProps } from \"./components/featured-carousel.js\";\nexport { DiscoverCollectionsStrip } from \"./components/discover-collections-strip.js\";\nexport type { DiscoverCollectionsStripProps } from \"./components/discover-collections-strip.js\";\nexport { DiscoverCreatorsStrip } from \"./components/discover-creators-strip.js\";\nexport type { DiscoverCreatorsStripProps } from \"./components/discover-creators-strip.js\";\nexport { DiscoverFeedSection, DiscoverActivityStrip } from \"./components/discover-feed-section.js\";\nexport type { DiscoverFeedSectionProps, DiscoverActivityStripProps } from \"./components/discover-feed-section.js\";\nexport { ActivityCard, ActivityCardSkeleton, ACTIVITY_MESSAGES } from \"./components/activity-card.js\";\nexport type { ActivityCardProps } from \"./components/activity-card.js\";\n\n// ── Launchpad (grouped sections — single page-UI source since 0.8.0) ─────────\nexport { LaunchpadGroupedSections, LaunchpadServiceCard, SERVICE_HUES, useLaunchpadFilter } from \"./components/launchpad-services.js\";\nexport { LaunchpadFilterBar } from \"./components/launchpad-filter-bar.js\";\nexport type { LaunchpadFilterBarProps } from \"./components/launchpad-filter-bar.js\";\nexport { LaunchpadStrip } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadStripProps } from \"./components/launchpad-strip.js\";\nexport type { LaunchpadGroupedSectionsProps, LaunchpadServiceCardProps, ServiceOverride, ServiceOverrides } from \"./components/launchpad-services.js\";\nexport { LAUNCHPAD_SERVICE_DEFINITIONS, LAUNCHPAD_SERVICE_GROUPS } from \"./data/launchpad-services.js\";\nexport type { ServiceDefinition, ServiceStatus, ServiceGroup, ServiceGroupDefinition } from \"./data/launchpad-services.js\";\n\n// ── v0.5.0 additions ─────────────────────────────────────────────────────────\nexport { NavCommandMenu, useNavCommandMenu } from \"./components/nav-command-menu.js\";\nexport type { NavCommand, NavCommandGroup, NavCommandMenuProps } from \"./components/nav-command-menu.js\";\n\n// ── v0.62.0 — nav shell (brand trigger + header buttons + account sheet) ─────\nexport {\n NavBrandButton,\n NavIconButton,\n NavAccountSheet,\n useNavAccountSheet,\n} from \"./components/nav-shell.js\";\nexport type {\n NavBrandButtonProps,\n NavIconButtonProps,\n NavAccountSheetProps,\n} from \"./components/nav-shell.js\";\n\n// ── v0.59.0 — portfolio shell (two-level nav + header + overview) ────────────\nexport { PortfolioNav } from \"./components/portfolio-nav.js\";\nexport type {\n PortfolioNavProps,\n PortfolioNavSection,\n PortfolioNavChild,\n PortfolioBadgeVariant,\n} from \"./components/portfolio-nav.js\";\nexport { PortfolioHeader } from \"./components/portfolio-header.js\";\nexport type {\n PortfolioHeaderProps,\n PortfolioHeaderScore,\n} from \"./components/portfolio-header.js\";\nexport { PortfolioOverview } from \"./components/portfolio-overview.js\";\nexport type {\n PortfolioOverviewProps,\n PortfolioOverviewStat,\n PortfolioAttentionItem,\n PortfolioQuickAction,\n} from \"./components/portfolio-overview.js\";\nexport { derivePortfolioCounts } from \"./utils/portfolio-counts.js\";\nexport type { PortfolioCounts, CountableOrder } from \"./utils/portfolio-counts.js\";\n\n// ── v0.22.0 additions — launchpad/claim form template primitives ─────────────\n// Pure-presentation header + rail shared by every launchpad/claim form. The\n// app supplies its own gate, back button, and form logic. Requires the\n// `.btn-border-animated` class (in @medialane/ui/styles) for the form shell.\nexport { ServiceHeader } from \"./components/service-header.js\";\nexport type { ServiceHeaderProps } from \"./components/service-header.js\";\nexport { ClaimRail } from \"./components/claim-rail.js\";\nexport type { ClaimRailProps } from \"./components/claim-rail.js\";\n\n// ── v0.23.0 additions — slot-based form shell ────────────────────────────────\n// Pure layout (back slot + header + animated-border compartment + 8/4 bento).\n// No auth/router — the app injects its own gate (around children) + back button.\nexport { ServiceFormShell } from \"./components/service-form-shell.js\";\nexport type { ServiceFormShellProps } from \"./components/service-form-shell.js\";\nexport { StepNav } from \"./components/step-nav.js\";\nexport type { StepNavProps, StepNavStep } from \"./components/step-nav.js\";\n\n// Rewards score kit (v0.36.0)\nexport { LevelBadge } from \"./components/rewards/level-badge.js\";\nexport type { LevelBadgeProps } from \"./components/rewards/level-badge.js\";\nexport { XpProgress } from \"./components/rewards/xp-progress.js\";\nexport type { XpProgressProps } from \"./components/rewards/xp-progress.js\";\nexport { BadgeShelf } from \"./components/rewards/badge-shelf.js\";\nexport type { BadgeShelfProps, BadgeShelfBadge } from \"./components/rewards/badge-shelf.js\";\nexport { ScoreSummaryCard } from \"./components/rewards/score-summary-card.js\";\nexport type { ScoreSummaryCardProps } from \"./components/rewards/score-summary-card.js\";\nexport { LeaderboardTable, LeaderboardWidget } from \"./components/rewards/leaderboard-table.js\";\nexport type { LeaderboardTableProps, LeaderboardWidgetProps, LeaderboardEntryLike } from \"./components/rewards/leaderboard-table.js\";\nexport { LevelLadder } from \"./components/rewards/level-ladder.js\";\nexport type { LevelLadderProps } from \"./components/rewards/level-ladder.js\";\nexport { XpToastContent } from \"./components/rewards/xp-toast-content.js\";\nexport type { XpToastContentProps } from \"./components/rewards/xp-toast-content.js\";\n\n// ── v0.37.0 additions — infinite-scroll trigger ──────────────────────────────\nexport { LoadMoreSentinel } from \"./components/load-more-sentinel.js\";\nexport type { LoadMoreSentinelProps } from \"./components/load-more-sentinel.js\";\n\n// ── v0.47.0 additions — community rewards section ────────────────────────────\nexport { CommunityRewardsSection } from \"./components/community-rewards-section.js\";\nexport type { CommunityRewardsSectionProps, CommunityRewardsEntry } from \"./components/community-rewards-section.js\";\nexport { CreatorAirdropBanner } from \"./components/creator-airdrop-banner.js\";\nexport type { CreatorAirdropBannerProps } from \"./components/creator-airdrop-banner.js\";\n\n// ── Design system primitives — action-focus pattern, tokens, data display ────\nexport { ActionButton } from \"./components/action-button.js\";\nexport type { ActionButtonProps, ActionKey, ToneKey } from \"./components/action-button.js\";\n\nexport { CoinLaunchPreview } from \"./components/coin-launch-preview.js\";\nexport type { CoinPreviewData } from \"./components/coin-launch-preview.js\";\nexport { MedialaneCollectionCard } from \"./components/medialane-collection-card.js\";\nexport type { MedialaneCollectionCardProps } from \"./components/medialane-collection-card.js\";\nexport { TokenGlyph, TokenAmount } from \"./components/token-glyph.js\";\nexport type { TokenGlyphProps, TokenAmountProps, TokenSymbol } from \"./components/token-glyph.js\";\n\nexport { StatTile, StatPill } from \"./components/stat-tile.js\";\nexport type { StatTileProps, StatPillProps } from \"./components/stat-tile.js\";\n\nexport { ActionDialog } from \"./components/action-dialog.js\";\nexport type { ActionDialogProps } from \"./components/action-dialog.js\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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+BAAoD;AAEpD,0BAA4B;AAE5B,8BAA+B;AAI/B,gCAAiC;AAIjC,uCAAwC;AAExC,oCAAqC;AAIrC,2BAA6B;AAG7B,iCAAkC;AAElC,uCAAwC;AAExC,yBAAwC;AAGxC,uBAAmC;AAGnC,2BAA6B;","names":["import_launchpad_services"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -31,7 +31,7 @@ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMe
|
|
|
31
31
|
export { AssetCard, AssetCardPrice, AssetCardProps, AssetCardSkeleton } from './components/asset-card.cjs';
|
|
32
32
|
export { AssetPicker, AssetPickerProps, OwnedAsset } from './components/asset-picker.cjs';
|
|
33
33
|
export { AssetSearchPicker, AssetSearchPickerProps } from './components/asset-search-picker.cjs';
|
|
34
|
-
export { EMPTY_SPONSORSHIP_TERMS, LicenseTermsBuilder, LicenseTermsBuilderProps, SponsorshipTerms } from './components/license-terms-builder.cjs';
|
|
34
|
+
export { EMPTY_SPONSORSHIP_TERMS, LicenseTermsBuilder, LicenseTermsBuilderProps, MEDIA_TYPES, SponsorshipTerms, toLicenseMetadata } from './components/license-terms-builder.cjs';
|
|
35
35
|
export { CoinCollectionLike, CoinKind, CoinPriceLike, coinKind, formatCoinPrice, formatFdv } from './data/coins.cjs';
|
|
36
36
|
export { CoinCard, CoinCardSkeleton, CoinRow, CoinTileProps, UseCoinPrice } from './components/coin-card.cjs';
|
|
37
37
|
export { CoinFilter, CoinSort, CoinsExplorer, CoinsExplorerProps, UseCoins } from './components/coins-explorer.cjs';
|