@medialane/ui 0.72.0 → 0.73.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/asset-picker.cjs +107 -0
- package/dist/components/asset-picker.cjs.map +1 -0
- package/dist/components/asset-picker.d.cts +24 -0
- package/dist/components/asset-picker.d.ts +24 -0
- package/dist/components/asset-picker.js +73 -0
- package/dist/components/asset-picker.js.map +1 -0
- package/dist/components/license-terms-builder.cjs +154 -0
- package/dist/components/license-terms-builder.cjs.map +1 -0
- package/dist/components/license-terms-builder.d.cts +34 -0
- package/dist/components/license-terms-builder.d.ts +34 -0
- package/dist/components/license-terms-builder.js +129 -0
- package/dist/components/license-terms-builder.js.map +1 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var asset_picker_exports = {};
|
|
31
|
+
__export(asset_picker_exports, {
|
|
32
|
+
AssetPicker: () => AssetPicker
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(asset_picker_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_image = __toESM(require("next/image"), 1);
|
|
38
|
+
var import_lucide_react = require("lucide-react");
|
|
39
|
+
var import_cn = require("../utils/cn.js");
|
|
40
|
+
const isSame = (a, b) => !!b && a.contractAddress === b.contractAddress && a.tokenId === b.tokenId;
|
|
41
|
+
function AssetPicker({
|
|
42
|
+
assets,
|
|
43
|
+
isLoading,
|
|
44
|
+
selected,
|
|
45
|
+
onSelect,
|
|
46
|
+
emptyStateHref,
|
|
47
|
+
emptyStateLabel,
|
|
48
|
+
className
|
|
49
|
+
}) {
|
|
50
|
+
const [query, setQuery] = (0, import_react.useState)("");
|
|
51
|
+
const filtered = query ? assets.filter((a) => a.name.toLowerCase().includes(query.toLowerCase())) : assets;
|
|
52
|
+
if (isLoading) {
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("grid grid-cols-3 sm:grid-cols-4 gap-2.5", className), children: Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "aspect-square rounded-xl bg-muted/60 animate-pulse" }, i)) });
|
|
54
|
+
}
|
|
55
|
+
if (assets.length === 0) {
|
|
56
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("rounded-xl border border-dashed border-border/60 p-6 text-center text-sm text-muted-foreground", className), children: [
|
|
57
|
+
"You don't own any assets yet.",
|
|
58
|
+
emptyStateHref ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("a", { href: emptyStateHref, className: "ml-1 font-semibold text-foreground underline underline-offset-2", children: emptyStateLabel ?? "Create one" }) : null
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("space-y-3", className), children: [
|
|
62
|
+
assets.length > 8 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative", children: [
|
|
63
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none" }),
|
|
64
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
65
|
+
"input",
|
|
66
|
+
{
|
|
67
|
+
type: "text",
|
|
68
|
+
value: query,
|
|
69
|
+
onChange: (e) => setQuery(e.target.value),
|
|
70
|
+
placeholder: "Search your assets",
|
|
71
|
+
className: "w-full h-10 rounded-full border border-border bg-card pl-9 pr-4 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-brand-purple/40 focus:border-brand-purple/40"
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
] }) : null,
|
|
75
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "grid grid-cols-3 sm:grid-cols-4 gap-2.5 max-h-80 overflow-y-auto pr-0.5", children: filtered.map((asset) => {
|
|
76
|
+
const active = isSame(asset, selected);
|
|
77
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
78
|
+
"button",
|
|
79
|
+
{
|
|
80
|
+
type: "button",
|
|
81
|
+
onClick: () => onSelect(asset),
|
|
82
|
+
"aria-pressed": active,
|
|
83
|
+
className: (0, import_cn.cn)(
|
|
84
|
+
"group relative aspect-square rounded-xl overflow-hidden border-2 transition-colors text-left",
|
|
85
|
+
active ? "border-brand-purple" : "border-border/50 active:border-border sm:hover:border-border"
|
|
86
|
+
),
|
|
87
|
+
children: [
|
|
88
|
+
asset.image ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: asset.image, alt: asset.name, fill: true, sizes: "120px", className: "object-cover" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full w-full flex items-center justify-center bg-muted/60", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ImageIcon, { className: "h-5 w-5 text-muted-foreground/50" }) }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent px-1.5 py-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "truncate text-[11px] font-medium text-white", children: asset.name }) }),
|
|
90
|
+
active ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "absolute top-1.5 right-1.5 h-5 w-5 rounded-full bg-brand-purple flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "h-3 w-3 text-white" }) }) : null
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
`${asset.contractAddress}-${asset.tokenId}`
|
|
94
|
+
);
|
|
95
|
+
}) }),
|
|
96
|
+
query && filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs text-muted-foreground text-center py-4", children: [
|
|
97
|
+
'No assets match "',
|
|
98
|
+
query,
|
|
99
|
+
'".'
|
|
100
|
+
] }) : null
|
|
101
|
+
] });
|
|
102
|
+
}
|
|
103
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
104
|
+
0 && (module.exports = {
|
|
105
|
+
AssetPicker
|
|
106
|
+
});
|
|
107
|
+
//# sourceMappingURL=asset-picker.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport Image from \"next/image\";\nimport { Check, ImageIcon, Search } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface OwnedAsset {\n contractAddress: string;\n tokenId: string;\n name: string;\n image: string | null;\n}\n\nexport interface AssetPickerProps {\n /** The caller's already-fetched, already-resolved asset list — this\n * component takes data, it doesn't fetch it. Plug in `useTokensByOwner`\n * (or an app's equivalent) and map to `OwnedAsset` at the call site. */\n assets: OwnedAsset[];\n isLoading: boolean;\n selected: OwnedAsset | null;\n onSelect: (asset: OwnedAsset) => void;\n /** Shown in the empty state when the wallet owns nothing yet. */\n emptyStateHref?: string;\n emptyStateLabel?: string;\n className?: string;\n}\n\nconst isSame = (a: OwnedAsset, b: OwnedAsset | null) =>\n !!b && a.contractAddress === b.contractAddress && a.tokenId === b.tokenId;\n\nexport function AssetPicker({\n assets, isLoading, selected, onSelect, emptyStateHref, emptyStateLabel, className,\n}: AssetPickerProps) {\n const [query, setQuery] = useState(\"\");\n const filtered = query\n ? assets.filter((a) => a.name.toLowerCase().includes(query.toLowerCase()))\n : assets;\n\n if (isLoading) {\n return (\n <div className={cn(\"grid grid-cols-3 sm:grid-cols-4 gap-2.5\", className)}>\n {Array.from({ length: 8 }).map((_, i) => (\n <div key={i} className=\"aspect-square rounded-xl bg-muted/60 animate-pulse\" />\n ))}\n </div>\n );\n }\n\n if (assets.length === 0) {\n return (\n <div className={cn(\"rounded-xl border border-dashed border-border/60 p-6 text-center text-sm text-muted-foreground\", className)}>\n You don't own any assets yet.\n {emptyStateHref ? (\n <a href={emptyStateHref} className=\"ml-1 font-semibold text-foreground underline underline-offset-2\">\n {emptyStateLabel ?? \"Create one\"}\n </a>\n ) : null}\n </div>\n );\n }\n\n return (\n <div className={cn(\"space-y-3\", className)}>\n {assets.length > 8 ? (\n <div className=\"relative\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none\" />\n <input\n type=\"text\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder=\"Search your assets\"\n className=\"w-full h-10 rounded-full border border-border bg-card pl-9 pr-4 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-brand-purple/40 focus:border-brand-purple/40\"\n />\n </div>\n ) : null}\n\n <div className=\"grid grid-cols-3 sm:grid-cols-4 gap-2.5 max-h-80 overflow-y-auto pr-0.5\">\n {filtered.map((asset) => {\n const active = isSame(asset, selected);\n return (\n <button\n key={`${asset.contractAddress}-${asset.tokenId}`}\n type=\"button\"\n onClick={() => onSelect(asset)}\n aria-pressed={active}\n className={cn(\n \"group relative aspect-square rounded-xl overflow-hidden border-2 transition-colors text-left\",\n active ? \"border-brand-purple\" : \"border-border/50 active:border-border sm:hover:border-border\",\n )}\n >\n {asset.image ? (\n <Image src={asset.image} alt={asset.name} fill sizes=\"120px\" className=\"object-cover\" />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center bg-muted/60\">\n <ImageIcon className=\"h-5 w-5 text-muted-foreground/50\" />\n </div>\n )}\n <div className=\"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent px-1.5 py-1\">\n <p className=\"truncate text-[11px] font-medium text-white\">{asset.name}</p>\n </div>\n {active ? (\n <div className=\"absolute top-1.5 right-1.5 h-5 w-5 rounded-full bg-brand-purple flex items-center justify-center\">\n <Check className=\"h-3 w-3 text-white\" />\n </div>\n ) : null}\n </button>\n );\n })}\n </div>\n\n {query && filtered.length === 0 ? (\n <p className=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AO,KAAK;AAAA,UACxC,aAAY;AAAA,UACZ,WAAU;AAAA;AAAA,MACZ;AAAA,OACF,IACE;AAAA,IAEJ,4CAAC,SAAI,WAAU,2EACZ,mBAAS,IAAI,CAAC,UAAU;AACvB,YAAM,SAAS,OAAO,OAAO,QAAQ;AACrC,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,SAAS,MAAM,SAAS,KAAK;AAAA,UAC7B,gBAAc;AAAA,UACd,eAAW;AAAA,YACT;AAAA,YACA,SAAS,wBAAwB;AAAA,UACnC;AAAA,UAEC;AAAA,kBAAM,QACL,4CAAC,aAAAA,SAAA,EAAM,KAAK,MAAM,OAAO,KAAK,MAAM,MAAM,MAAI,MAAC,OAAM,SAAQ,WAAU,gBAAe,IAEtF,4CAAC,SAAI,WAAU,8DACb,sDAAC,iCAAU,WAAU,oCAAmC,GAC1D;AAAA,YAEF,4CAAC,SAAI,WAAU,yFACb,sDAAC,OAAE,WAAU,+CAA+C,gBAAM,MAAK,GACzE;AAAA,YACC,SACC,4CAAC,SAAI,WAAU,oGACb,sDAAC,6BAAM,WAAU,sBAAqB,GACxC,IACE;AAAA;AAAA;AAAA,QAvBC,GAAG,MAAM,eAAe,IAAI,MAAM,OAAO;AAAA,MAwBhD;AAAA,IAEJ,CAAC,GACH;AAAA,IAEC,SAAS,SAAS,WAAW,IAC5B,6CAAC,OAAE,WAAU,kDAAiD;AAAA;AAAA,MAAuB;AAAA,MAAM;AAAA,OAAO,IAChG;AAAA,KACN;AAEJ;","names":["Image"]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface OwnedAsset {
|
|
4
|
+
contractAddress: string;
|
|
5
|
+
tokenId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
image: string | null;
|
|
8
|
+
}
|
|
9
|
+
interface AssetPickerProps {
|
|
10
|
+
/** The caller's already-fetched, already-resolved asset list — this
|
|
11
|
+
* component takes data, it doesn't fetch it. Plug in `useTokensByOwner`
|
|
12
|
+
* (or an app's equivalent) and map to `OwnedAsset` at the call site. */
|
|
13
|
+
assets: OwnedAsset[];
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
selected: OwnedAsset | null;
|
|
16
|
+
onSelect: (asset: OwnedAsset) => void;
|
|
17
|
+
/** Shown in the empty state when the wallet owns nothing yet. */
|
|
18
|
+
emptyStateHref?: string;
|
|
19
|
+
emptyStateLabel?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare function AssetPicker({ assets, isLoading, selected, onSelect, emptyStateHref, emptyStateLabel, className, }: AssetPickerProps): react_jsx_runtime.JSX.Element;
|
|
23
|
+
|
|
24
|
+
export { AssetPicker, type AssetPickerProps, type OwnedAsset };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface OwnedAsset {
|
|
4
|
+
contractAddress: string;
|
|
5
|
+
tokenId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
image: string | null;
|
|
8
|
+
}
|
|
9
|
+
interface AssetPickerProps {
|
|
10
|
+
/** The caller's already-fetched, already-resolved asset list — this
|
|
11
|
+
* component takes data, it doesn't fetch it. Plug in `useTokensByOwner`
|
|
12
|
+
* (or an app's equivalent) and map to `OwnedAsset` at the call site. */
|
|
13
|
+
assets: OwnedAsset[];
|
|
14
|
+
isLoading: boolean;
|
|
15
|
+
selected: OwnedAsset | null;
|
|
16
|
+
onSelect: (asset: OwnedAsset) => void;
|
|
17
|
+
/** Shown in the empty state when the wallet owns nothing yet. */
|
|
18
|
+
emptyStateHref?: string;
|
|
19
|
+
emptyStateLabel?: string;
|
|
20
|
+
className?: string;
|
|
21
|
+
}
|
|
22
|
+
declare function AssetPicker({ assets, isLoading, selected, onSelect, emptyStateHref, emptyStateLabel, className, }: AssetPickerProps): react_jsx_runtime.JSX.Element;
|
|
23
|
+
|
|
24
|
+
export { AssetPicker, type AssetPickerProps, type OwnedAsset };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from "react";
|
|
4
|
+
import Image from "next/image";
|
|
5
|
+
import { Check, ImageIcon, Search } from "lucide-react";
|
|
6
|
+
import { cn } from "../utils/cn.js";
|
|
7
|
+
const isSame = (a, b) => !!b && a.contractAddress === b.contractAddress && a.tokenId === b.tokenId;
|
|
8
|
+
function AssetPicker({
|
|
9
|
+
assets,
|
|
10
|
+
isLoading,
|
|
11
|
+
selected,
|
|
12
|
+
onSelect,
|
|
13
|
+
emptyStateHref,
|
|
14
|
+
emptyStateLabel,
|
|
15
|
+
className
|
|
16
|
+
}) {
|
|
17
|
+
const [query, setQuery] = useState("");
|
|
18
|
+
const filtered = query ? assets.filter((a) => a.name.toLowerCase().includes(query.toLowerCase())) : assets;
|
|
19
|
+
if (isLoading) {
|
|
20
|
+
return /* @__PURE__ */ jsx("div", { className: cn("grid grid-cols-3 sm:grid-cols-4 gap-2.5", className), children: Array.from({ length: 8 }).map((_, i) => /* @__PURE__ */ jsx("div", { className: "aspect-square rounded-xl bg-muted/60 animate-pulse" }, i)) });
|
|
21
|
+
}
|
|
22
|
+
if (assets.length === 0) {
|
|
23
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("rounded-xl border border-dashed border-border/60 p-6 text-center text-sm text-muted-foreground", className), children: [
|
|
24
|
+
"You don't own any assets yet.",
|
|
25
|
+
emptyStateHref ? /* @__PURE__ */ jsx("a", { href: emptyStateHref, className: "ml-1 font-semibold text-foreground underline underline-offset-2", children: emptyStateLabel ?? "Create one" }) : null
|
|
26
|
+
] });
|
|
27
|
+
}
|
|
28
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-3", className), children: [
|
|
29
|
+
assets.length > 8 ? /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
30
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none" }),
|
|
31
|
+
/* @__PURE__ */ jsx(
|
|
32
|
+
"input",
|
|
33
|
+
{
|
|
34
|
+
type: "text",
|
|
35
|
+
value: query,
|
|
36
|
+
onChange: (e) => setQuery(e.target.value),
|
|
37
|
+
placeholder: "Search your assets",
|
|
38
|
+
className: "w-full h-10 rounded-full border border-border bg-card pl-9 pr-4 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-brand-purple/40 focus:border-brand-purple/40"
|
|
39
|
+
}
|
|
40
|
+
)
|
|
41
|
+
] }) : null,
|
|
42
|
+
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 sm:grid-cols-4 gap-2.5 max-h-80 overflow-y-auto pr-0.5", children: filtered.map((asset) => {
|
|
43
|
+
const active = isSame(asset, selected);
|
|
44
|
+
return /* @__PURE__ */ jsxs(
|
|
45
|
+
"button",
|
|
46
|
+
{
|
|
47
|
+
type: "button",
|
|
48
|
+
onClick: () => onSelect(asset),
|
|
49
|
+
"aria-pressed": active,
|
|
50
|
+
className: cn(
|
|
51
|
+
"group relative aspect-square rounded-xl overflow-hidden border-2 transition-colors text-left",
|
|
52
|
+
active ? "border-brand-purple" : "border-border/50 active:border-border sm:hover:border-border"
|
|
53
|
+
),
|
|
54
|
+
children: [
|
|
55
|
+
asset.image ? /* @__PURE__ */ jsx(Image, { src: asset.image, alt: asset.name, fill: true, sizes: "120px", className: "object-cover" }) : /* @__PURE__ */ jsx("div", { className: "h-full w-full flex items-center justify-center bg-muted/60", children: /* @__PURE__ */ jsx(ImageIcon, { className: "h-5 w-5 text-muted-foreground/50" }) }),
|
|
56
|
+
/* @__PURE__ */ jsx("div", { className: "absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent px-1.5 py-1", children: /* @__PURE__ */ jsx("p", { className: "truncate text-[11px] font-medium text-white", children: asset.name }) }),
|
|
57
|
+
active ? /* @__PURE__ */ jsx("div", { className: "absolute top-1.5 right-1.5 h-5 w-5 rounded-full bg-brand-purple flex items-center justify-center", children: /* @__PURE__ */ jsx(Check, { className: "h-3 w-3 text-white" }) }) : null
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
`${asset.contractAddress}-${asset.tokenId}`
|
|
61
|
+
);
|
|
62
|
+
}) }),
|
|
63
|
+
query && filtered.length === 0 ? /* @__PURE__ */ jsxs("p", { className: "text-xs text-muted-foreground text-center py-4", children: [
|
|
64
|
+
'No assets match "',
|
|
65
|
+
query,
|
|
66
|
+
'".'
|
|
67
|
+
] }) : null
|
|
68
|
+
] });
|
|
69
|
+
}
|
|
70
|
+
export {
|
|
71
|
+
AssetPicker
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=asset-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/asset-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport Image from \"next/image\";\nimport { Check, ImageIcon, Search } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\n\nexport interface OwnedAsset {\n contractAddress: string;\n tokenId: string;\n name: string;\n image: string | null;\n}\n\nexport interface AssetPickerProps {\n /** The caller's already-fetched, already-resolved asset list — this\n * component takes data, it doesn't fetch it. Plug in `useTokensByOwner`\n * (or an app's equivalent) and map to `OwnedAsset` at the call site. */\n assets: OwnedAsset[];\n isLoading: boolean;\n selected: OwnedAsset | null;\n onSelect: (asset: OwnedAsset) => void;\n /** Shown in the empty state when the wallet owns nothing yet. */\n emptyStateHref?: string;\n emptyStateLabel?: string;\n className?: string;\n}\n\nconst isSame = (a: OwnedAsset, b: OwnedAsset | null) =>\n !!b && a.contractAddress === b.contractAddress && a.tokenId === b.tokenId;\n\nexport function AssetPicker({\n assets, isLoading, selected, onSelect, emptyStateHref, emptyStateLabel, className,\n}: AssetPickerProps) {\n const [query, setQuery] = useState(\"\");\n const filtered = query\n ? assets.filter((a) => a.name.toLowerCase().includes(query.toLowerCase()))\n : assets;\n\n if (isLoading) {\n return (\n <div className={cn(\"grid grid-cols-3 sm:grid-cols-4 gap-2.5\", className)}>\n {Array.from({ length: 8 }).map((_, i) => (\n <div key={i} className=\"aspect-square rounded-xl bg-muted/60 animate-pulse\" />\n ))}\n </div>\n );\n }\n\n if (assets.length === 0) {\n return (\n <div className={cn(\"rounded-xl border border-dashed border-border/60 p-6 text-center text-sm text-muted-foreground\", className)}>\n You don't own any assets yet.\n {emptyStateHref ? (\n <a href={emptyStateHref} className=\"ml-1 font-semibold text-foreground underline underline-offset-2\">\n {emptyStateLabel ?? \"Create one\"}\n </a>\n ) : null}\n </div>\n );\n }\n\n return (\n <div className={cn(\"space-y-3\", className)}>\n {assets.length > 8 ? (\n <div className=\"relative\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none\" />\n <input\n type=\"text\"\n value={query}\n onChange={(e) => setQuery(e.target.value)}\n placeholder=\"Search your assets\"\n className=\"w-full h-10 rounded-full border border-border bg-card pl-9 pr-4 text-sm placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-brand-purple/40 focus:border-brand-purple/40\"\n />\n </div>\n ) : null}\n\n <div className=\"grid grid-cols-3 sm:grid-cols-4 gap-2.5 max-h-80 overflow-y-auto pr-0.5\">\n {filtered.map((asset) => {\n const active = isSame(asset, selected);\n return (\n <button\n key={`${asset.contractAddress}-${asset.tokenId}`}\n type=\"button\"\n onClick={() => onSelect(asset)}\n aria-pressed={active}\n className={cn(\n \"group relative aspect-square rounded-xl overflow-hidden border-2 transition-colors text-left\",\n active ? \"border-brand-purple\" : \"border-border/50 active:border-border sm:hover:border-border\",\n )}\n >\n {asset.image ? (\n <Image src={asset.image} alt={asset.name} fill sizes=\"120px\" className=\"object-cover\" />\n ) : (\n <div className=\"h-full w-full flex items-center justify-center bg-muted/60\">\n <ImageIcon className=\"h-5 w-5 text-muted-foreground/50\" />\n </div>\n )}\n <div className=\"absolute inset-x-0 bottom-0 bg-gradient-to-t from-black/70 to-transparent px-1.5 py-1\">\n <p className=\"truncate text-[11px] font-medium text-white\">{asset.name}</p>\n </div>\n {active ? (\n <div className=\"absolute top-1.5 right-1.5 h-5 w-5 rounded-full bg-brand-purple flex items-center justify-center\">\n <Check className=\"h-3 w-3 text-white\" />\n </div>\n ) : null}\n </button>\n );\n })}\n </div>\n\n {query && filtered.length === 0 ? (\n <p className=\"text-xs text-muted-foreground text-center py-4\">No assets match "{query}".</p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";AA2CU,cAQJ,YARI;AAzCV,SAAS,gBAAgB;AACzB,OAAO,WAAW;AAClB,SAAS,OAAO,WAAW,cAAc;AACzC,SAAS,UAAU;AAuBnB,MAAM,SAAS,CAAC,GAAe,MAC7B,CAAC,CAAC,KAAK,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,YAAY,EAAE;AAE7D,SAAS,YAAY;AAAA,EAC1B;AAAA,EAAQ;AAAA,EAAW;AAAA,EAAU;AAAA,EAAU;AAAA,EAAgB;AAAA,EAAiB;AAC1E,GAAqB;AACnB,QAAM,CAAC,OAAO,QAAQ,IAAI,SAAS,EAAE;AACrC,QAAM,WAAW,QACb,OAAO,OAAO,CAAC,MAAM,EAAE,KAAK,YAAY,EAAE,SAAS,MAAM,YAAY,CAAC,CAAC,IACvE;AAEJ,MAAI,WAAW;AACb,WACE,oBAAC,SAAI,WAAW,GAAG,2CAA2C,SAAS,GACpE,gBAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MACjC,oBAAC,SAAY,WAAU,wDAAb,CAAkE,CAC7E,GACH;AAAA,EAEJ;AAEA,MAAI,OAAO,WAAW,GAAG;AACvB,WACE,qBAAC,SAAI,WAAW,GAAG,kGAAkG,SAAS,GAAG;AAAA;AAAA,MAE9H,iBACC,oBAAC,OAAE,MAAM,gBAAgB,WAAU,mEAChC,6BAAmB,cACtB,IACE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
|
|
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 license_terms_builder_exports = {};
|
|
21
|
+
__export(license_terms_builder_exports, {
|
|
22
|
+
EMPTY_SPONSORSHIP_TERMS: () => EMPTY_SPONSORSHIP_TERMS,
|
|
23
|
+
LicenseTermsBuilder: () => LicenseTermsBuilder
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(license_terms_builder_exports);
|
|
26
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
27
|
+
var import_cn = require("../utils/cn.js");
|
|
28
|
+
const EMPTY_SPONSORSHIP_TERMS = {
|
|
29
|
+
amount: "",
|
|
30
|
+
paymentTokenSymbol: "",
|
|
31
|
+
durationDays: "30",
|
|
32
|
+
transferable: true,
|
|
33
|
+
royaltyPercent: "5",
|
|
34
|
+
licenseText: ""
|
|
35
|
+
};
|
|
36
|
+
const FIELD_LABEL = "text-xs font-semibold text-foreground";
|
|
37
|
+
const FIELD_HELP = "text-xs text-muted-foreground";
|
|
38
|
+
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";
|
|
39
|
+
function LicenseTermsBuilder({
|
|
40
|
+
value,
|
|
41
|
+
onChange,
|
|
42
|
+
tokenOptions,
|
|
43
|
+
amountLabel = "Amount",
|
|
44
|
+
disabled,
|
|
45
|
+
className
|
|
46
|
+
}) {
|
|
47
|
+
const set = (key, v) => onChange({ ...value, [key]: v });
|
|
48
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("space-y-4", className), children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-[1fr_auto] gap-2", children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
|
|
51
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: FIELD_LABEL, children: amountLabel }),
|
|
52
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
53
|
+
"input",
|
|
54
|
+
{
|
|
55
|
+
type: "number",
|
|
56
|
+
min: 0,
|
|
57
|
+
step: "0.01",
|
|
58
|
+
inputMode: "decimal",
|
|
59
|
+
disabled,
|
|
60
|
+
value: value.amount,
|
|
61
|
+
onChange: (e) => set("amount", e.target.value),
|
|
62
|
+
placeholder: "0.00",
|
|
63
|
+
className: INPUT_BASE
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: FIELD_LABEL, children: "Currency" }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
70
|
+
"select",
|
|
71
|
+
{
|
|
72
|
+
disabled,
|
|
73
|
+
value: value.paymentTokenSymbol,
|
|
74
|
+
onChange: (e) => set("paymentTokenSymbol", e.target.value),
|
|
75
|
+
className: (0, import_cn.cn)(INPUT_BASE, "w-24"),
|
|
76
|
+
children: [
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: "", disabled: true, children: "\u2014" }),
|
|
78
|
+
tokenOptions.map((symbol) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("option", { value: symbol, children: symbol }, symbol))
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
)
|
|
82
|
+
] })
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
|
|
85
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: FIELD_LABEL, children: "License length (days)" }),
|
|
86
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
87
|
+
"input",
|
|
88
|
+
{
|
|
89
|
+
type: "number",
|
|
90
|
+
min: 1,
|
|
91
|
+
disabled,
|
|
92
|
+
value: value.durationDays,
|
|
93
|
+
onChange: (e) => set("durationDays", e.target.value),
|
|
94
|
+
className: INPUT_BASE
|
|
95
|
+
}
|
|
96
|
+
),
|
|
97
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: FIELD_HELP, children: "Counted from the moment the deal is accepted, not from today." })
|
|
98
|
+
] }),
|
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
|
|
100
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: FIELD_LABEL, children: "Resale royalty (%)" }),
|
|
101
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
|
+
"input",
|
|
103
|
+
{
|
|
104
|
+
type: "number",
|
|
105
|
+
min: 0,
|
|
106
|
+
max: 100,
|
|
107
|
+
step: "0.1",
|
|
108
|
+
disabled,
|
|
109
|
+
value: value.royaltyPercent,
|
|
110
|
+
onChange: (e) => set("royaltyPercent", e.target.value),
|
|
111
|
+
className: INPUT_BASE
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: FIELD_HELP, children: "You get this share automatically if the license is ever resold." })
|
|
115
|
+
] }),
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("label", { className: "flex items-start gap-2.5 cursor-pointer select-none", children: [
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
118
|
+
"input",
|
|
119
|
+
{
|
|
120
|
+
type: "checkbox",
|
|
121
|
+
disabled,
|
|
122
|
+
checked: value.transferable,
|
|
123
|
+
onChange: (e) => set("transferable", e.target.checked),
|
|
124
|
+
className: "mt-0.5 h-4 w-4 rounded border-border text-brand-purple focus:ring-brand-purple/40"
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "text-sm", children: [
|
|
128
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-medium", children: "Sponsor can resell this license" }),
|
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: (0, import_cn.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." })
|
|
130
|
+
] })
|
|
131
|
+
] }),
|
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1.5", children: [
|
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", { className: FIELD_LABEL, children: "License terms" }),
|
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
135
|
+
"textarea",
|
|
136
|
+
{
|
|
137
|
+
disabled,
|
|
138
|
+
value: value.licenseText,
|
|
139
|
+
onChange: (e) => set("licenseText", e.target.value),
|
|
140
|
+
placeholder: "What can the sponsor do with this license? Usage rights, credit requirements, territory, anything else worth spelling out.",
|
|
141
|
+
rows: 4,
|
|
142
|
+
className: (0, import_cn.cn)(INPUT_BASE, "h-auto py-2.5 resize-y")
|
|
143
|
+
}
|
|
144
|
+
),
|
|
145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: FIELD_HELP, children: "Saved permanently and shown to anyone who holds the license." })
|
|
146
|
+
] })
|
|
147
|
+
] });
|
|
148
|
+
}
|
|
149
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
150
|
+
0 && (module.exports = {
|
|
151
|
+
EMPTY_SPONSORSHIP_TERMS,
|
|
152
|
+
LicenseTermsBuilder
|
|
153
|
+
});
|
|
154
|
+
//# sourceMappingURL=license-terms-builder.cjs.map
|
|
@@ -0,0 +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":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAyDQ;AAvDR,gBAAmB;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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/**
|
|
4
|
+
* The deal terms a sponsorship offer/proposal needs, in plain-language shape
|
|
5
|
+
* — no bps, no IPFS, no ByteArray. `royaltyPercent` is a plain 0–100 number
|
|
6
|
+
* (multiply by 100 for the contract's basis-points argument); `licenseText`
|
|
7
|
+
* is the terms document's raw content — the caller pins it to IPFS (via
|
|
8
|
+
* their own existing upload helper) and passes the resulting `ipfs://` URI
|
|
9
|
+
* to the SDK call. This component only collects and validates the data, it
|
|
10
|
+
* never fetches or uploads anything itself.
|
|
11
|
+
*/
|
|
12
|
+
interface SponsorshipTerms {
|
|
13
|
+
amount: string;
|
|
14
|
+
paymentTokenSymbol: string;
|
|
15
|
+
durationDays: string;
|
|
16
|
+
transferable: boolean;
|
|
17
|
+
royaltyPercent: string;
|
|
18
|
+
licenseText: string;
|
|
19
|
+
}
|
|
20
|
+
declare const EMPTY_SPONSORSHIP_TERMS: SponsorshipTerms;
|
|
21
|
+
interface LicenseTermsBuilderProps {
|
|
22
|
+
value: SponsorshipTerms;
|
|
23
|
+
onChange: (next: SponsorshipTerms) => void;
|
|
24
|
+
/** Payment token symbols to offer — e.g. from SUPPORTED_TOKENS. */
|
|
25
|
+
tokenOptions: string[];
|
|
26
|
+
/** Copy override for the amount field — "Minimum bid" for an owner's
|
|
27
|
+
* offer, "Amount you'll pay" for a sponsor's proposal. Default: "Amount". */
|
|
28
|
+
amountLabel?: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
declare function LicenseTermsBuilder({ value, onChange, tokenOptions, amountLabel, disabled, className, }: LicenseTermsBuilderProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
export { EMPTY_SPONSORSHIP_TERMS, LicenseTermsBuilder, type LicenseTermsBuilderProps, type SponsorshipTerms };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The deal terms a sponsorship offer/proposal needs, in plain-language shape
|
|
5
|
+
* — no bps, no IPFS, no ByteArray. `royaltyPercent` is a plain 0–100 number
|
|
6
|
+
* (multiply by 100 for the contract's basis-points argument); `licenseText`
|
|
7
|
+
* is the terms document's raw content — the caller pins it to IPFS (via
|
|
8
|
+
* their own existing upload helper) and passes the resulting `ipfs://` URI
|
|
9
|
+
* to the SDK call. This component only collects and validates the data, it
|
|
10
|
+
* never fetches or uploads anything itself.
|
|
11
|
+
*/
|
|
12
|
+
interface SponsorshipTerms {
|
|
13
|
+
amount: string;
|
|
14
|
+
paymentTokenSymbol: string;
|
|
15
|
+
durationDays: string;
|
|
16
|
+
transferable: boolean;
|
|
17
|
+
royaltyPercent: string;
|
|
18
|
+
licenseText: string;
|
|
19
|
+
}
|
|
20
|
+
declare const EMPTY_SPONSORSHIP_TERMS: SponsorshipTerms;
|
|
21
|
+
interface LicenseTermsBuilderProps {
|
|
22
|
+
value: SponsorshipTerms;
|
|
23
|
+
onChange: (next: SponsorshipTerms) => void;
|
|
24
|
+
/** Payment token symbols to offer — e.g. from SUPPORTED_TOKENS. */
|
|
25
|
+
tokenOptions: string[];
|
|
26
|
+
/** Copy override for the amount field — "Minimum bid" for an owner's
|
|
27
|
+
* offer, "Amount you'll pay" for a sponsor's proposal. Default: "Amount". */
|
|
28
|
+
amountLabel?: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
declare function LicenseTermsBuilder({ value, onChange, tokenOptions, amountLabel, disabled, className, }: LicenseTermsBuilderProps): react_jsx_runtime.JSX.Element;
|
|
33
|
+
|
|
34
|
+
export { EMPTY_SPONSORSHIP_TERMS, LicenseTermsBuilder, type LicenseTermsBuilderProps, type SponsorshipTerms };
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../utils/cn.js";
|
|
4
|
+
const EMPTY_SPONSORSHIP_TERMS = {
|
|
5
|
+
amount: "",
|
|
6
|
+
paymentTokenSymbol: "",
|
|
7
|
+
durationDays: "30",
|
|
8
|
+
transferable: true,
|
|
9
|
+
royaltyPercent: "5",
|
|
10
|
+
licenseText: ""
|
|
11
|
+
};
|
|
12
|
+
const FIELD_LABEL = "text-xs font-semibold text-foreground";
|
|
13
|
+
const FIELD_HELP = "text-xs text-muted-foreground";
|
|
14
|
+
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";
|
|
15
|
+
function LicenseTermsBuilder({
|
|
16
|
+
value,
|
|
17
|
+
onChange,
|
|
18
|
+
tokenOptions,
|
|
19
|
+
amountLabel = "Amount",
|
|
20
|
+
disabled,
|
|
21
|
+
className
|
|
22
|
+
}) {
|
|
23
|
+
const set = (key, v) => onChange({ ...value, [key]: v });
|
|
24
|
+
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
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
61
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "License length (days)" }),
|
|
62
|
+
/* @__PURE__ */ jsx(
|
|
63
|
+
"input",
|
|
64
|
+
{
|
|
65
|
+
type: "number",
|
|
66
|
+
min: 1,
|
|
67
|
+
disabled,
|
|
68
|
+
value: value.durationDays,
|
|
69
|
+
onChange: (e) => set("durationDays", e.target.value),
|
|
70
|
+
className: INPUT_BASE
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ jsx("p", { className: FIELD_HELP, children: "Counted from the moment the deal is accepted, not from today." })
|
|
74
|
+
] }),
|
|
75
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
76
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "Resale royalty (%)" }),
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
"input",
|
|
79
|
+
{
|
|
80
|
+
type: "number",
|
|
81
|
+
min: 0,
|
|
82
|
+
max: 100,
|
|
83
|
+
step: "0.1",
|
|
84
|
+
disabled,
|
|
85
|
+
value: value.royaltyPercent,
|
|
86
|
+
onChange: (e) => set("royaltyPercent", e.target.value),
|
|
87
|
+
className: INPUT_BASE
|
|
88
|
+
}
|
|
89
|
+
),
|
|
90
|
+
/* @__PURE__ */ jsx("p", { className: FIELD_HELP, children: "You get this share automatically if the license is ever resold." })
|
|
91
|
+
] }),
|
|
92
|
+
/* @__PURE__ */ jsxs("label", { className: "flex items-start gap-2.5 cursor-pointer select-none", children: [
|
|
93
|
+
/* @__PURE__ */ jsx(
|
|
94
|
+
"input",
|
|
95
|
+
{
|
|
96
|
+
type: "checkbox",
|
|
97
|
+
disabled,
|
|
98
|
+
checked: value.transferable,
|
|
99
|
+
onChange: (e) => set("transferable", e.target.checked),
|
|
100
|
+
className: "mt-0.5 h-4 w-4 rounded border-border text-brand-purple focus:ring-brand-purple/40"
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ jsxs("span", { className: "text-sm", children: [
|
|
104
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", children: "Sponsor can resell this license" }),
|
|
105
|
+
/* @__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
|
+
] })
|
|
107
|
+
] }),
|
|
108
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-1.5", children: [
|
|
109
|
+
/* @__PURE__ */ jsx("label", { className: FIELD_LABEL, children: "License terms" }),
|
|
110
|
+
/* @__PURE__ */ jsx(
|
|
111
|
+
"textarea",
|
|
112
|
+
{
|
|
113
|
+
disabled,
|
|
114
|
+
value: value.licenseText,
|
|
115
|
+
onChange: (e) => set("licenseText", e.target.value),
|
|
116
|
+
placeholder: "What can the sponsor do with this license? Usage rights, credit requirements, territory, anything else worth spelling out.",
|
|
117
|
+
rows: 4,
|
|
118
|
+
className: cn(INPUT_BASE, "h-auto py-2.5 resize-y")
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ jsx("p", { className: FIELD_HELP, children: "Saved permanently and shown to anyone who holds the license." })
|
|
122
|
+
] })
|
|
123
|
+
] });
|
|
124
|
+
}
|
|
125
|
+
export {
|
|
126
|
+
EMPTY_SPONSORSHIP_TERMS,
|
|
127
|
+
LicenseTermsBuilder
|
|
128
|
+
};
|
|
129
|
+
//# sourceMappingURL=license-terms-builder.js.map
|
|
@@ -0,0 +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,MAA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,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":[]}
|
package/dist/index.cjs
CHANGED
|
@@ -39,6 +39,7 @@ __export(index_exports, {
|
|
|
39
39
|
AssetMediaColumn: () => import_asset_top_sections.AssetMediaColumn,
|
|
40
40
|
AssetOverviewContent: () => import_asset_overview_content.AssetOverviewContent,
|
|
41
41
|
AssetOwnerRow: () => import_asset_top_sections.AssetOwnerRow,
|
|
42
|
+
AssetPicker: () => import_asset_picker.AssetPicker,
|
|
42
43
|
AssetUtilityIcons: () => import_asset_utility_icons.AssetUtilityIcons,
|
|
43
44
|
BRAND: () => import_brand.BRAND,
|
|
44
45
|
BadgeShelf: () => import_badge_shelf.BadgeShelf,
|
|
@@ -63,6 +64,7 @@ __export(index_exports, {
|
|
|
63
64
|
DiscoverHero: () => import_discover_hero.DiscoverHero,
|
|
64
65
|
EASE_OUT: () => import_motion_primitives.EASE_OUT,
|
|
65
66
|
EMBED_PLATFORM_META: () => import_ip_templates.EMBED_PLATFORM_META,
|
|
67
|
+
EMPTY_SPONSORSHIP_TERMS: () => import_license_terms_builder.EMPTY_SPONSORSHIP_TERMS,
|
|
66
68
|
FadeIn: () => import_motion_primitives.FadeIn,
|
|
67
69
|
FeaturedCarousel: () => import_featured_carousel.FeaturedCarousel,
|
|
68
70
|
FeaturedCarouselSkeleton: () => import_featured_carousel.FeaturedCarouselSkeleton,
|
|
@@ -90,6 +92,7 @@ __export(index_exports, {
|
|
|
90
92
|
LeaderboardWidget: () => import_leaderboard_table.LeaderboardWidget,
|
|
91
93
|
LevelBadge: () => import_level_badge.LevelBadge,
|
|
92
94
|
LevelLadder: () => import_level_ladder.LevelLadder,
|
|
95
|
+
LicenseTermsBuilder: () => import_license_terms_builder.LicenseTermsBuilder,
|
|
93
96
|
ListingCard: () => import_listing_card.ListingCard,
|
|
94
97
|
ListingCardSkeleton: () => import_listing_card.ListingCardSkeleton,
|
|
95
98
|
LoadMoreSentinel: () => import_load_more_sentinel.LoadMoreSentinel,
|
|
@@ -173,6 +176,8 @@ var import_share_button = require("./components/share-button.js");
|
|
|
173
176
|
var import_collection_card = require("./components/collection-card.js");
|
|
174
177
|
var import_token_card = require("./components/token-card.js");
|
|
175
178
|
var import_asset_card = require("./components/asset-card.js");
|
|
179
|
+
var import_asset_picker = require("./components/asset-picker.js");
|
|
180
|
+
var import_license_terms_builder = require("./components/license-terms-builder.js");
|
|
176
181
|
var import_coins = require("./data/coins.js");
|
|
177
182
|
var import_coin_card = require("./components/coin-card.js");
|
|
178
183
|
var import_coins_explorer = require("./components/coins-explorer.js");
|
|
@@ -242,6 +247,7 @@ var import_action_dialog = require("./components/action-dialog.js");
|
|
|
242
247
|
AssetMediaColumn,
|
|
243
248
|
AssetOverviewContent,
|
|
244
249
|
AssetOwnerRow,
|
|
250
|
+
AssetPicker,
|
|
245
251
|
AssetUtilityIcons,
|
|
246
252
|
BRAND,
|
|
247
253
|
BadgeShelf,
|
|
@@ -266,6 +272,7 @@ var import_action_dialog = require("./components/action-dialog.js");
|
|
|
266
272
|
DiscoverHero,
|
|
267
273
|
EASE_OUT,
|
|
268
274
|
EMBED_PLATFORM_META,
|
|
275
|
+
EMPTY_SPONSORSHIP_TERMS,
|
|
269
276
|
FadeIn,
|
|
270
277
|
FeaturedCarousel,
|
|
271
278
|
FeaturedCarouselSkeleton,
|
|
@@ -293,6 +300,7 @@ var import_action_dialog = require("./components/action-dialog.js");
|
|
|
293
300
|
LeaderboardWidget,
|
|
294
301
|
LevelBadge,
|
|
295
302
|
LevelLadder,
|
|
303
|
+
LicenseTermsBuilder,
|
|
296
304
|
ListingCard,
|
|
297
305
|
ListingCardSkeleton,
|
|
298
306
|
LoadMoreSentinel,
|
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, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.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\";\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;A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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, RarityTier } from \"./components/token-card.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 { 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\";\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.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vD,wBAA6C;AAE7C,wBAA6C;AAE7C,0BAA4B;AAE5B,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;AAIxC,2BAA6B;AAG7B,iCAAkC;AAElC,uCAAwC;AAExC,yBAAwC;AAGxC,uBAAmC;AAGnC,2BAA6B;","names":["import_launchpad_services"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -27,6 +27,8 @@ export { ShareButton, ShareButtonProps } from './components/share-button.cjs';
|
|
|
27
27
|
export { CollectionCard, CollectionCardProps, CollectionCardSkeleton } from './components/collection-card.cjs';
|
|
28
28
|
export { RarityTier, TokenCard, TokenCardProps, TokenCardSkeleton } from './components/token-card.cjs';
|
|
29
29
|
export { AssetCard, AssetCardPrice, AssetCardProps, AssetCardSkeleton } from './components/asset-card.cjs';
|
|
30
|
+
export { AssetPicker, AssetPickerProps, OwnedAsset } from './components/asset-picker.cjs';
|
|
31
|
+
export { EMPTY_SPONSORSHIP_TERMS, LicenseTermsBuilder, LicenseTermsBuilderProps, SponsorshipTerms } from './components/license-terms-builder.cjs';
|
|
30
32
|
export { CoinCollectionLike, CoinKind, CoinPriceLike, coinKind, formatCoinPrice, formatFdv } from './data/coins.cjs';
|
|
31
33
|
export { CoinCard, CoinCardSkeleton, CoinRow, CoinTileProps, UseCoinPrice } from './components/coin-card.cjs';
|
|
32
34
|
export { CoinFilter, CoinSort, CoinsExplorer, CoinsExplorerProps, UseCoins } from './components/coins-explorer.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export { ShareButton, ShareButtonProps } from './components/share-button.js';
|
|
|
27
27
|
export { CollectionCard, CollectionCardProps, CollectionCardSkeleton } from './components/collection-card.js';
|
|
28
28
|
export { RarityTier, TokenCard, TokenCardProps, TokenCardSkeleton } from './components/token-card.js';
|
|
29
29
|
export { AssetCard, AssetCardPrice, AssetCardProps, AssetCardSkeleton } from './components/asset-card.js';
|
|
30
|
+
export { AssetPicker, AssetPickerProps, OwnedAsset } from './components/asset-picker.js';
|
|
31
|
+
export { EMPTY_SPONSORSHIP_TERMS, LicenseTermsBuilder, LicenseTermsBuilderProps, SponsorshipTerms } from './components/license-terms-builder.js';
|
|
30
32
|
export { CoinCollectionLike, CoinKind, CoinPriceLike, coinKind, formatCoinPrice, formatFdv } from './data/coins.js';
|
|
31
33
|
export { CoinCard, CoinCardSkeleton, CoinRow, CoinTileProps, UseCoinPrice } from './components/coin-card.js';
|
|
32
34
|
export { CoinFilter, CoinSort, CoinsExplorer, CoinsExplorerProps, UseCoins } from './components/coins-explorer.js';
|
package/dist/index.js
CHANGED
|
@@ -40,6 +40,8 @@ import { ShareButton } from "./components/share-button.js";
|
|
|
40
40
|
import { CollectionCard, CollectionCardSkeleton } from "./components/collection-card.js";
|
|
41
41
|
import { TokenCard, TokenCardSkeleton } from "./components/token-card.js";
|
|
42
42
|
import { AssetCard, AssetCardSkeleton } from "./components/asset-card.js";
|
|
43
|
+
import { AssetPicker } from "./components/asset-picker.js";
|
|
44
|
+
import { LicenseTermsBuilder, EMPTY_SPONSORSHIP_TERMS } from "./components/license-terms-builder.js";
|
|
43
45
|
import {
|
|
44
46
|
coinKind,
|
|
45
47
|
formatCoinPrice,
|
|
@@ -119,6 +121,7 @@ export {
|
|
|
119
121
|
AssetMediaColumn,
|
|
120
122
|
AssetOverviewContent,
|
|
121
123
|
AssetOwnerRow,
|
|
124
|
+
AssetPicker,
|
|
122
125
|
AssetUtilityIcons,
|
|
123
126
|
BRAND,
|
|
124
127
|
BadgeShelf,
|
|
@@ -143,6 +146,7 @@ export {
|
|
|
143
146
|
DiscoverHero,
|
|
144
147
|
EASE_OUT,
|
|
145
148
|
EMBED_PLATFORM_META,
|
|
149
|
+
EMPTY_SPONSORSHIP_TERMS,
|
|
146
150
|
FadeIn,
|
|
147
151
|
FeaturedCarousel,
|
|
148
152
|
FeaturedCarouselSkeleton,
|
|
@@ -170,6 +174,7 @@ export {
|
|
|
170
174
|
LeaderboardWidget,
|
|
171
175
|
LevelBadge,
|
|
172
176
|
LevelLadder,
|
|
177
|
+
LicenseTermsBuilder,
|
|
173
178
|
ListingCard,
|
|
174
179
|
ListingCardSkeleton,
|
|
175
180
|
LoadMoreSentinel,
|
package/dist/index.js.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, RarityTier } from \"./components/token-card.js\";\nexport { AssetCard, AssetCardSkeleton } from \"./components/asset-card.js\";\nexport type { AssetCardProps, AssetCardPrice } from \"./components/asset-card.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\";\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":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAG/B,SAAS,cAAc,wBAAwB;AAE/C;AAAA,EACE;AAAA,EAAU;AAAA,EAAe;AAAA,EAAmB;AAAA,EAC5C;AAAA,EAAqB;AAAA,OAChB;AAEP;AAAA,EACE;AAAA,EAAc;AAAA,EAAqB;AAAA,EAAsB;AAAA,EAAsB;AAAA,OAC1E;AAEP,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC,SAAS,kBAAkB,kBAAkB,eAAe,yBAAyB;AAErF,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,aAAa;AAGtB,SAAS,cAAc,sBAAsB;AAG7C,SAAS,aAAa,gBAAgB,mBAAmB;AAGzD,SAAS,sBAAsB;AAG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BAAsB;AAI/B,SAAS,wBAAwB;AAIjC,SAAS,+BAA+B;AAIxC,SAAS,oBAAoB;AAG7B,SAAS,yBAAyB;AAElC,SAAS,+BAA+B;AAExC,SAAS,YAAY,mBAAmB;AAGxC,SAAS,UAAU,gBAAgB;AAGnC,SAAS,oBAAoB;","names":[]}
|
|
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, RarityTier } from \"./components/token-card.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 { 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\";\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":"AACA,SAAS,UAAU;AACnB,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,sBAAsB;AAC/B,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAG/B,SAAS,cAAc,wBAAwB;AAE/C;AAAA,EACE;AAAA,EAAU;AAAA,EAAe;AAAA,EAAmB;AAAA,EAC5C;AAAA,EAAqB;AAAA,OAChB;AAEP;AAAA,EACE;AAAA,EAAc;AAAA,EAAqB;AAAA,EAAsB;AAAA,EAAsB;AAAA,OAC1E;AAEP,SAAS,qBAAqB;AAC9B,SAAS,4BAA4B;AACrC,SAAS,2BAA2B;AACpC,SAAS,uBAAuB;AAChC,SAAS,+BAA+B;AAExC,SAAS,kBAAkB,kBAAkB,eAAe,yBAAyB;AAErF,SAAS,0BAA0B;AAEnC,SAAS,yBAAyB;AAElC,SAAS,6BAA6B;AAEtC,SAAS,aAAa;AAGtB,SAAS,cAAc,sBAAsB;AAG7C,SAAS,aAAa,gBAAgB,mBAAmB;AAGzD,SAAS,sBAAsB;AAG/B,SAAS,yBAAyB;AAIlC,SAAS,YAAY,QAAQ,SAAS,aAAa,cAAc,QAAQ,gBAAgB;AACzF,SAAS,qBAAqB;AAE9B,SAAS,qBAAqB;AAE9B,SAAS,mBAAmB;AAE5B,SAAS,gBAAgB,8BAA8B;AAEvD,SAAS,WAAW,yBAAyB;AAE7C,SAAS,WAAW,yBAAyB;AAE7C,SAAS,mBAAmB;AAE5B,SAAS,qBAAqB,+BAA+B;AAG7D;AAAA,EACE;AAAA,EAAU;AAAA,EAAiB;AAAA,OAEtB;AACP,SAAS,UAA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