@medialane/ui 0.375.0 → 0.377.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/components/account/input-otp.d.cts +2 -2
  2. package/dist/components/account/input-otp.d.ts +2 -2
  3. package/dist/components/action-button.cjs +9 -7
  4. package/dist/components/action-button.cjs.map +1 -1
  5. package/dist/components/action-button.d.cts +8 -4
  6. package/dist/components/action-button.d.ts +8 -4
  7. package/dist/components/action-button.js +10 -8
  8. package/dist/components/action-button.js.map +1 -1
  9. package/dist/components/alert.d.cts +1 -1
  10. package/dist/components/alert.d.ts +1 -1
  11. package/dist/components/archived-asset-notice.cjs +2 -1
  12. package/dist/components/archived-asset-notice.cjs.map +1 -1
  13. package/dist/components/archived-asset-notice.js +2 -1
  14. package/dist/components/archived-asset-notice.js.map +1 -1
  15. package/dist/components/asset-access-cards.cjs +2 -1
  16. package/dist/components/asset-access-cards.cjs.map +1 -1
  17. package/dist/components/asset-access-cards.js +2 -1
  18. package/dist/components/asset-access-cards.js.map +1 -1
  19. package/dist/components/asset-collection-bar.cjs +3 -2
  20. package/dist/components/asset-collection-bar.cjs.map +1 -1
  21. package/dist/components/asset-collection-bar.js +3 -2
  22. package/dist/components/asset-collection-bar.js.map +1 -1
  23. package/dist/components/asset-license-summary.cjs +4 -10
  24. package/dist/components/asset-license-summary.cjs.map +1 -1
  25. package/dist/components/asset-license-summary.js +4 -10
  26. package/dist/components/asset-license-summary.js.map +1 -1
  27. package/dist/components/asset-marketplace-panel.cjs +7 -17
  28. package/dist/components/asset-marketplace-panel.cjs.map +1 -1
  29. package/dist/components/asset-marketplace-panel.js +7 -17
  30. package/dist/components/asset-marketplace-panel.js.map +1 -1
  31. package/dist/components/asset-markets-tab.cjs +6 -23
  32. package/dist/components/asset-markets-tab.cjs.map +1 -1
  33. package/dist/components/asset-markets-tab.js +6 -23
  34. package/dist/components/asset-markets-tab.js.map +1 -1
  35. package/dist/components/asset-overview-content.cjs +27 -36
  36. package/dist/components/asset-overview-content.cjs.map +1 -1
  37. package/dist/components/asset-overview-content.js +27 -36
  38. package/dist/components/asset-overview-content.js.map +1 -1
  39. package/dist/components/asset-owners-panel.cjs +2 -1
  40. package/dist/components/asset-owners-panel.cjs.map +1 -1
  41. package/dist/components/asset-owners-panel.js +2 -1
  42. package/dist/components/asset-owners-panel.js.map +1 -1
  43. package/dist/components/asset-provenance-tab.cjs +15 -12
  44. package/dist/components/asset-provenance-tab.cjs.map +1 -1
  45. package/dist/components/asset-provenance-tab.js +15 -12
  46. package/dist/components/asset-provenance-tab.js.map +1 -1
  47. package/dist/components/asset-publication.cjs +2 -1
  48. package/dist/components/asset-publication.cjs.map +1 -1
  49. package/dist/components/asset-publication.js +2 -1
  50. package/dist/components/asset-publication.js.map +1 -1
  51. package/dist/components/asset-type-panels.cjs +4 -5
  52. package/dist/components/asset-type-panels.cjs.map +1 -1
  53. package/dist/components/asset-type-panels.js +4 -5
  54. package/dist/components/asset-type-panels.js.map +1 -1
  55. package/dist/components/badge.d.cts +1 -1
  56. package/dist/components/badge.d.ts +1 -1
  57. package/dist/components/button.d.cts +2 -2
  58. package/dist/components/button.d.ts +2 -2
  59. package/dist/components/hidden-content-banner.cjs +4 -3
  60. package/dist/components/hidden-content-banner.cjs.map +1 -1
  61. package/dist/components/hidden-content-banner.js +4 -3
  62. package/dist/components/hidden-content-banner.js.map +1 -1
  63. package/dist/components/ip-type-badge.cjs +2 -3
  64. package/dist/components/ip-type-badge.cjs.map +1 -1
  65. package/dist/components/ip-type-badge.js +2 -3
  66. package/dist/components/ip-type-badge.js.map +1 -1
  67. package/dist/components/ip-type-display.cjs +5 -2
  68. package/dist/components/ip-type-display.cjs.map +1 -1
  69. package/dist/components/ip-type-display.js +5 -2
  70. package/dist/components/ip-type-display.js.map +1 -1
  71. package/dist/components/launchpad/edition-mint-schema.d.cts +2 -2
  72. package/dist/components/launchpad/edition-mint-schema.d.ts +2 -2
  73. package/dist/components/panel.cjs +81 -0
  74. package/dist/components/panel.cjs.map +1 -0
  75. package/dist/components/panel.d.cts +22 -0
  76. package/dist/components/panel.d.ts +22 -0
  77. package/dist/components/panel.js +44 -0
  78. package/dist/components/panel.js.map +1 -0
  79. package/dist/components/sheet.d.cts +1 -1
  80. package/dist/components/sheet.d.ts +1 -1
  81. package/dist/components/soulbound-card.cjs +2 -1
  82. package/dist/components/soulbound-card.cjs.map +1 -1
  83. package/dist/components/soulbound-card.js +2 -1
  84. package/dist/components/soulbound-card.js.map +1 -1
  85. package/dist/data/brand.cjs +37 -25
  86. package/dist/data/brand.cjs.map +1 -1
  87. package/dist/data/brand.d.cts +31 -14
  88. package/dist/data/brand.d.ts +31 -14
  89. package/dist/data/brand.js +33 -24
  90. package/dist/data/brand.js.map +1 -1
  91. package/dist/data/ip-types.cjs +11 -9
  92. package/dist/data/ip-types.cjs.map +1 -1
  93. package/dist/data/ip-types.js +11 -9
  94. package/dist/data/ip-types.js.map +1 -1
  95. package/dist/index.cjs +9 -0
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.d.cts +1 -0
  98. package/dist/index.d.ts +1 -0
  99. package/dist/index.js +5 -0
  100. package/dist/index.js.map +1 -1
  101. package/package.json +1 -1
@@ -30,6 +30,7 @@ var import_markdown_text = require("./markdown-text.js");
30
30
  var import_license_summary = require("../utils/license-summary.js");
31
31
  var import_ip = require("../data/ip.js");
32
32
  var import_provider = require("../i18n/provider.js");
33
+ var import_panel = require("./panel.js");
33
34
  function licenseLabel(value) {
34
35
  const label = import_ip.LICENSE_TYPES.find((license) => license.value === value)?.label ?? value;
35
36
  return label.split(" \u2014 ")[1] ?? label;
@@ -75,16 +76,10 @@ function detailSpans(count) {
75
76
  return out.slice(0, count);
76
77
  }
77
78
  function Cell({ label, value, className }) {
78
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
79
- "div",
80
- {
81
- className: `flex flex-col justify-end gap-1.5 rounded-3xl bg-foreground/[0.06] ring-1 ring-border/40 px-5 py-4 min-h-[5.5rem] ${className ?? ""}`,
82
- children: [
83
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "truncate text-xs font-medium text-muted-foreground", title: label, children: label }),
84
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-lg font-semibold leading-tight tracking-tight text-foreground break-words", children: value })
85
- ]
86
- }
87
- );
79
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_panel.Panel, { className: `flex flex-col justify-end gap-1.5 px-5 py-4 min-h-[5.5rem] ${className ?? ""}`, children: [
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "truncate text-xs font-medium text-muted-foreground", title: label, children: label }),
81
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "text-lg font-semibold leading-tight tracking-tight text-foreground break-words", children: value })
82
+ ] });
88
83
  }
89
84
  function AssetOverviewContent({
90
85
  attributes,
@@ -106,14 +101,15 @@ function AssetOverviewContent({
106
101
  const hasLicenseData = !!(licenseType || commercialUse || derivatives || attribution);
107
102
  const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));
108
103
  const licenseDescription = import_ip.LICENSE_TYPES.find((license) => license.value === licenseType)?.description;
109
- const facts = [
110
- { icon: import_lucide_react.DollarSign, label: t("Commercial use"), value: commercialUse, tile: "bg-brand-orange/10 ring-brand-orange/20", pill: "bg-brand-orange/15 text-brand-orange", mark: "text-brand-orange" },
111
- { icon: import_lucide_react.GitBranch, label: t("Derivatives"), value: derivatives, tile: "bg-brand-rose/10 ring-brand-rose/20", pill: "bg-brand-rose/15 text-brand-rose", mark: "text-brand-rose" },
112
- { icon: import_lucide_react.UserCheck, label: t("Attribution"), value: attribution, tile: "bg-foreground/5 ring-border/60", pill: "bg-foreground/10 text-muted-foreground", mark: "text-foreground" },
113
- { icon: import_lucide_react.Globe, label: t("Territory"), value: territory, tile: "bg-brand-blue/10 ring-brand-blue/20", pill: "bg-brand-blue/15 text-brand-blue", mark: "text-brand-blue" },
114
- { icon: import_lucide_react.Bot, label: t("AI & data mining"), value: aiPolicy, tile: "bg-brand-purple/10 ring-brand-purple/20", pill: "bg-brand-purple/15 text-brand-purple", mark: "text-brand-purple" },
115
- { icon: import_lucide_react.Percent, label: t("Royalty"), value: royalty, tile: "bg-brand-orange/10 ring-brand-orange/20", pill: "bg-brand-orange/15 text-brand-orange", mark: "text-brand-orange" }
116
- ].filter((row) => !!row.value);
104
+ const factRows = [
105
+ { icon: import_lucide_react.DollarSign, label: t("Commercial use"), value: commercialUse, tone: ["orange", "rose"] },
106
+ { icon: import_lucide_react.GitBranch, label: t("Derivatives"), value: derivatives, tone: ["rose", "maeve"] },
107
+ { icon: import_lucide_react.UserCheck, label: t("Attribution"), value: attribution, tone: ["maeve", "purple"] },
108
+ { icon: import_lucide_react.Globe, label: t("Territory"), value: territory, tone: ["blue", "purple"] },
109
+ { icon: import_lucide_react.Bot, label: t("AI & data mining"), value: aiPolicy, tone: ["purple", "rose"] },
110
+ { icon: import_lucide_react.Percent, label: t("Royalty"), value: royalty, tone: ["orange", "maeve"] }
111
+ ];
112
+ const facts = factRows.filter((row) => !!row.value);
117
113
  const factSpans2 = fillSpans(facts.map(() => 1), 2);
118
114
  const factSpansLg = bentoSpans(facts.length);
119
115
  const detailUnits = displayAttributes.map((attribute) => isAddressLike(attribute.value) ? 2 : 1);
@@ -132,34 +128,29 @@ function AssetOverviewContent({
132
128
  hasLicenseData ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("section", { className: "space-y-3", children: [
133
129
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: "text-sm font-semibold text-muted-foreground", children: t("Rights") }),
134
130
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 lg:grid-cols-6 gap-3", children: [
135
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative col-span-2 lg:col-span-3 flex min-h-[15rem] flex-col justify-end overflow-hidden rounded-[2rem] bg-gradient-to-br from-brand-purple/15 via-brand-blue/10 to-transparent p-6 text-foreground ring-1 ring-brand-blue/20 backdrop-blur-sm sm:p-8", children: [
136
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": true, className: "pointer-events-none absolute -right-16 -top-16 h-64 w-64 rounded-full ring-[28px] ring-brand-blue/10" }),
137
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { "aria-hidden": true, className: "pointer-events-none absolute right-10 top-12 h-20 w-20 rounded-full bg-brand-rose/25 blur-xl" }),
138
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative space-y-3", children: [
139
- licenseType ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-3xl sm:text-4xl font-semibold tracking-tight leading-[1.05]", children: licenseLabel(licenseType) }) : null,
140
- licenseDescription ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "max-w-md text-sm text-muted-foreground", children: licenseDescription }) : null,
141
- summary ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "inline-block rounded-full bg-foreground/5 px-4 py-2 text-sm font-medium leading-snug text-muted-foreground ring-1 ring-border/60", children: summary }) : null
142
- ] })
131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_panel.Panel, { tone: ["purple", "blue"], className: "col-span-2 lg:col-span-3 flex min-h-[15rem] flex-col justify-end gap-3 p-6 sm:p-8", children: [
132
+ licenseType ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-3xl sm:text-4xl font-semibold tracking-tight leading-[1.05] text-foreground", children: licenseLabel(licenseType) }) : null,
133
+ licenseDescription ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "max-w-md text-sm text-muted-foreground", children: licenseDescription }) : null,
134
+ summary ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-base font-semibold leading-snug text-foreground", children: summary }) : null
143
135
  ] }),
144
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "col-span-2 lg:col-span-3 grid grid-cols-2 lg:grid-cols-3 gap-3 auto-rows-[minmax(8.5rem,1fr)]", children: facts.map(({ icon: Icon, label, value, tile, pill, mark }, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
145
- "div",
136
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "col-span-2 lg:col-span-3 grid grid-cols-2 lg:grid-cols-3 gap-3 auto-rows-[minmax(8.5rem,1fr)]", children: facts.map(({ icon: Icon, label, value, tone }, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
137
+ import_panel.Panel,
146
138
  {
147
- className: `relative flex flex-col justify-between gap-4 overflow-hidden rounded-[1.75rem] p-5 text-foreground ring-1 backdrop-blur-sm ${tile} ${SPAN_2[factSpans2[index]]} ${SPAN_LG_3[factSpansLg[index]]}`,
139
+ tone,
140
+ className: `flex flex-col justify-between gap-4 p-5 ${SPAN_2[factSpans2[index]]} ${SPAN_LG_3[factSpansLg[index]]}`,
148
141
  children: [
149
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { "aria-hidden": true, className: `pointer-events-none absolute -right-3 -top-3 h-20 w-20 opacity-10 ${mark}` }),
150
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `relative inline-flex w-fit items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium ${pill}`, children: [
142
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_panel.Pill, { color: tone[0], children: [
151
143
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-3.5 w-3.5" }),
152
144
  label
153
145
  ] }),
154
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "relative text-xl sm:text-2xl font-semibold leading-none tracking-tight break-words", children: value })
146
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xl sm:text-2xl font-semibold leading-none tracking-tight break-words text-foreground", children: value })
155
147
  ]
156
148
  },
157
149
  label
158
150
  )) }),
159
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative col-span-2 lg:col-span-6 flex items-center gap-4 overflow-hidden rounded-[2rem] bg-gradient-to-r from-brand-rose/10 to-brand-orange/10 p-5 ring-1 ring-brand-rose/20 backdrop-blur-sm sm:p-6", children: [
160
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Scale, { "aria-hidden": true, className: "pointer-events-none absolute -right-3 -top-4 h-24 w-24 -rotate-12 text-brand-rose/10" }),
161
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "relative flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-brand-rose/15 text-brand-rose", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Scale, { className: "h-5 w-5" }) }),
162
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "relative pr-16 text-sm leading-relaxed text-muted-foreground", children: t("Creative work is protected with international copyright law. The Berne Convention for the Protection of Literary and Artistic Works is the foundational international copyright treaty, ratified by 181 signatory countries.") })
151
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_panel.Panel, { tone: ["rose", "orange"], className: "col-span-2 lg:col-span-6 flex items-center gap-4 p-5 sm:p-6", children: [
152
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-background/40 text-brand-rose", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Scale, { className: "h-5 w-5" }) }),
153
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm leading-relaxed text-muted-foreground", children: t("Creative work is protected with international copyright law. The Berne Convention for the Protection of Literary and Artistic Works is the foundational international copyright treaty, ratified by 181 signatory countries.") })
163
154
  ] })
164
155
  ] })
165
156
  ] }) : null,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-overview-content.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Bot, DollarSign, ExternalLink, GitBranch, Globe, Percent, Scale, UserCheck } from \"lucide-react\";\nimport { IPTypeDisplay } from \"./ip-type-display.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { MarkdownText } from \"./markdown-text.js\";\nimport { licenseSummary } from \"../utils/license-summary.js\";\nimport { LICENSE_TYPES } from \"../data/ip.js\";\nimport { useT } from \"../i18n/provider.js\";\n\ninterface AssetAttribute {\n trait_type?: string;\n value?: string;\n}\n\ninterface AssetOverviewContentProps {\n attributes: AssetAttribute[];\n hasTemplateData: boolean;\n isDisplayAttr: (attribute: AssetAttribute) => boolean;\n content?: string | null;\n link?: string | null;\n}\n\nfunction licenseLabel(value: string): string {\n const label = LICENSE_TYPES.find((license) => license.value === value)?.label ?? value;\n return label.split(\" — \")[1] ?? label;\n}\n\nconst isAddressLike = (v?: unknown): boolean =>\n typeof v === \"string\" && /^0x[0-9a-fA-F]{16,}$/.test(v.trim());\n\nfunction fillSpans(units: number[], cols: number): number[] {\n const out = units.map((unit) => Math.min(unit, cols));\n const rest = out.reduce((sum, unit) => sum + unit, 0) % cols;\n if (rest && out.length) out[out.length - 1] += cols - rest;\n return out;\n}\n\nfunction bentoSpans(count: number): number[] {\n const out: number[] = [];\n const rows = [[2, 1], [1, 2]];\n for (let row = 0; out.length < count; row++) {\n const left = count - out.length;\n if (left === 1) out.push(3);\n else out.push(...rows[row % 2]);\n }\n return out;\n}\n\nconst SPAN_2: Record<number, string> = { 1: \"col-span-1\", 2: \"col-span-2\" };\nconst SPAN_SM_4: Record<number, string> = {\n 1: \"sm:col-span-1\",\n 2: \"sm:col-span-2\",\n 3: \"sm:col-span-3\",\n 4: \"sm:col-span-4\",\n};\nconst SPAN_LG_3: Record<number, string> = {\n 1: \"lg:col-span-1\",\n 2: \"lg:col-span-2\",\n 3: \"lg:col-span-3\",\n};\n\nfunction detailSpans(count: number): number[] {\n const out: number[] = [];\n while (out.length < count) {\n const left = count - out.length;\n if (left >= 5) out.push(1, 2, 1);\n else if (left === 4 || left === 2) out.push(...Array(left).fill(2));\n else if (left === 3) out.push(1, 2, 1);\n else out.push(4);\n }\n return out.slice(0, count);\n}\n\nfunction Cell({ label, value, className }: { label: string; value: ReactNode; className?: string }) {\n return (\n <div\n className={`flex flex-col justify-end gap-1.5 rounded-3xl bg-foreground/[0.06] ring-1 ring-border/40 px-5 py-4 min-h-[5.5rem] ${className ?? \"\"}`}\n >\n <p className=\"truncate text-xs font-medium text-muted-foreground\" title={label}>{label}</p>\n <div className=\"text-lg font-semibold leading-tight tracking-tight text-foreground break-words\">{value}</div>\n </div>\n );\n}\n\nexport function AssetOverviewContent({\n attributes,\n hasTemplateData,\n isDisplayAttr,\n content,\n link,\n}: AssetOverviewContentProps) {\n const t = useT();\n const attr = (trait: string) => attributes.find((attribute) => attribute.trait_type === trait)?.value;\n const licenseType = attr(\"License\");\n const commercialUse = attr(\"Commercial Use\");\n const derivatives = attr(\"Derivatives\");\n const attribution = attr(\"Attribution\");\n const territory = attr(\"Territory\");\n const aiPolicy = attr(\"AI Policy\");\n const royalty = attr(\"Royalty\");\n const summary = licenseSummary(attributes);\n const hasLicenseData = !!(licenseType || commercialUse || derivatives || attribution);\n const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));\n\n const licenseDescription = LICENSE_TYPES.find((license) => license.value === licenseType)?.description;\n\n const facts = [\n { icon: DollarSign, label: t(\"Commercial use\"), value: commercialUse, tile: \"bg-brand-orange/10 ring-brand-orange/20\", pill: \"bg-brand-orange/15 text-brand-orange\", mark: \"text-brand-orange\" },\n { icon: GitBranch, label: t(\"Derivatives\"), value: derivatives, tile: \"bg-brand-rose/10 ring-brand-rose/20\", pill: \"bg-brand-rose/15 text-brand-rose\", mark: \"text-brand-rose\" },\n { icon: UserCheck, label: t(\"Attribution\"), value: attribution, tile: \"bg-foreground/5 ring-border/60\", pill: \"bg-foreground/10 text-muted-foreground\", mark: \"text-foreground\" },\n { icon: Globe, label: t(\"Territory\"), value: territory, tile: \"bg-brand-blue/10 ring-brand-blue/20\", pill: \"bg-brand-blue/15 text-brand-blue\", mark: \"text-brand-blue\" },\n { icon: Bot, label: t(\"AI & data mining\"), value: aiPolicy, tile: \"bg-brand-purple/10 ring-brand-purple/20\", pill: \"bg-brand-purple/15 text-brand-purple\", mark: \"text-brand-purple\" },\n { icon: Percent, label: t(\"Royalty\"), value: royalty, tile: \"bg-brand-orange/10 ring-brand-orange/20\", pill: \"bg-brand-orange/15 text-brand-orange\", mark: \"text-brand-orange\" },\n ].filter((row) => !!row.value);\n\n const factSpans2 = fillSpans(facts.map(() => 1), 2);\n const factSpansLg = bentoSpans(facts.length);\n const detailUnits = displayAttributes.map((attribute) => (isAddressLike(attribute.value) ? 2 : 1));\n const detailSpans2 = fillSpans(detailUnits, 2);\n const detailSpansSm = detailSpans(displayAttributes.length).map((span, index) => Math.max(span, detailUnits[index]));\n\n return (\n <div className=\"mt-4 space-y-7\">\n {content ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Content\")}</h3>\n <MarkdownText text={content} />\n </section>\n ) : null}\n\n {link ? (\n <a href={link} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex items-center gap-1.5 text-sm text-primary hover:underline\">\n <ExternalLink className=\"h-3.5 w-3.5\" />\n {t(\"Open link\")}\n </a>\n ) : null}\n\n {hasTemplateData ? <IPTypeDisplay attributes={attributes} /> : null}\n\n {hasLicenseData ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Rights\")}</h3>\n <div className=\"grid grid-cols-2 lg:grid-cols-6 gap-3\">\n <div className=\"relative col-span-2 lg:col-span-3 flex min-h-[15rem] flex-col justify-end overflow-hidden rounded-[2rem] bg-gradient-to-br from-brand-purple/15 via-brand-blue/10 to-transparent p-6 text-foreground ring-1 ring-brand-blue/20 backdrop-blur-sm sm:p-8\">\n <span aria-hidden className=\"pointer-events-none absolute -right-16 -top-16 h-64 w-64 rounded-full ring-[28px] ring-brand-blue/10\" />\n <span aria-hidden className=\"pointer-events-none absolute right-10 top-12 h-20 w-20 rounded-full bg-brand-rose/25 blur-xl\" />\n <div className=\"relative space-y-3\">\n {licenseType ? (\n <p className=\"text-3xl sm:text-4xl font-semibold tracking-tight leading-[1.05]\">\n {licenseLabel(licenseType)}\n </p>\n ) : null}\n {licenseDescription ? (\n <p className=\"max-w-md text-sm text-muted-foreground\">{licenseDescription}</p>\n ) : null}\n {summary ? (\n <p className=\"inline-block rounded-full bg-foreground/5 px-4 py-2 text-sm font-medium leading-snug text-muted-foreground ring-1 ring-border/60\">\n {summary}\n </p>\n ) : null}\n </div>\n </div>\n\n <div className=\"col-span-2 lg:col-span-3 grid grid-cols-2 lg:grid-cols-3 gap-3 auto-rows-[minmax(8.5rem,1fr)]\">\n {facts.map(({ icon: Icon, label, value, tile, pill, mark }, index) => (\n <div\n key={label}\n className={`relative flex flex-col justify-between gap-4 overflow-hidden rounded-[1.75rem] p-5 text-foreground ring-1 backdrop-blur-sm ${tile} ${SPAN_2[factSpans2[index]]} ${SPAN_LG_3[factSpansLg[index]]}`}\n >\n <Icon aria-hidden className={`pointer-events-none absolute -right-3 -top-3 h-20 w-20 opacity-10 ${mark}`} />\n <span className={`relative inline-flex w-fit items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium ${pill}`}>\n <Icon className=\"h-3.5 w-3.5\" />\n {label}\n </span>\n <p className=\"relative text-xl sm:text-2xl font-semibold leading-none tracking-tight break-words\">{value}</p>\n </div>\n ))}\n </div>\n\n <div className=\"relative col-span-2 lg:col-span-6 flex items-center gap-4 overflow-hidden rounded-[2rem] bg-gradient-to-r from-brand-rose/10 to-brand-orange/10 p-5 ring-1 ring-brand-rose/20 backdrop-blur-sm sm:p-6\">\n <Scale aria-hidden className=\"pointer-events-none absolute -right-3 -top-4 h-24 w-24 -rotate-12 text-brand-rose/10\" />\n <span className=\"relative flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-brand-rose/15 text-brand-rose\">\n <Scale className=\"h-5 w-5\" />\n </span>\n <p className=\"relative pr-16 text-sm leading-relaxed text-muted-foreground\">\n {t(\"Creative work is protected with international copyright law. The Berne Convention for the Protection of Literary and Artistic Works is the foundational international copyright treaty, ratified by 181 signatory countries.\")}\n </p>\n </div>\n </div>\n </section>\n ) : null}\n\n {displayAttributes.length > 0 ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Details\")}</h3>\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-3 [grid-auto-flow:dense]\">\n {displayAttributes.map((attribute, index) => (\n <Cell\n key={index}\n label={attribute.trait_type ?? t(\"Trait\")}\n className={`${SPAN_2[detailSpans2[index]]} ${SPAN_SM_4[detailSpansSm[index]]}`}\n value={\n isAddressLike(attribute.value) ? (\n <AddressDisplay address={attribute.value!} chars={4} className=\"text-base font-semibold\" />\n ) : (\n attribute.value ?? \"—\"\n )\n }\n />\n ))}\n </div>\n </section>\n ) : null}\n\n {!hasTemplateData && !hasLicenseData && displayAttributes.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">{t(\"No additional details available.\")}</p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6EI;AA1EJ,0BAA2F;AAC3F,6BAA8B;AAC9B,6BAA+B;AAC/B,2BAA6B;AAC7B,6BAA+B;AAC/B,gBAA8B;AAC9B,sBAAqB;AAerB,SAAS,aAAa,OAAuB;AAC3C,QAAM,QAAQ,wBAAc,KAAK,CAAC,YAAY,QAAQ,UAAU,KAAK,GAAG,SAAS;AACjF,SAAO,MAAM,MAAM,UAAK,EAAE,CAAC,KAAK;AAClC;AAEA,MAAM,gBAAgB,CAAC,MACrB,OAAO,MAAM,YAAY,uBAAuB,KAAK,EAAE,KAAK,CAAC;AAE/D,SAAS,UAAU,OAAiB,MAAwB;AAC1D,QAAM,MAAM,MAAM,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AAkB,IAAI,CAAC,WAAW,UACjC;AAAA,QAAC;AAAA;AAAA,UAEC,OAAO,UAAU,cAAc,EAAE,OAAO;AAAA,UACxC,WAAW,GAAG,OAAO,aAAa,KAAK,CAAC,CAAC,IAAI,UAAU,cAAc,KAAK,CAAC,CAAC;AAAA,UAC5E,OACE,cAAc,UAAU,KAAK,IAC3B,4CAAC,yCAAe,SAAS,UAAU,OAAQ,OAAO,GAAG,WAAU,2BAA0B,IAEzF,UAAU,SAAS;AAAA;AAAA,QAPlB;AAAA,MAUP,CACD,GACH;AAAA,OACF,IACE;AAAA,IAEH,CAAC,mBAAmB,CAAC,kBAAkB,kBAAkB,WAAW,IACnE,4CAAC,OAAE,WAAU,iCAAiC,YAAE,kCAAkC,GAAE,IAClF;AAAA,KACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-overview-content.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Bot, DollarSign, ExternalLink, GitBranch, Globe, Percent, Scale, UserCheck } from \"lucide-react\";\nimport { IPTypeDisplay } from \"./ip-type-display.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { MarkdownText } from \"./markdown-text.js\";\nimport { licenseSummary } from \"../utils/license-summary.js\";\nimport { LICENSE_TYPES } from \"../data/ip.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Panel, Pill, type PanelColor } from \"./panel.js\";\n\ninterface AssetAttribute {\n trait_type?: string;\n value?: string;\n}\n\ninterface AssetOverviewContentProps {\n attributes: AssetAttribute[];\n hasTemplateData: boolean;\n isDisplayAttr: (attribute: AssetAttribute) => boolean;\n content?: string | null;\n link?: string | null;\n}\n\nfunction licenseLabel(value: string): string {\n const label = LICENSE_TYPES.find((license) => license.value === value)?.label ?? value;\n return label.split(\" — \")[1] ?? label;\n}\n\nconst isAddressLike = (v?: unknown): boolean =>\n typeof v === \"string\" && /^0x[0-9a-fA-F]{16,}$/.test(v.trim());\n\nfunction fillSpans(units: number[], cols: number): number[] {\n const out = units.map((unit) => Math.min(unit, cols));\n const rest = out.reduce((sum, unit) => sum + unit, 0) % cols;\n if (rest && out.length) out[out.length - 1] += cols - rest;\n return out;\n}\n\nfunction bentoSpans(count: number): number[] {\n const out: number[] = [];\n const rows = [[2, 1], [1, 2]];\n for (let row = 0; out.length < count; row++) {\n const left = count - out.length;\n if (left === 1) out.push(3);\n else out.push(...rows[row % 2]);\n }\n return out;\n}\n\nconst SPAN_2: Record<number, string> = { 1: \"col-span-1\", 2: \"col-span-2\" };\nconst SPAN_SM_4: Record<number, string> = {\n 1: \"sm:col-span-1\",\n 2: \"sm:col-span-2\",\n 3: \"sm:col-span-3\",\n 4: \"sm:col-span-4\",\n};\nconst SPAN_LG_3: Record<number, string> = {\n 1: \"lg:col-span-1\",\n 2: \"lg:col-span-2\",\n 3: \"lg:col-span-3\",\n};\n\nfunction detailSpans(count: number): number[] {\n const out: number[] = [];\n while (out.length < count) {\n const left = count - out.length;\n if (left >= 5) out.push(1, 2, 1);\n else if (left === 4 || left === 2) out.push(...Array(left).fill(2));\n else if (left === 3) out.push(1, 2, 1);\n else out.push(4);\n }\n return out.slice(0, count);\n}\n\nfunction Cell({ label, value, className }: { label: string; value: ReactNode; className?: string }) {\n return (\n <Panel className={`flex flex-col justify-end gap-1.5 px-5 py-4 min-h-[5.5rem] ${className ?? \"\"}`}>\n <p className=\"truncate text-xs font-medium text-muted-foreground\" title={label}>{label}</p>\n <div className=\"text-lg font-semibold leading-tight tracking-tight text-foreground break-words\">{value}</div>\n </Panel>\n );\n}\n\nexport function AssetOverviewContent({\n attributes,\n hasTemplateData,\n isDisplayAttr,\n content,\n link,\n}: AssetOverviewContentProps) {\n const t = useT();\n const attr = (trait: string) => attributes.find((attribute) => attribute.trait_type === trait)?.value;\n const licenseType = attr(\"License\");\n const commercialUse = attr(\"Commercial Use\");\n const derivatives = attr(\"Derivatives\");\n const attribution = attr(\"Attribution\");\n const territory = attr(\"Territory\");\n const aiPolicy = attr(\"AI Policy\");\n const royalty = attr(\"Royalty\");\n const summary = licenseSummary(attributes);\n const hasLicenseData = !!(licenseType || commercialUse || derivatives || attribution);\n const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));\n\n const licenseDescription = LICENSE_TYPES.find((license) => license.value === licenseType)?.description;\n\n const factRows: { icon: typeof Bot; label: string; value?: string; tone: readonly [PanelColor, PanelColor] }[] = [\n { icon: DollarSign, label: t(\"Commercial use\"), value: commercialUse, tone: [\"orange\", \"rose\"] },\n { icon: GitBranch, label: t(\"Derivatives\"), value: derivatives, tone: [\"rose\", \"maeve\"] },\n { icon: UserCheck, label: t(\"Attribution\"), value: attribution, tone: [\"maeve\", \"purple\"] },\n { icon: Globe, label: t(\"Territory\"), value: territory, tone: [\"blue\", \"purple\"] },\n { icon: Bot, label: t(\"AI & data mining\"), value: aiPolicy, tone: [\"purple\", \"rose\"] },\n { icon: Percent, label: t(\"Royalty\"), value: royalty, tone: [\"orange\", \"maeve\"] },\n ];\n const facts = factRows.filter((row) => !!row.value);\n\n const factSpans2 = fillSpans(facts.map(() => 1), 2);\n const factSpansLg = bentoSpans(facts.length);\n const detailUnits = displayAttributes.map((attribute) => (isAddressLike(attribute.value) ? 2 : 1));\n const detailSpans2 = fillSpans(detailUnits, 2);\n const detailSpansSm = detailSpans(displayAttributes.length).map((span, index) => Math.max(span, detailUnits[index]));\n\n return (\n <div className=\"mt-4 space-y-7\">\n {content ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Content\")}</h3>\n <MarkdownText text={content} />\n </section>\n ) : null}\n\n {link ? (\n <a href={link} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex items-center gap-1.5 text-sm text-primary hover:underline\">\n <ExternalLink className=\"h-3.5 w-3.5\" />\n {t(\"Open link\")}\n </a>\n ) : null}\n\n {hasTemplateData ? <IPTypeDisplay attributes={attributes} /> : null}\n\n {hasLicenseData ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Rights\")}</h3>\n <div className=\"grid grid-cols-2 lg:grid-cols-6 gap-3\">\n <Panel tone={[\"purple\", \"blue\"]} className=\"col-span-2 lg:col-span-3 flex min-h-[15rem] flex-col justify-end gap-3 p-6 sm:p-8\">\n {licenseType ? (\n <p className=\"text-3xl sm:text-4xl font-semibold tracking-tight leading-[1.05] text-foreground\">\n {licenseLabel(licenseType)}\n </p>\n ) : null}\n {licenseDescription ? (\n <p className=\"max-w-md text-sm text-muted-foreground\">{licenseDescription}</p>\n ) : null}\n {summary ? (\n <p className=\"text-base font-semibold leading-snug text-foreground\">{summary}</p>\n ) : null}\n </Panel>\n\n <div className=\"col-span-2 lg:col-span-3 grid grid-cols-2 lg:grid-cols-3 gap-3 auto-rows-[minmax(8.5rem,1fr)]\">\n {facts.map(({ icon: Icon, label, value, tone }, index) => (\n <Panel\n key={label}\n tone={tone}\n className={`flex flex-col justify-between gap-4 p-5 ${SPAN_2[factSpans2[index]]} ${SPAN_LG_3[factSpansLg[index]]}`}\n >\n <Pill color={tone[0]}>\n <Icon className=\"h-3.5 w-3.5\" />\n {label}\n </Pill>\n <p className=\"text-xl sm:text-2xl font-semibold leading-none tracking-tight break-words text-foreground\">{value}</p>\n </Panel>\n ))}\n </div>\n\n <Panel tone={[\"rose\", \"orange\"]} className=\"col-span-2 lg:col-span-6 flex items-center gap-4 p-5 sm:p-6\">\n <span className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-background/40 text-brand-rose\">\n <Scale className=\"h-5 w-5\" />\n </span>\n <p className=\"text-sm leading-relaxed text-muted-foreground\">\n {t(\"Creative work is protected with international copyright law. The Berne Convention for the Protection of Literary and Artistic Works is the foundational international copyright treaty, ratified by 181 signatory countries.\")}\n </p>\n </Panel>\n </div>\n </section>\n ) : null}\n\n {displayAttributes.length > 0 ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Details\")}</h3>\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-3 [grid-auto-flow:dense]\">\n {displayAttributes.map((attribute, index) => (\n <Cell\n key={index}\n label={attribute.trait_type ?? t(\"Trait\")}\n className={`${SPAN_2[detailSpans2[index]]} ${SPAN_SM_4[detailSpansSm[index]]}`}\n value={\n isAddressLike(attribute.value) ? (\n <AddressDisplay address={attribute.value!} chars={4} className=\"text-base font-semibold\" />\n ) : (\n attribute.value ?? \"—\"\n )\n }\n />\n ))}\n </div>\n </section>\n ) : null}\n\n {!hasTemplateData && !hasLicenseData && displayAttributes.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">{t(\"No additional details available.\")}</p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA8EI;AA3EJ,0BAA2F;AAC3F,6BAA8B;AAC9B,6BAA+B;AAC/B,2BAA6B;AAC7B,6BAA+B;AAC/B,gBAA8B;AAC9B,sBAAqB;AACrB,mBAA6C;AAe7C,SAAS,aAAa,OAAuB;AAC3C,QAAM,QAAQ,wBAAc,KAAK,CAAC,YAAY,QAAQ,UAAU,KAAK,GAAG,SAAS;AACjF,SAAO,MAAM,MAAM,UAAK,EAAE,CAAC,KAAK;AAClC;AAEA,MAAM,gBAAgB,CAAC,MACrB,OAAO,MAAM,YAAY,uBAAuB,KAAK,EAAE,KAAK,CAAC;AAE/D,SAAS,UAAU,OAAiB,MAAwB;AAC1D,QAAM,MAAM,MAAM,IAAI,CAAC,SAAS,KAAK,IAAI,MAAM,IAAI,CAAC;AACpD,QAAM,OAAO,IAAI,OAAO,CAAC,KAAK,SAAS,MAAM,MAAM,CAAC,IAAI;AACxD,MAAI,QAAQ,IAAI,OAAQ,KAAI,IAAI,SAAS,CAAC,KAAK,OAAO;AACtD,SAAO;AACT;AAEA,SAAS,WAAW,OAAyB;AAC3C,QAAM,MAAgB,CAAC;AACvB,QAAM,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAA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,IAAI,UAAU,YAAY,KAAK,CAAC,CAAC;AAAA,YAEhH;AAAA,2DAAC,qBAAK,OAAO,KAAK,CAAC,GACjB;AAAA,4DAAC,QAAK,WAAU,eAAc;AAAA,gBAC7B;AAAA,iBACH;AAAA,cACA,4CAAC,OAAE,WAAU,6FAA6F,iBAAM;AAAA;AAAA;AAAA,UAR3G;AAAA,QASP,CACD,GACH;AAAA,QAEA,6CAAC,sBAAM,MAAM,CAAC,QAAQ,QAAQ,GAAG,WAAU,+DACzC;AAAA,sDAAC,UAAK,WAAU,qGACd,sDAAC,6BAAM,WAAU,WAAU,GAC7B;AAAA,UACA,4CAAC,OAAE,WAAU,iDACV,YAAE,8NAA8N,GACnO;AAAA,WACF;AAAA,SACF;AAAA,OACF,IACE;AAAA,IAEH,kBAAkB,SAAS,IAC1B,6CAAC,aAAQ,WAAU,aACjB;AAAA,kDAAC,QAAG,WAAU,+CAA+C,YAAE,SAAS,GAAE;AAAA,MAC1E,4CAAC,SAAI,WAAU,gEACZ,4BAAkB,IAAI,CAAC,WAAW,UACjC;AAAA,QAAC;AAAA;AAAA,UAEC,OAAO,UAAU,cAAc,EAAE,OAAO;AAAA,UACxC,WAAW,GAAG,OAAO,aAAa,KAAK,CAAC,CAAC,IAAI,UAAU,cAAc,KAAK,CAAC,CAAC;AAAA,UAC5E,OACE,cAAc,UAAU,KAAK,IAC3B,4CAAC,yCAAe,SAAS,UAAU,OAAQ,OAAO,GAAG,WAAU,2BAA0B,IAEzF,UAAU,SAAS;AAAA;AAAA,QAPlB;AAAA,MAUP,CACD,GACH;AAAA,OACF,IACE;AAAA,IAEH,CAAC,mBAAmB,CAAC,kBAAkB,kBAAkB,WAAW,IACnE,4CAAC,OAAE,WAAU,iCAAiC,YAAE,kCAAkC,GAAE,IAClF;AAAA,KACN;AAEJ;","names":[]}
@@ -7,6 +7,7 @@ import { MarkdownText } from "./markdown-text.js";
7
7
  import { licenseSummary } from "../utils/license-summary.js";
8
8
  import { LICENSE_TYPES } from "../data/ip.js";
9
9
  import { useT } from "../i18n/provider.js";
10
+ import { Panel, Pill } from "./panel.js";
10
11
  function licenseLabel(value) {
11
12
  const label = LICENSE_TYPES.find((license) => license.value === value)?.label ?? value;
12
13
  return label.split(" \u2014 ")[1] ?? label;
@@ -52,16 +53,10 @@ function detailSpans(count) {
52
53
  return out.slice(0, count);
53
54
  }
54
55
  function Cell({ label, value, className }) {
55
- return /* @__PURE__ */ jsxs(
56
- "div",
57
- {
58
- className: `flex flex-col justify-end gap-1.5 rounded-3xl bg-foreground/[0.06] ring-1 ring-border/40 px-5 py-4 min-h-[5.5rem] ${className ?? ""}`,
59
- children: [
60
- /* @__PURE__ */ jsx("p", { className: "truncate text-xs font-medium text-muted-foreground", title: label, children: label }),
61
- /* @__PURE__ */ jsx("div", { className: "text-lg font-semibold leading-tight tracking-tight text-foreground break-words", children: value })
62
- ]
63
- }
64
- );
56
+ return /* @__PURE__ */ jsxs(Panel, { className: `flex flex-col justify-end gap-1.5 px-5 py-4 min-h-[5.5rem] ${className ?? ""}`, children: [
57
+ /* @__PURE__ */ jsx("p", { className: "truncate text-xs font-medium text-muted-foreground", title: label, children: label }),
58
+ /* @__PURE__ */ jsx("div", { className: "text-lg font-semibold leading-tight tracking-tight text-foreground break-words", children: value })
59
+ ] });
65
60
  }
66
61
  function AssetOverviewContent({
67
62
  attributes,
@@ -83,14 +78,15 @@ function AssetOverviewContent({
83
78
  const hasLicenseData = !!(licenseType || commercialUse || derivatives || attribution);
84
79
  const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));
85
80
  const licenseDescription = LICENSE_TYPES.find((license) => license.value === licenseType)?.description;
86
- const facts = [
87
- { icon: DollarSign, label: t("Commercial use"), value: commercialUse, tile: "bg-brand-orange/10 ring-brand-orange/20", pill: "bg-brand-orange/15 text-brand-orange", mark: "text-brand-orange" },
88
- { icon: GitBranch, label: t("Derivatives"), value: derivatives, tile: "bg-brand-rose/10 ring-brand-rose/20", pill: "bg-brand-rose/15 text-brand-rose", mark: "text-brand-rose" },
89
- { icon: UserCheck, label: t("Attribution"), value: attribution, tile: "bg-foreground/5 ring-border/60", pill: "bg-foreground/10 text-muted-foreground", mark: "text-foreground" },
90
- { icon: Globe, label: t("Territory"), value: territory, tile: "bg-brand-blue/10 ring-brand-blue/20", pill: "bg-brand-blue/15 text-brand-blue", mark: "text-brand-blue" },
91
- { icon: Bot, label: t("AI & data mining"), value: aiPolicy, tile: "bg-brand-purple/10 ring-brand-purple/20", pill: "bg-brand-purple/15 text-brand-purple", mark: "text-brand-purple" },
92
- { icon: Percent, label: t("Royalty"), value: royalty, tile: "bg-brand-orange/10 ring-brand-orange/20", pill: "bg-brand-orange/15 text-brand-orange", mark: "text-brand-orange" }
93
- ].filter((row) => !!row.value);
81
+ const factRows = [
82
+ { icon: DollarSign, label: t("Commercial use"), value: commercialUse, tone: ["orange", "rose"] },
83
+ { icon: GitBranch, label: t("Derivatives"), value: derivatives, tone: ["rose", "maeve"] },
84
+ { icon: UserCheck, label: t("Attribution"), value: attribution, tone: ["maeve", "purple"] },
85
+ { icon: Globe, label: t("Territory"), value: territory, tone: ["blue", "purple"] },
86
+ { icon: Bot, label: t("AI & data mining"), value: aiPolicy, tone: ["purple", "rose"] },
87
+ { icon: Percent, label: t("Royalty"), value: royalty, tone: ["orange", "maeve"] }
88
+ ];
89
+ const facts = factRows.filter((row) => !!row.value);
94
90
  const factSpans2 = fillSpans(facts.map(() => 1), 2);
95
91
  const factSpansLg = bentoSpans(facts.length);
96
92
  const detailUnits = displayAttributes.map((attribute) => isAddressLike(attribute.value) ? 2 : 1);
@@ -109,34 +105,29 @@ function AssetOverviewContent({
109
105
  hasLicenseData ? /* @__PURE__ */ jsxs("section", { className: "space-y-3", children: [
110
106
  /* @__PURE__ */ jsx("h3", { className: "text-sm font-semibold text-muted-foreground", children: t("Rights") }),
111
107
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 lg:grid-cols-6 gap-3", children: [
112
- /* @__PURE__ */ jsxs("div", { className: "relative col-span-2 lg:col-span-3 flex min-h-[15rem] flex-col justify-end overflow-hidden rounded-[2rem] bg-gradient-to-br from-brand-purple/15 via-brand-blue/10 to-transparent p-6 text-foreground ring-1 ring-brand-blue/20 backdrop-blur-sm sm:p-8", children: [
113
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "pointer-events-none absolute -right-16 -top-16 h-64 w-64 rounded-full ring-[28px] ring-brand-blue/10" }),
114
- /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "pointer-events-none absolute right-10 top-12 h-20 w-20 rounded-full bg-brand-rose/25 blur-xl" }),
115
- /* @__PURE__ */ jsxs("div", { className: "relative space-y-3", children: [
116
- licenseType ? /* @__PURE__ */ jsx("p", { className: "text-3xl sm:text-4xl font-semibold tracking-tight leading-[1.05]", children: licenseLabel(licenseType) }) : null,
117
- licenseDescription ? /* @__PURE__ */ jsx("p", { className: "max-w-md text-sm text-muted-foreground", children: licenseDescription }) : null,
118
- summary ? /* @__PURE__ */ jsx("p", { className: "inline-block rounded-full bg-foreground/5 px-4 py-2 text-sm font-medium leading-snug text-muted-foreground ring-1 ring-border/60", children: summary }) : null
119
- ] })
108
+ /* @__PURE__ */ jsxs(Panel, { tone: ["purple", "blue"], className: "col-span-2 lg:col-span-3 flex min-h-[15rem] flex-col justify-end gap-3 p-6 sm:p-8", children: [
109
+ licenseType ? /* @__PURE__ */ jsx("p", { className: "text-3xl sm:text-4xl font-semibold tracking-tight leading-[1.05] text-foreground", children: licenseLabel(licenseType) }) : null,
110
+ licenseDescription ? /* @__PURE__ */ jsx("p", { className: "max-w-md text-sm text-muted-foreground", children: licenseDescription }) : null,
111
+ summary ? /* @__PURE__ */ jsx("p", { className: "text-base font-semibold leading-snug text-foreground", children: summary }) : null
120
112
  ] }),
121
- /* @__PURE__ */ jsx("div", { className: "col-span-2 lg:col-span-3 grid grid-cols-2 lg:grid-cols-3 gap-3 auto-rows-[minmax(8.5rem,1fr)]", children: facts.map(({ icon: Icon, label, value, tile, pill, mark }, index) => /* @__PURE__ */ jsxs(
122
- "div",
113
+ /* @__PURE__ */ jsx("div", { className: "col-span-2 lg:col-span-3 grid grid-cols-2 lg:grid-cols-3 gap-3 auto-rows-[minmax(8.5rem,1fr)]", children: facts.map(({ icon: Icon, label, value, tone }, index) => /* @__PURE__ */ jsxs(
114
+ Panel,
123
115
  {
124
- className: `relative flex flex-col justify-between gap-4 overflow-hidden rounded-[1.75rem] p-5 text-foreground ring-1 backdrop-blur-sm ${tile} ${SPAN_2[factSpans2[index]]} ${SPAN_LG_3[factSpansLg[index]]}`,
116
+ tone,
117
+ className: `flex flex-col justify-between gap-4 p-5 ${SPAN_2[factSpans2[index]]} ${SPAN_LG_3[factSpansLg[index]]}`,
125
118
  children: [
126
- /* @__PURE__ */ jsx(Icon, { "aria-hidden": true, className: `pointer-events-none absolute -right-3 -top-3 h-20 w-20 opacity-10 ${mark}` }),
127
- /* @__PURE__ */ jsxs("span", { className: `relative inline-flex w-fit items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium ${pill}`, children: [
119
+ /* @__PURE__ */ jsxs(Pill, { color: tone[0], children: [
128
120
  /* @__PURE__ */ jsx(Icon, { className: "h-3.5 w-3.5" }),
129
121
  label
130
122
  ] }),
131
- /* @__PURE__ */ jsx("p", { className: "relative text-xl sm:text-2xl font-semibold leading-none tracking-tight break-words", children: value })
123
+ /* @__PURE__ */ jsx("p", { className: "text-xl sm:text-2xl font-semibold leading-none tracking-tight break-words text-foreground", children: value })
132
124
  ]
133
125
  },
134
126
  label
135
127
  )) }),
136
- /* @__PURE__ */ jsxs("div", { className: "relative col-span-2 lg:col-span-6 flex items-center gap-4 overflow-hidden rounded-[2rem] bg-gradient-to-r from-brand-rose/10 to-brand-orange/10 p-5 ring-1 ring-brand-rose/20 backdrop-blur-sm sm:p-6", children: [
137
- /* @__PURE__ */ jsx(Scale, { "aria-hidden": true, className: "pointer-events-none absolute -right-3 -top-4 h-24 w-24 -rotate-12 text-brand-rose/10" }),
138
- /* @__PURE__ */ jsx("span", { className: "relative flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-brand-rose/15 text-brand-rose", children: /* @__PURE__ */ jsx(Scale, { className: "h-5 w-5" }) }),
139
- /* @__PURE__ */ jsx("p", { className: "relative pr-16 text-sm leading-relaxed text-muted-foreground", children: t("Creative work is protected with international copyright law. The Berne Convention for the Protection of Literary and Artistic Works is the foundational international copyright treaty, ratified by 181 signatory countries.") })
128
+ /* @__PURE__ */ jsxs(Panel, { tone: ["rose", "orange"], className: "col-span-2 lg:col-span-6 flex items-center gap-4 p-5 sm:p-6", children: [
129
+ /* @__PURE__ */ jsx("span", { className: "flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-background/40 text-brand-rose", children: /* @__PURE__ */ jsx(Scale, { className: "h-5 w-5" }) }),
130
+ /* @__PURE__ */ jsx("p", { className: "text-sm leading-relaxed text-muted-foreground", children: t("Creative work is protected with international copyright law. The Berne Convention for the Protection of Literary and Artistic Works is the foundational international copyright treaty, ratified by 181 signatory countries.") })
140
131
  ] })
141
132
  ] })
142
133
  ] }) : null,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-overview-content.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Bot, DollarSign, ExternalLink, GitBranch, Globe, Percent, Scale, UserCheck } from \"lucide-react\";\nimport { IPTypeDisplay } from \"./ip-type-display.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { MarkdownText } from \"./markdown-text.js\";\nimport { licenseSummary } from \"../utils/license-summary.js\";\nimport { LICENSE_TYPES } from \"../data/ip.js\";\nimport { useT } from \"../i18n/provider.js\";\n\ninterface AssetAttribute {\n trait_type?: string;\n value?: string;\n}\n\ninterface AssetOverviewContentProps {\n attributes: AssetAttribute[];\n hasTemplateData: boolean;\n isDisplayAttr: (attribute: AssetAttribute) => boolean;\n content?: string | null;\n link?: string | null;\n}\n\nfunction licenseLabel(value: string): string {\n const label = LICENSE_TYPES.find((license) => license.value === value)?.label ?? value;\n return label.split(\" — \")[1] ?? label;\n}\n\nconst isAddressLike = (v?: unknown): boolean =>\n typeof v === \"string\" && /^0x[0-9a-fA-F]{16,}$/.test(v.trim());\n\nfunction fillSpans(units: number[], cols: number): number[] {\n const out = units.map((unit) => Math.min(unit, cols));\n const rest = out.reduce((sum, unit) => sum + unit, 0) % cols;\n if (rest && out.length) out[out.length - 1] += cols - rest;\n return out;\n}\n\nfunction bentoSpans(count: number): number[] {\n const out: number[] = [];\n const rows = [[2, 1], [1, 2]];\n for (let row = 0; out.length < count; row++) {\n const left = count - out.length;\n if (left === 1) out.push(3);\n else out.push(...rows[row % 2]);\n }\n return out;\n}\n\nconst SPAN_2: Record<number, string> = { 1: \"col-span-1\", 2: \"col-span-2\" };\nconst SPAN_SM_4: Record<number, string> = {\n 1: \"sm:col-span-1\",\n 2: \"sm:col-span-2\",\n 3: \"sm:col-span-3\",\n 4: \"sm:col-span-4\",\n};\nconst SPAN_LG_3: Record<number, string> = {\n 1: \"lg:col-span-1\",\n 2: \"lg:col-span-2\",\n 3: \"lg:col-span-3\",\n};\n\nfunction detailSpans(count: number): number[] {\n const out: number[] = [];\n while (out.length < count) {\n const left = count - out.length;\n if (left >= 5) out.push(1, 2, 1);\n else if (left === 4 || left === 2) out.push(...Array(left).fill(2));\n else if (left === 3) out.push(1, 2, 1);\n else out.push(4);\n }\n return out.slice(0, count);\n}\n\nfunction Cell({ label, value, className }: { label: string; value: ReactNode; className?: string }) {\n return (\n <div\n className={`flex flex-col justify-end gap-1.5 rounded-3xl bg-foreground/[0.06] ring-1 ring-border/40 px-5 py-4 min-h-[5.5rem] ${className ?? \"\"}`}\n >\n <p className=\"truncate text-xs font-medium text-muted-foreground\" title={label}>{label}</p>\n <div className=\"text-lg font-semibold leading-tight tracking-tight text-foreground break-words\">{value}</div>\n </div>\n );\n}\n\nexport function AssetOverviewContent({\n attributes,\n hasTemplateData,\n isDisplayAttr,\n content,\n link,\n}: AssetOverviewContentProps) {\n const t = useT();\n const attr = (trait: string) => attributes.find((attribute) => attribute.trait_type === trait)?.value;\n const licenseType = attr(\"License\");\n const commercialUse = attr(\"Commercial Use\");\n const derivatives = attr(\"Derivatives\");\n const attribution = attr(\"Attribution\");\n const territory = attr(\"Territory\");\n const aiPolicy = attr(\"AI Policy\");\n const royalty = attr(\"Royalty\");\n const summary = licenseSummary(attributes);\n const hasLicenseData = !!(licenseType || commercialUse || derivatives || attribution);\n const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));\n\n const licenseDescription = LICENSE_TYPES.find((license) => license.value === licenseType)?.description;\n\n const facts = [\n { icon: DollarSign, label: t(\"Commercial use\"), value: commercialUse, tile: \"bg-brand-orange/10 ring-brand-orange/20\", pill: \"bg-brand-orange/15 text-brand-orange\", mark: \"text-brand-orange\" },\n { icon: GitBranch, label: t(\"Derivatives\"), value: derivatives, tile: \"bg-brand-rose/10 ring-brand-rose/20\", pill: \"bg-brand-rose/15 text-brand-rose\", mark: \"text-brand-rose\" },\n { icon: UserCheck, label: t(\"Attribution\"), value: attribution, tile: \"bg-foreground/5 ring-border/60\", pill: \"bg-foreground/10 text-muted-foreground\", mark: \"text-foreground\" },\n { icon: Globe, label: t(\"Territory\"), value: territory, tile: \"bg-brand-blue/10 ring-brand-blue/20\", pill: \"bg-brand-blue/15 text-brand-blue\", mark: \"text-brand-blue\" },\n { icon: Bot, label: t(\"AI & data mining\"), value: aiPolicy, tile: \"bg-brand-purple/10 ring-brand-purple/20\", pill: \"bg-brand-purple/15 text-brand-purple\", mark: \"text-brand-purple\" },\n { icon: Percent, label: t(\"Royalty\"), value: royalty, tile: \"bg-brand-orange/10 ring-brand-orange/20\", pill: \"bg-brand-orange/15 text-brand-orange\", mark: \"text-brand-orange\" },\n ].filter((row) => !!row.value);\n\n const factSpans2 = fillSpans(facts.map(() => 1), 2);\n const factSpansLg = bentoSpans(facts.length);\n const detailUnits = displayAttributes.map((attribute) => (isAddressLike(attribute.value) ? 2 : 1));\n const detailSpans2 = fillSpans(detailUnits, 2);\n const detailSpansSm = detailSpans(displayAttributes.length).map((span, index) => Math.max(span, detailUnits[index]));\n\n return (\n <div className=\"mt-4 space-y-7\">\n {content ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Content\")}</h3>\n <MarkdownText text={content} />\n </section>\n ) : null}\n\n {link ? (\n <a href={link} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex items-center gap-1.5 text-sm text-primary hover:underline\">\n <ExternalLink className=\"h-3.5 w-3.5\" />\n {t(\"Open link\")}\n </a>\n ) : null}\n\n {hasTemplateData ? <IPTypeDisplay attributes={attributes} /> : null}\n\n {hasLicenseData ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Rights\")}</h3>\n <div className=\"grid grid-cols-2 lg:grid-cols-6 gap-3\">\n <div className=\"relative col-span-2 lg:col-span-3 flex min-h-[15rem] flex-col justify-end overflow-hidden rounded-[2rem] bg-gradient-to-br from-brand-purple/15 via-brand-blue/10 to-transparent p-6 text-foreground ring-1 ring-brand-blue/20 backdrop-blur-sm sm:p-8\">\n <span aria-hidden className=\"pointer-events-none absolute -right-16 -top-16 h-64 w-64 rounded-full ring-[28px] ring-brand-blue/10\" />\n <span aria-hidden className=\"pointer-events-none absolute right-10 top-12 h-20 w-20 rounded-full bg-brand-rose/25 blur-xl\" />\n <div className=\"relative space-y-3\">\n {licenseType ? (\n <p className=\"text-3xl sm:text-4xl font-semibold tracking-tight leading-[1.05]\">\n {licenseLabel(licenseType)}\n </p>\n ) : null}\n {licenseDescription ? (\n <p className=\"max-w-md text-sm text-muted-foreground\">{licenseDescription}</p>\n ) : null}\n {summary ? (\n <p className=\"inline-block rounded-full bg-foreground/5 px-4 py-2 text-sm font-medium leading-snug text-muted-foreground ring-1 ring-border/60\">\n {summary}\n </p>\n ) : null}\n </div>\n </div>\n\n <div className=\"col-span-2 lg:col-span-3 grid grid-cols-2 lg:grid-cols-3 gap-3 auto-rows-[minmax(8.5rem,1fr)]\">\n {facts.map(({ icon: Icon, label, value, tile, pill, mark }, index) => (\n <div\n key={label}\n className={`relative flex flex-col justify-between gap-4 overflow-hidden rounded-[1.75rem] p-5 text-foreground ring-1 backdrop-blur-sm ${tile} ${SPAN_2[factSpans2[index]]} ${SPAN_LG_3[factSpansLg[index]]}`}\n >\n <Icon aria-hidden className={`pointer-events-none absolute -right-3 -top-3 h-20 w-20 opacity-10 ${mark}`} />\n <span className={`relative inline-flex w-fit items-center gap-1.5 rounded-full px-3 py-1 text-xs font-medium ${pill}`}>\n <Icon className=\"h-3.5 w-3.5\" />\n {label}\n </span>\n <p className=\"relative text-xl sm:text-2xl font-semibold leading-none tracking-tight break-words\">{value}</p>\n </div>\n ))}\n </div>\n\n <div className=\"relative col-span-2 lg:col-span-6 flex items-center gap-4 overflow-hidden rounded-[2rem] bg-gradient-to-r from-brand-rose/10 to-brand-orange/10 p-5 ring-1 ring-brand-rose/20 backdrop-blur-sm sm:p-6\">\n <Scale aria-hidden className=\"pointer-events-none absolute -right-3 -top-4 h-24 w-24 -rotate-12 text-brand-rose/10\" />\n <span className=\"relative flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-brand-rose/15 text-brand-rose\">\n <Scale className=\"h-5 w-5\" />\n </span>\n <p className=\"relative pr-16 text-sm leading-relaxed text-muted-foreground\">\n {t(\"Creative work is protected with international copyright law. The Berne Convention for the Protection of Literary and Artistic Works is the foundational international copyright treaty, ratified by 181 signatory countries.\")}\n </p>\n </div>\n </div>\n </section>\n ) : null}\n\n {displayAttributes.length > 0 ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Details\")}</h3>\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-3 [grid-auto-flow:dense]\">\n {displayAttributes.map((attribute, index) => (\n <Cell\n key={index}\n label={attribute.trait_type ?? t(\"Trait\")}\n className={`${SPAN_2[detailSpans2[index]]} ${SPAN_SM_4[detailSpansSm[index]]}`}\n value={\n isAddressLike(attribute.value) ? (\n <AddressDisplay address={attribute.value!} chars={4} className=\"text-base font-semibold\" />\n ) : (\n attribute.value ?? \"—\"\n )\n }\n />\n ))}\n </div>\n </section>\n ) : null}\n\n {!hasTemplateData && !hasLicenseData && displayAttributes.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">{t(\"No additional details available.\")}</p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";AA6EI,SAGE,KAHF;AA1EJ,SAAS,KAAK,YAAY,cAAc,WAAW,OAAO,SAAS,OAAO,iBAAiB;AAC3F,SAAS,qBAAqB;AAC9B,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,sBAAsB;AAC/B,SAAS,qBAAqB;AAC9B,SAAS,YAAY;AAerB,SAAS,aAAa,OAAuB;AAC3C,QAAM,QAAQ,cAAc,KAAK,CAAC,YAAY,QAAQ,UAAU,KAAK,GAAG,SAAS;AACjF,SAAO,MAAM,MAAM,UAAK,EAAE,CAAC,KAAK;AAClC;AAEA,MAAM,gBAAgB,CAAC,MACrB,OAAO,MAAM,YAAY,uBAAuB,KAAK,EAAE,KAAK,CAAC;AAE/D,SAAS,UAAU,OAAiB,MAAwB;AAC1D,QAAM,MAAM,MAAM,IAAI,CAAC,SAAS,KAAK,IAAI,MAAM,IAAI,CAAC;AACpD,QAAM,OAAO,IAAI,OAAO,CAAC,KAAK,SAAS,MAAM,MAAM,CAAC,IAAI;AACxD,MAAI,QAAQ,IAAI,OAAQ,KAAI,IAAI,SAAS,CAAC,KAAK,OAAO;AACtD,SAAO;AACT;AAEA,SAAS,WAAW,OAAyB;AAC3C,QAAM,MAAgB,CAAC;AACvB,QAAM,OAAO,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAC5B,WAAS,MAAM,GAAG,IAAI,SAAS,OAAO,OAAO;AAC3C,UAAM,OAAO,QAAQ,IAAI;AACzB,QAAI,SA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,iCAAiC,YAAE,kCAAkC,GAAE,IAClF;AAAA,KACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-overview-content.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Bot, DollarSign, ExternalLink, GitBranch, Globe, Percent, Scale, UserCheck } from \"lucide-react\";\nimport { IPTypeDisplay } from \"./ip-type-display.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { MarkdownText } from \"./markdown-text.js\";\nimport { licenseSummary } from \"../utils/license-summary.js\";\nimport { LICENSE_TYPES } from \"../data/ip.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Panel, Pill, type PanelColor } from \"./panel.js\";\n\ninterface AssetAttribute {\n trait_type?: string;\n value?: string;\n}\n\ninterface AssetOverviewContentProps {\n attributes: AssetAttribute[];\n hasTemplateData: boolean;\n isDisplayAttr: (attribute: AssetAttribute) => boolean;\n content?: string | null;\n link?: string | null;\n}\n\nfunction licenseLabel(value: string): string {\n const label = LICENSE_TYPES.find((license) => license.value === value)?.label ?? value;\n return label.split(\" — \")[1] ?? label;\n}\n\nconst isAddressLike = (v?: unknown): boolean =>\n typeof v === \"string\" && /^0x[0-9a-fA-F]{16,}$/.test(v.trim());\n\nfunction fillSpans(units: number[], cols: number): number[] {\n const out = units.map((unit) => Math.min(unit, cols));\n const rest = out.reduce((sum, unit) => sum + unit, 0) % cols;\n if (rest && out.length) out[out.length - 1] += cols - rest;\n return out;\n}\n\nfunction bentoSpans(count: number): number[] {\n const out: number[] = [];\n const rows = [[2, 1], [1, 2]];\n for (let row = 0; out.length < count; row++) {\n const left = count - out.length;\n if (left === 1) out.push(3);\n else out.push(...rows[row % 2]);\n }\n return out;\n}\n\nconst SPAN_2: Record<number, string> = { 1: \"col-span-1\", 2: \"col-span-2\" };\nconst SPAN_SM_4: Record<number, string> = {\n 1: \"sm:col-span-1\",\n 2: \"sm:col-span-2\",\n 3: \"sm:col-span-3\",\n 4: \"sm:col-span-4\",\n};\nconst SPAN_LG_3: Record<number, string> = {\n 1: \"lg:col-span-1\",\n 2: \"lg:col-span-2\",\n 3: \"lg:col-span-3\",\n};\n\nfunction detailSpans(count: number): number[] {\n const out: number[] = [];\n while (out.length < count) {\n const left = count - out.length;\n if (left >= 5) out.push(1, 2, 1);\n else if (left === 4 || left === 2) out.push(...Array(left).fill(2));\n else if (left === 3) out.push(1, 2, 1);\n else out.push(4);\n }\n return out.slice(0, count);\n}\n\nfunction Cell({ label, value, className }: { label: string; value: ReactNode; className?: string }) {\n return (\n <Panel className={`flex flex-col justify-end gap-1.5 px-5 py-4 min-h-[5.5rem] ${className ?? \"\"}`}>\n <p className=\"truncate text-xs font-medium text-muted-foreground\" title={label}>{label}</p>\n <div className=\"text-lg font-semibold leading-tight tracking-tight text-foreground break-words\">{value}</div>\n </Panel>\n );\n}\n\nexport function AssetOverviewContent({\n attributes,\n hasTemplateData,\n isDisplayAttr,\n content,\n link,\n}: AssetOverviewContentProps) {\n const t = useT();\n const attr = (trait: string) => attributes.find((attribute) => attribute.trait_type === trait)?.value;\n const licenseType = attr(\"License\");\n const commercialUse = attr(\"Commercial Use\");\n const derivatives = attr(\"Derivatives\");\n const attribution = attr(\"Attribution\");\n const territory = attr(\"Territory\");\n const aiPolicy = attr(\"AI Policy\");\n const royalty = attr(\"Royalty\");\n const summary = licenseSummary(attributes);\n const hasLicenseData = !!(licenseType || commercialUse || derivatives || attribution);\n const displayAttributes = attributes.filter((attribute) => isDisplayAttr(attribute));\n\n const licenseDescription = LICENSE_TYPES.find((license) => license.value === licenseType)?.description;\n\n const factRows: { icon: typeof Bot; label: string; value?: string; tone: readonly [PanelColor, PanelColor] }[] = [\n { icon: DollarSign, label: t(\"Commercial use\"), value: commercialUse, tone: [\"orange\", \"rose\"] },\n { icon: GitBranch, label: t(\"Derivatives\"), value: derivatives, tone: [\"rose\", \"maeve\"] },\n { icon: UserCheck, label: t(\"Attribution\"), value: attribution, tone: [\"maeve\", \"purple\"] },\n { icon: Globe, label: t(\"Territory\"), value: territory, tone: [\"blue\", \"purple\"] },\n { icon: Bot, label: t(\"AI & data mining\"), value: aiPolicy, tone: [\"purple\", \"rose\"] },\n { icon: Percent, label: t(\"Royalty\"), value: royalty, tone: [\"orange\", \"maeve\"] },\n ];\n const facts = factRows.filter((row) => !!row.value);\n\n const factSpans2 = fillSpans(facts.map(() => 1), 2);\n const factSpansLg = bentoSpans(facts.length);\n const detailUnits = displayAttributes.map((attribute) => (isAddressLike(attribute.value) ? 2 : 1));\n const detailSpans2 = fillSpans(detailUnits, 2);\n const detailSpansSm = detailSpans(displayAttributes.length).map((span, index) => Math.max(span, detailUnits[index]));\n\n return (\n <div className=\"mt-4 space-y-7\">\n {content ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Content\")}</h3>\n <MarkdownText text={content} />\n </section>\n ) : null}\n\n {link ? (\n <a href={link} target=\"_blank\" rel=\"noopener noreferrer\" className=\"inline-flex items-center gap-1.5 text-sm text-primary hover:underline\">\n <ExternalLink className=\"h-3.5 w-3.5\" />\n {t(\"Open link\")}\n </a>\n ) : null}\n\n {hasTemplateData ? <IPTypeDisplay attributes={attributes} /> : null}\n\n {hasLicenseData ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Rights\")}</h3>\n <div className=\"grid grid-cols-2 lg:grid-cols-6 gap-3\">\n <Panel tone={[\"purple\", \"blue\"]} className=\"col-span-2 lg:col-span-3 flex min-h-[15rem] flex-col justify-end gap-3 p-6 sm:p-8\">\n {licenseType ? (\n <p className=\"text-3xl sm:text-4xl font-semibold tracking-tight leading-[1.05] text-foreground\">\n {licenseLabel(licenseType)}\n </p>\n ) : null}\n {licenseDescription ? (\n <p className=\"max-w-md text-sm text-muted-foreground\">{licenseDescription}</p>\n ) : null}\n {summary ? (\n <p className=\"text-base font-semibold leading-snug text-foreground\">{summary}</p>\n ) : null}\n </Panel>\n\n <div className=\"col-span-2 lg:col-span-3 grid grid-cols-2 lg:grid-cols-3 gap-3 auto-rows-[minmax(8.5rem,1fr)]\">\n {facts.map(({ icon: Icon, label, value, tone }, index) => (\n <Panel\n key={label}\n tone={tone}\n className={`flex flex-col justify-between gap-4 p-5 ${SPAN_2[factSpans2[index]]} ${SPAN_LG_3[factSpansLg[index]]}`}\n >\n <Pill color={tone[0]}>\n <Icon className=\"h-3.5 w-3.5\" />\n {label}\n </Pill>\n <p className=\"text-xl sm:text-2xl font-semibold leading-none tracking-tight break-words text-foreground\">{value}</p>\n </Panel>\n ))}\n </div>\n\n <Panel tone={[\"rose\", \"orange\"]} className=\"col-span-2 lg:col-span-6 flex items-center gap-4 p-5 sm:p-6\">\n <span className=\"flex h-11 w-11 shrink-0 items-center justify-center rounded-full bg-background/40 text-brand-rose\">\n <Scale className=\"h-5 w-5\" />\n </span>\n <p className=\"text-sm leading-relaxed text-muted-foreground\">\n {t(\"Creative work is protected with international copyright law. The Berne Convention for the Protection of Literary and Artistic Works is the foundational international copyright treaty, ratified by 181 signatory countries.\")}\n </p>\n </Panel>\n </div>\n </section>\n ) : null}\n\n {displayAttributes.length > 0 ? (\n <section className=\"space-y-3\">\n <h3 className=\"text-sm font-semibold text-muted-foreground\">{t(\"Details\")}</h3>\n <div className=\"grid grid-cols-2 sm:grid-cols-4 gap-3 [grid-auto-flow:dense]\">\n {displayAttributes.map((attribute, index) => (\n <Cell\n key={index}\n label={attribute.trait_type ?? t(\"Trait\")}\n className={`${SPAN_2[detailSpans2[index]]} ${SPAN_SM_4[detailSpansSm[index]]}`}\n value={\n isAddressLike(attribute.value) ? (\n <AddressDisplay address={attribute.value!} chars={4} className=\"text-base font-semibold\" />\n ) : (\n attribute.value ?? \"—\"\n )\n }\n />\n ))}\n </div>\n </section>\n ) : null}\n\n {!hasTemplateData && !hasLicenseData && displayAttributes.length === 0 ? (\n <p className=\"text-sm text-muted-foreground\">{t(\"No additional details available.\")}</p>\n ) : null}\n </div>\n );\n}\n"],"mappings":";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AAU,iDACV,YAAE,8NAA8N,GACnO;AAAA,WACF;AAAA,SACF;AAAA,OACF,IACE;AAAA,IAEH,kBAAkB,SAAS,IAC1B,qBAAC,aAAQ,WAAU,aACjB;AAAA,0BAAC,QAAG,WAAU,+CAA+C,YAAE,SAAS,GAAE;AAAA,MAC1E,oBAAC,SAAI,WAAU,gEACZ,4BAAkB,IAAI,CAAC,WAAW,UACjC;AAAA,QAAC;AAAA;AAAA,UAEC,OAAO,UAAU,cAAc,EAAE,OAAO;AAAA,UACxC,WAAW,GAAG,OAAO,aAAa,KAAK,CAAC,CAAC,IAAI,UAAU,cAAc,KAAK,CAAC,CAAC;AAAA,UAC5E,OACE,cAAc,UAAU,KAAK,IAC3B,oBAAC,kBAAe,SAAS,UAAU,OAAQ,OAAO,GAAG,WAAU,2BAA0B,IAEzF,UAAU,SAAS;AAAA;AAAA,QAPlB;AAAA,MAUP,CACD,GACH;AAAA,OACF,IACE;AAAA,IAEH,CAAC,mBAAmB,CAAC,kBAAkB,kBAAkB,WAAW,IACnE,oBAAC,OAAE,WAAU,iCAAiC,YAAE,kCAAkC,GAAE,IAClF;AAAA,KACN;AAEJ;","names":[]}
@@ -37,6 +37,7 @@ var import_link = __toESM(require("./link.js"), 1);
37
37
  var import_address_display = require("./address-display.js");
38
38
  var import_sdk = require("@medialane/sdk");
39
39
  var import_provider = require("../i18n/provider.js");
40
+ var import_panel = require("./panel.js");
40
41
  var import_use_format = require("../i18n/use-format.js");
41
42
  const MAX_VISIBLE = 5;
42
43
  function OwnerRow({ owner, amount }) {
@@ -54,7 +55,7 @@ function AssetOwnersPanel({ balances, total = balances.length, editions }) {
54
55
  if (balances.length === 0) return null;
55
56
  const owners = t.plural("{count} owner", "{count} owners", total, { count: intl.number(total) });
56
57
  const label = editions && editions !== total ? `${t.plural("{count} edition", "{count} editions", editions, { count: intl.number(editions) })} \xB7 ${owners}` : owners;
57
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl border border-border px-4 py-3 space-y-2", children: [
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_panel.Panel, { className: "px-4 py-3 space-y-2", children: [
58
59
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-2xs font-semibold text-muted-foreground tabular-nums", children: label }),
59
60
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col gap-1.5", children: [
60
61
  balances.slice(0, MAX_VISIBLE).map((balance) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OwnerRow, { ...balance }, balance.owner)),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-owners-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { profileHref } from \"@medialane/sdk\";\nimport { useT } from \"../i18n/provider.js\";\nimport { useFormat } from \"../i18n/use-format.js\";\n\ninterface HolderLike {\n owner: string;\n amount: string;\n}\n\ninterface AssetOwnersPanelProps {\n balances: HolderLike[];\n total?: number;\n editions?: number;\n}\n\nconst MAX_VISIBLE = 5;\n\nfunction OwnerRow({ owner, amount }: HolderLike) {\n return (\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <Link href={profileHref({ address: owner })} className=\"hover:text-primary transition-colors font-medium text-sm truncate\">\n <AddressDisplay address={owner} chars={6} showCopy={false} />\n </Link>\n </div>\n <span className=\"text-xs text-muted-foreground shrink-0 tabular-nums\">× {amount}</span>\n </div>\n );\n}\n\nexport function AssetOwnersPanel({ balances, total = balances.length, editions }: AssetOwnersPanelProps) {\n const t = useT();\n const intl = useFormat();\n if (balances.length === 0) return null;\n\n const owners = t.plural(\"{count} owner\", \"{count} owners\", total, { count: intl.number(total) });\n const label = editions && editions !== total ? `${t.plural(\"{count} edition\", \"{count} editions\", editions, { count: intl.number(editions) })} · ${owners}` : owners;\n\n return (\n <div className=\"rounded-xl border border-border px-4 py-3 space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground tabular-nums\">{label}</p>\n <div className=\"flex flex-col gap-1.5\">\n {balances.slice(0, MAX_VISIBLE).map((balance) => <OwnerRow key={balance.owner} {...balance} />)}\n {total > MAX_VISIBLE ? (\n <p className=\"text-xs text-muted-foreground/60\">+{t.plural(\"{count} more owner\", \"{count} more owners\", total - MAX_VISIBLE, { count: intl.number(total - MAX_VISIBLE) })}</p>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BU;AAxBV,kBAAiB;AACjB,6BAA+B;AAC/B,iBAA4B;AAC5B,sBAAqB;AACrB,wBAA0B;AAa1B,MAAM,cAAc;AAEpB,SAAS,SAAS,EAAE,OAAO,OAAO,GAAe;AAC/C,SACE,6CAAC,SAAI,WAAU,2CACb;AAAA,gDAAC,SAAI,WAAU,qCACb,sDAAC,YAAAA,SAAA,EAAK,UAAM,wBAAY,EAAE,SAAS,MAAM,CAAC,GAAG,WAAU,qEACrD,sDAAC,yCAAe,SAAS,OAAO,OAAO,GAAG,UAAU,OAAO,GAC7D,GACF;AAAA,IACA,6CAAC,UAAK,WAAU,uDAAsD;AAAA;AAAA,MAAG;AAAA,OAAO;AAAA,KAClF;AAEJ;AAEO,SAAS,iBAAiB,EAAE,UAAU,QAAQ,SAAS,QAAQ,SAAS,GAA0B;AACvG,QAAM,QAAI,sBAAK;AACf,QAAM,WAAO,6BAAU;AACvB,MAAI,SAAS,WAAW,EAAG,QAAO;AAElC,QAAM,SAAS,EAAE,OAAO,iBAAiB,kBAAkB,OAAO,EAAE,OAAO,KAAK,OAAO,KAAK,EAAE,CAAC;AAC/F,QAAM,QAAQ,YAAY,aAAa,QAAQ,GAAG,EAAE,OAAO,mBAAmB,oBAAoB,UAAU,EAAE,OAAO,KAAK,OAAO,QAAQ,EAAE,CAAC,CAAC,SAAM,MAAM,KAAK;AAE9J,SACE,6CAAC,SAAI,WAAU,uDACb;AAAA,gDAAC,OAAE,WAAU,6DAA6D,iBAAM;AAAA,IAChF,6CAAC,SAAI,WAAU,yBACZ;AAAA,eAAS,MAAM,GAAG,WAAW,EAAE,IAAI,CAAC,YAAY,4CAAC,YAA8B,GAAG,WAAnB,QAAQ,KAAoB,CAAE;AAAA,MAC7F,QAAQ,cACP,6CAAC,OAAE,WAAU,oCAAmC;AAAA;AAAA,QAAE,EAAE,OAAO,sBAAsB,uBAAuB,QAAQ,aAAa,EAAE,OAAO,KAAK,OAAO,QAAQ,WAAW,EAAE,CAAC;AAAA,SAAE,IACxK;AAAA,OACN;AAAA,KACF;AAEJ;","names":["Link"]}
1
+ {"version":3,"sources":["../../src/components/asset-owners-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { profileHref } from \"@medialane/sdk\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Panel } from \"./panel.js\";\nimport { useFormat } from \"../i18n/use-format.js\";\n\ninterface HolderLike {\n owner: string;\n amount: string;\n}\n\ninterface AssetOwnersPanelProps {\n balances: HolderLike[];\n total?: number;\n editions?: number;\n}\n\nconst MAX_VISIBLE = 5;\n\nfunction OwnerRow({ owner, amount }: HolderLike) {\n return (\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <Link href={profileHref({ address: owner })} className=\"hover:text-primary transition-colors font-medium text-sm truncate\">\n <AddressDisplay address={owner} chars={6} showCopy={false} />\n </Link>\n </div>\n <span className=\"text-xs text-muted-foreground shrink-0 tabular-nums\">× {amount}</span>\n </div>\n );\n}\n\nexport function AssetOwnersPanel({ balances, total = balances.length, editions }: AssetOwnersPanelProps) {\n const t = useT();\n const intl = useFormat();\n if (balances.length === 0) return null;\n\n const owners = t.plural(\"{count} owner\", \"{count} owners\", total, { count: intl.number(total) });\n const label = editions && editions !== total ? `${t.plural(\"{count} edition\", \"{count} editions\", editions, { count: intl.number(editions) })} · ${owners}` : owners;\n\n return (\n <Panel className=\"px-4 py-3 space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground tabular-nums\">{label}</p>\n <div className=\"flex flex-col gap-1.5\">\n {balances.slice(0, MAX_VISIBLE).map((balance) => <OwnerRow key={balance.owner} {...balance} />)}\n {total > MAX_VISIBLE ? (\n <p className=\"text-xs text-muted-foreground/60\">+{t.plural(\"{count} more owner\", \"{count} more owners\", total - MAX_VISIBLE, { count: intl.number(total - MAX_VISIBLE) })}</p>\n ) : null}\n </div>\n </Panel>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BU;AAzBV,kBAAiB;AACjB,6BAA+B;AAC/B,iBAA4B;AAC5B,sBAAqB;AACrB,mBAAsB;AACtB,wBAA0B;AAa1B,MAAM,cAAc;AAEpB,SAAS,SAAS,EAAE,OAAO,OAAO,GAAe;AAC/C,SACE,6CAAC,SAAI,WAAU,2CACb;AAAA,gDAAC,SAAI,WAAU,qCACb,sDAAC,YAAAA,SAAA,EAAK,UAAM,wBAAY,EAAE,SAAS,MAAM,CAAC,GAAG,WAAU,qEACrD,sDAAC,yCAAe,SAAS,OAAO,OAAO,GAAG,UAAU,OAAO,GAC7D,GACF;AAAA,IACA,6CAAC,UAAK,WAAU,uDAAsD;AAAA;AAAA,MAAG;AAAA,OAAO;AAAA,KAClF;AAEJ;AAEO,SAAS,iBAAiB,EAAE,UAAU,QAAQ,SAAS,QAAQ,SAAS,GAA0B;AACvG,QAAM,QAAI,sBAAK;AACf,QAAM,WAAO,6BAAU;AACvB,MAAI,SAAS,WAAW,EAAG,QAAO;AAElC,QAAM,SAAS,EAAE,OAAO,iBAAiB,kBAAkB,OAAO,EAAE,OAAO,KAAK,OAAO,KAAK,EAAE,CAAC;AAC/F,QAAM,QAAQ,YAAY,aAAa,QAAQ,GAAG,EAAE,OAAO,mBAAmB,oBAAoB,UAAU,EAAE,OAAO,KAAK,OAAO,QAAQ,EAAE,CAAC,CAAC,SAAM,MAAM,KAAK;AAE9J,SACE,6CAAC,sBAAM,WAAU,uBACf;AAAA,gDAAC,OAAE,WAAU,6DAA6D,iBAAM;AAAA,IAChF,6CAAC,SAAI,WAAU,yBACZ;AAAA,eAAS,MAAM,GAAG,WAAW,EAAE,IAAI,CAAC,YAAY,4CAAC,YAA8B,GAAG,WAAnB,QAAQ,KAAoB,CAAE;AAAA,MAC7F,QAAQ,cACP,6CAAC,OAAE,WAAU,oCAAmC;AAAA;AAAA,QAAE,EAAE,OAAO,sBAAsB,uBAAuB,QAAQ,aAAa,EAAE,OAAO,KAAK,OAAO,QAAQ,WAAW,EAAE,CAAC;AAAA,SAAE,IACxK;AAAA,OACN;AAAA,KACF;AAEJ;","names":["Link"]}
@@ -4,6 +4,7 @@ import Link from "./link.js";
4
4
  import { AddressDisplay } from "./address-display.js";
5
5
  import { profileHref } from "@medialane/sdk";
6
6
  import { useT } from "../i18n/provider.js";
7
+ import { Panel } from "./panel.js";
7
8
  import { useFormat } from "../i18n/use-format.js";
8
9
  const MAX_VISIBLE = 5;
9
10
  function OwnerRow({ owner, amount }) {
@@ -21,7 +22,7 @@ function AssetOwnersPanel({ balances, total = balances.length, editions }) {
21
22
  if (balances.length === 0) return null;
22
23
  const owners = t.plural("{count} owner", "{count} owners", total, { count: intl.number(total) });
23
24
  const label = editions && editions !== total ? `${t.plural("{count} edition", "{count} editions", editions, { count: intl.number(editions) })} \xB7 ${owners}` : owners;
24
- return /* @__PURE__ */ jsxs("div", { className: "rounded-xl border border-border px-4 py-3 space-y-2", children: [
25
+ return /* @__PURE__ */ jsxs(Panel, { className: "px-4 py-3 space-y-2", children: [
25
26
  /* @__PURE__ */ jsx("p", { className: "text-2xs font-semibold text-muted-foreground tabular-nums", children: label }),
26
27
  /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-1.5", children: [
27
28
  balances.slice(0, MAX_VISIBLE).map((balance) => /* @__PURE__ */ jsx(OwnerRow, { ...balance }, balance.owner)),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-owners-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { profileHref } from \"@medialane/sdk\";\nimport { useT } from \"../i18n/provider.js\";\nimport { useFormat } from \"../i18n/use-format.js\";\n\ninterface HolderLike {\n owner: string;\n amount: string;\n}\n\ninterface AssetOwnersPanelProps {\n balances: HolderLike[];\n total?: number;\n editions?: number;\n}\n\nconst MAX_VISIBLE = 5;\n\nfunction OwnerRow({ owner, amount }: HolderLike) {\n return (\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <Link href={profileHref({ address: owner })} className=\"hover:text-primary transition-colors font-medium text-sm truncate\">\n <AddressDisplay address={owner} chars={6} showCopy={false} />\n </Link>\n </div>\n <span className=\"text-xs text-muted-foreground shrink-0 tabular-nums\">× {amount}</span>\n </div>\n );\n}\n\nexport function AssetOwnersPanel({ balances, total = balances.length, editions }: AssetOwnersPanelProps) {\n const t = useT();\n const intl = useFormat();\n if (balances.length === 0) return null;\n\n const owners = t.plural(\"{count} owner\", \"{count} owners\", total, { count: intl.number(total) });\n const label = editions && editions !== total ? `${t.plural(\"{count} edition\", \"{count} editions\", editions, { count: intl.number(editions) })} · ${owners}` : owners;\n\n return (\n <div className=\"rounded-xl border border-border px-4 py-3 space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground tabular-nums\">{label}</p>\n <div className=\"flex flex-col gap-1.5\">\n {balances.slice(0, MAX_VISIBLE).map((balance) => <OwnerRow key={balance.owner} {...balance} />)}\n {total > MAX_VISIBLE ? (\n <p className=\"text-xs text-muted-foreground/60\">+{t.plural(\"{count} more owner\", \"{count} more owners\", total - MAX_VISIBLE, { count: intl.number(total - MAX_VISIBLE) })}</p>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";AA0BU,cAGJ,YAHI;AAxBV,OA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;AAAA,OACN;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-owners-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"./link.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { profileHref } from \"@medialane/sdk\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Panel } from \"./panel.js\";\nimport { useFormat } from \"../i18n/use-format.js\";\n\ninterface HolderLike {\n owner: string;\n amount: string;\n}\n\ninterface AssetOwnersPanelProps {\n balances: HolderLike[];\n total?: number;\n editions?: number;\n}\n\nconst MAX_VISIBLE = 5;\n\nfunction OwnerRow({ owner, amount }: HolderLike) {\n return (\n <div className=\"flex items-center justify-between gap-2\">\n <div className=\"flex min-w-0 items-center gap-1.5\">\n <Link href={profileHref({ address: owner })} className=\"hover:text-primary transition-colors font-medium text-sm truncate\">\n <AddressDisplay address={owner} chars={6} showCopy={false} />\n </Link>\n </div>\n <span className=\"text-xs text-muted-foreground shrink-0 tabular-nums\">× {amount}</span>\n </div>\n );\n}\n\nexport function AssetOwnersPanel({ balances, total = balances.length, editions }: AssetOwnersPanelProps) {\n const t = useT();\n const intl = useFormat();\n if (balances.length === 0) return null;\n\n const owners = t.plural(\"{count} owner\", \"{count} owners\", total, { count: intl.number(total) });\n const label = editions && editions !== total ? `${t.plural(\"{count} edition\", \"{count} editions\", editions, { count: intl.number(editions) })} · ${owners}` : owners;\n\n return (\n <Panel className=\"px-4 py-3 space-y-2\">\n <p className=\"text-2xs font-semibold text-muted-foreground tabular-nums\">{label}</p>\n <div className=\"flex flex-col gap-1.5\">\n {balances.slice(0, MAX_VISIBLE).map((balance) => <OwnerRow key={balance.owner} {...balance} />)}\n {total > MAX_VISIBLE ? (\n <p className=\"text-xs text-muted-foreground/60\">+{t.plural(\"{count} more owner\", \"{count} more owners\", total - MAX_VISIBLE, { count: intl.number(total - MAX_VISIBLE) })}</p>\n ) : null}\n </div>\n </Panel>\n );\n}\n"],"mappings":";AA2BU,cAGJ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,WAAW,EAAE,CAAC;AAAA,SAAE,IACxK;AAAA,OACN;AAAA,KACF;AAEJ;","names":[]}
@@ -42,6 +42,8 @@ var import_time = require("../utils/time.js");
42
42
  var import_explorer_url = require("../utils/explorer-url.js");
43
43
  var import_lucide_react = require("lucide-react");
44
44
  var import_provider = require("../i18n/provider.js");
45
+ var import_activity = require("../data/activity.js");
46
+ var import_panel = require("./panel.js");
45
47
  var import_translate = require("../i18n/translate.js");
46
48
  var import_use_format = require("../i18n/use-format.js");
47
49
  const PriceHistoryChart = (0, import_dynamic.default)(
@@ -51,13 +53,14 @@ const PriceHistoryChart = (0, import_dynamic.default)(
51
53
  loading: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-48 w-full animate-pulse rounded-xl bg-muted/40" })
52
54
  }
53
55
  );
56
+ const tint = (type) => `${import_activity.ACTIVITY_TYPE_CONFIG[type].bgClass} ${import_activity.ACTIVITY_TYPE_CONFIG[type].colorClass}`;
54
57
  const EVENT_STYLE = {
55
- sale: { label: (0, import_translate.msg)("Sale"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-3.5 w-3.5" }), badgeCls: "bg-emerald-500/15 text-emerald-500 border-emerald-500/20" },
56
- mint: { label: (0, import_translate.msg)("Minted"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle, { className: "h-3.5 w-3.5" }), badgeCls: "bg-teal-500/15 text-teal-500 border-teal-500/20" },
57
- listing: { label: (0, import_translate.msg)("Listed"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-3.5 w-3.5" }), badgeCls: "bg-brand-blue/15 text-brand-blue border-brand-blue/20" },
58
- offer: { label: (0, import_translate.msg)("Offer"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-3.5 w-3.5" }), badgeCls: "bg-amber-500/15 text-amber-500 border-amber-500/20" },
59
- transfer: { label: (0, import_translate.msg)("Transfer"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-3.5 w-3.5" }), badgeCls: "bg-brand-purple/15 text-brand-purple border-brand-purple/20" },
60
- cancelled: { label: (0, import_translate.msg)("Cancelled"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-3.5 w-3.5" }), badgeCls: "bg-red-500/15 text-red-400 border-red-500/20" }
58
+ sale: { label: (0, import_translate.msg)("Sale"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-3.5 w-3.5" }), badgeCls: tint("sale") },
59
+ mint: { label: (0, import_translate.msg)("Minted"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.CheckCircle, { className: "h-3.5 w-3.5" }), badgeCls: tint("mint") },
60
+ listing: { label: (0, import_translate.msg)("Listed"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-3.5 w-3.5" }), badgeCls: tint("listing") },
61
+ offer: { label: (0, import_translate.msg)("Offer"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-3.5 w-3.5" }), badgeCls: tint("offer") },
62
+ transfer: { label: (0, import_translate.msg)("Transfer"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-3.5 w-3.5" }), badgeCls: tint("transfer") },
63
+ cancelled: { label: (0, import_translate.msg)("Cancelled"), icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-3.5 w-3.5" }), badgeCls: tint("cancelled") }
61
64
  };
62
65
  function AssetProvenanceTab({
63
66
  history,
@@ -85,7 +88,7 @@ function AssetProvenanceTab({
85
88
  );
86
89
  const firstEvent = history[history.length - 1];
87
90
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "mt-4 space-y-6", children: [
88
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 rounded-lg bg-primary/5 px-4 py-2.5", children: [
91
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_panel.Panel, { tone: ["blue", "purple"], className: "flex items-center gap-2 px-4 py-2.5", children: [
89
92
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Fingerprint, { className: "h-4 w-4 text-primary shrink-0" }),
90
93
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0", children: [
91
94
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-semibold text-primary", children: t("Onchain provenance") }),
@@ -152,7 +155,7 @@ function AssetProvenanceTab({
152
155
  const style = EVENT_STYLE[event.type] ?? {
153
156
  label: event.type,
154
157
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Activity, { className: "h-3.5 w-3.5" }),
155
- badgeCls: "bg-muted/60 text-muted-foreground border-border"
158
+ badgeCls: "bg-muted/60 text-muted-foreground"
156
159
  };
157
160
  const actor = event.offerer ?? event.from ?? "";
158
161
  const toAddr = event.to;
@@ -161,15 +164,15 @@ function AssetProvenanceTab({
161
164
  const txLink = event.txHash ? `${import_explorer_url.EXPLORER_URL}/tx/${event.txHash}` : null;
162
165
  const voyagerActor = actor ? `${import_explorer_url.EXPLORER_URL}/contract/${actor}` : null;
163
166
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative flex gap-4 group", children: [
164
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `relative z-10 h-10 w-10 rounded-full border flex items-center justify-center shrink-0 mt-1 transition-colors group-hover:border-primary/50 ${style.badgeCls}`, children: style.icon }),
167
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `relative z-10 h-10 w-10 rounded-full flex items-center justify-center shrink-0 mt-1 ${style.badgeCls}`, children: style.icon }),
165
168
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
166
- "div",
169
+ import_panel.Panel,
167
170
  {
168
- className: `flex-1 min-w-0 rounded-xl bg-card/40 px-3 py-2.5 transition-colors group-hover:bg-card/60 ${txLink ? "cursor-pointer" : ""}`,
171
+ className: `flex-1 min-w-0 px-3 py-2.5 transition-colors group-hover:bg-background/40 ${txLink ? "cursor-pointer" : ""}`,
169
172
  onClick: () => txLink && window.open(txLink, "_blank", "noopener,noreferrer"),
170
173
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
171
174
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2 flex-wrap", children: [
172
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `inline-flex items-center gap-1 text-xs font-semibold px-2 py-0.5 rounded-full border ${style.badgeCls}`, children: [
175
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `inline-flex items-center gap-1 text-xs font-semibold px-2 py-0.5 rounded-full ${style.badgeCls}`, children: [
173
176
  style.icon,
174
177
  t(style.label)
175
178
  ] }),