@medialane/ui 0.204.0 → 0.205.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) 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/button.d.cts +2 -2
  4. package/dist/components/button.d.ts +2 -2
  5. package/dist/components/collection-filters-dialog.cjs +24 -2
  6. package/dist/components/collection-filters-dialog.cjs.map +1 -1
  7. package/dist/components/collection-filters-dialog.d.cts +4 -2
  8. package/dist/components/collection-filters-dialog.d.ts +4 -2
  9. package/dist/components/collection-filters-dialog.js +23 -2
  10. package/dist/components/collection-filters-dialog.js.map +1 -1
  11. package/dist/components/collection-filters.cjs +44 -39
  12. package/dist/components/collection-filters.cjs.map +1 -1
  13. package/dist/components/collection-filters.d.cts +3 -1
  14. package/dist/components/collection-filters.d.ts +3 -1
  15. package/dist/components/collection-filters.js +44 -39
  16. package/dist/components/collection-filters.js.map +1 -1
  17. package/dist/components/collection-header.cjs +3 -17
  18. package/dist/components/collection-header.cjs.map +1 -1
  19. package/dist/components/collection-header.d.cts +1 -2
  20. package/dist/components/collection-header.d.ts +1 -2
  21. package/dist/components/collection-header.js +3 -17
  22. package/dist/components/collection-header.js.map +1 -1
  23. package/dist/components/collection-more-menu.cjs +74 -0
  24. package/dist/components/collection-more-menu.cjs.map +1 -0
  25. package/dist/components/collection-more-menu.d.cts +9 -0
  26. package/dist/components/collection-more-menu.d.ts +9 -0
  27. package/dist/components/collection-more-menu.js +50 -0
  28. package/dist/components/collection-more-menu.js.map +1 -0
  29. package/dist/components/collection-page.cjs +46 -34
  30. package/dist/components/collection-page.cjs.map +1 -1
  31. package/dist/components/collection-page.js +48 -36
  32. package/dist/components/collection-page.js.map +1 -1
  33. package/dist/components/share-button.cjs +2 -8
  34. package/dist/components/share-button.cjs.map +1 -1
  35. package/dist/components/share-button.js +2 -8
  36. package/dist/components/share-button.js.map +1 -1
  37. package/dist/utils/share.cjs +42 -0
  38. package/dist/utils/share.cjs.map +1 -0
  39. package/dist/utils/share.d.cts +3 -0
  40. package/dist/utils/share.d.ts +3 -0
  41. package/dist/utils/share.js +18 -0
  42. package/dist/utils/share.js.map +1 -0
  43. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/collection-filters.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo } from \"react\";\nimport { SlidersHorizontal, X, Check } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiToken, CollectionTokensSort } from \"@medialane/sdk\";\n\nconst EXCLUDED_TRAIT_TYPES = new Set([\"registration\"]);\n\nexport const SORT_OPTIONS: { value: CollectionTokensSort; label: string }[] = [\n { value: \"recent\", label: \"Recent\" },\n { value: \"oldest\", label: \"Oldest\" },\n { value: \"name\", label: \"Name\" },\n { value: \"price\", label: \"Price\" },\n];\n\nexport interface TraitSection {\n traitType: string;\n values: { value: string; count: number }[];\n}\n\nexport function useCollectionFilters(\n tokens: ApiToken[],\n selected: Record<string, string[]>,\n onChange: (filters: Record<string, string[]>) => void,\n sort: CollectionTokensSort,\n onSortChange: (sort: CollectionTokensSort) => void,\n) {\n\n const traitSections: TraitSection[] = useMemo(() => {\n const map = new Map<string, Map<string, number>>();\n for (const token of tokens) {\n const attrs = Array.isArray(token.metadata?.attributes)\n ? (token.metadata.attributes as { trait_type?: string; value?: string }[])\n : [];\n for (const attr of attrs) {\n if (!attr.trait_type || attr.value == null) continue;\n if (EXCLUDED_TRAIT_TYPES.has(attr.trait_type.toLowerCase())) continue;\n if (!map.has(attr.trait_type)) map.set(attr.trait_type, new Map());\n const counts = map.get(attr.trait_type)!;\n const v = String(attr.value);\n counts.set(v, (counts.get(v) ?? 0) + 1);\n }\n }\n return Array.from(map.entries())\n .map(([traitType, counts]) => ({\n traitType,\n values: Array.from(counts.entries())\n .map(([value, count]) => ({ value, count }))\n .sort((a, b) => b.count - a.count || a.value.localeCompare(b.value)),\n }))\n .filter((section) => section.values.length >= 2);\n }, [tokens]);\n\n const activeEntries = Object.entries(selected).flatMap(([traitType, values]) =>\n values.map((value) => ({ traitType, value }))\n );\n const traitActiveCount = activeEntries.length;\n const sortIsDefault = sort === \"recent\";\n const totalActiveCount = traitActiveCount + (sortIsDefault ? 0 : 1);\n\n function toggleValue(traitType: string, value: string) {\n const current = selected[traitType] ?? [];\n const next = current.includes(value)\n ? current.filter((v) => v !== value)\n : [...current, value];\n const nextSelected = { ...selected };\n if (next.length === 0) {\n delete nextSelected[traitType];\n } else {\n nextSelected[traitType] = next;\n }\n onChange(nextSelected);\n }\n\n function clearAll() {\n onChange({});\n onSortChange(\"recent\");\n }\n\n function removeFilter(traitType: string, value: string) {\n toggleValue(traitType, value);\n }\n\n return { traitSections, activeEntries, totalActiveCount, sortIsDefault, toggleValue, clearAll, removeFilter };\n}\n\nconst TRIGGER_BTN = \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 px-3 shrink-0\";\n\nexport interface CollectionFiltersTriggerProps {\n totalActiveCount: number;\n sortIsDefault: boolean;\n sort: CollectionTokensSort;\n activeEntries: { traitType: string; value: string }[];\n onOpen: () => void;\n onSortReset: () => void;\n onRemoveFilter: (traitType: string, value: string) => void;\n onClearAll: () => void;\n}\n\nexport function CollectionFiltersTrigger({\n totalActiveCount,\n sortIsDefault,\n sort,\n activeEntries,\n onOpen,\n onSortReset,\n onRemoveFilter,\n onClearAll,\n}: CollectionFiltersTriggerProps) {\n return (\n <div className=\"flex items-center justify-end gap-2 flex-wrap\">\n <button onClick={onOpen} className={TRIGGER_BTN}>\n <SlidersHorizontal className=\"h-3.5 w-3.5\" />\n Filters\n {totalActiveCount > 0 && (\n <span className=\"h-4 min-w-4 rounded-full bg-primary text-2xs font-bold text-primary-foreground flex items-center justify-center px-1 -mr-1\">\n {totalActiveCount}\n </span>\n )}\n </button>\n\n {!sortIsDefault && (\n <button\n onClick={onSortReset}\n className=\"inline-flex items-center gap-1 h-8 px-2.5 rounded-md border border-primary/40 bg-primary/10 text-xs font-medium text-foreground hover:bg-primary/20 transition-colors\"\n >\n <span className=\"text-muted-foreground text-2xs\">Sort:</span>\n <span>{SORT_OPTIONS.find((o) => o.value === sort)?.label}</span>\n <X className=\"h-3 w-3 text-muted-foreground ml-0.5\" />\n </button>\n )}\n\n {activeEntries.map(({ traitType, value }) => (\n <button\n key={`${traitType}:${value}`}\n onClick={() => onRemoveFilter(traitType, value)}\n className=\"inline-flex items-center gap-1 h-8 px-2.5 rounded-md border border-primary/40 bg-primary/10 text-xs font-medium text-foreground hover:bg-primary/20 transition-colors\"\n >\n <span className=\"text-muted-foreground text-2xs\">{traitType}:</span>\n <span>{value}</span>\n <X className=\"h-3 w-3 text-muted-foreground ml-0.5\" />\n </button>\n ))}\n\n {totalActiveCount > 1 && (\n <button\n onClick={onClearAll}\n className=\"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline transition-colors\"\n >\n Clear all\n </button>\n )}\n </div>\n );\n}\n\nexport interface CollectionFiltersBodyProps {\n sort: CollectionTokensSort;\n onSortChange: (sort: CollectionTokensSort) => void;\n traitSections: TraitSection[];\n selected: Record<string, string[]>;\n onToggleValue: (traitType: string, value: string) => void;\n}\n\nconst PILL_BASE = \"inline-flex items-center gap-1 h-7 px-2.5 rounded-full border text-xs font-medium transition-colors\";\nconst PILL_ON = \"border-primary bg-primary text-primary-foreground\";\nconst PILL_OFF = \"border-border bg-transparent text-muted-foreground hover:text-foreground hover:border-foreground/30\";\n\nexport function CollectionFiltersBody({\n sort,\n onSortChange,\n traitSections,\n selected,\n onToggleValue,\n}: CollectionFiltersBodyProps) {\n return (\n <div className=\"flex-1 overflow-y-auto px-5 py-3 space-y-4\">\n\n <div>\n <div className=\"mb-2\">\n <span className=\"text-sm font-medium\">Sort by</span>\n </div>\n <div className=\"flex flex-wrap gap-1.5\">\n {SORT_OPTIONS.map(({ value, label }) => {\n const isSelected = sort === value;\n return (\n <button\n key={value}\n onClick={() => onSortChange(value)}\n className={cn(PILL_BASE, isSelected ? PILL_ON : PILL_OFF)}\n >\n {isSelected && <Check className=\"h-3 w-3\" />}\n <span>{label}</span>\n </button>\n );\n })}\n </div>\n </div>\n\n {traitSections.length > 0 && (\n <>\n <div className=\"h-px w-full bg-border\" />\n {traitSections.map((section, i) => {\n const activeValues = selected[section.traitType] ?? [];\n return (\n <div key={section.traitType}>\n {i > 0 && <div className=\"h-px w-full bg-border mb-4\" />}\n <div className=\"flex items-center justify-between mb-2\">\n <span className=\"text-sm font-medium\">{section.traitType}</span>\n <span className=\"text-2xs text-muted-foreground\">\n {section.values.length} values\n </span>\n </div>\n <div className=\"flex flex-wrap gap-1.5\">\n {section.values.map(({ value, count }) => {\n const isSelected = activeValues.includes(value);\n return (\n <button\n key={value}\n onClick={() => onToggleValue(section.traitType, value)}\n className={cn(PILL_BASE, isSelected ? PILL_ON : PILL_OFF)}\n >\n {isSelected && <Check className=\"h-3 w-3\" />}\n <span>{value}</span>\n <span className={isSelected ? \"opacity-80\" : \"opacity-60\"}>\n {count}\n </span>\n </button>\n );\n })}\n </div>\n </div>\n );\n })}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";AAgHM,SAyFE,UAxFA,KADF;AA9GN,SAAS,eAAe;AACxB,SAAS,mBAAmB,GAAG,aAAa;AAC5C,SAAS,UAAU;AAGnB,MAAM,uBAAuB,oBAAI,IAAI,CAAC,cAAc,CAAC;AAE9C,MAAM,eAAiE;AAAA,EAC5E,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EACnC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EACnC,EAAE,OAAO,QAAQ,OAAO,OAAO;AAAA,EAC/B,EAAE,OAAO,SAAS,OAAO,QAAQ;AACnC;AAOO,SAAS,qBACd,QACA,UACA,UACA,MACA,cACA;AAEA,QAAM,gBAAgC,QAAQ,MAAM;AAClD,UAAM,MAAM,oBAAI,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A,UACtD,qBAAC,SAAI,WAAU,0CACb;AAAA,gCAAC,UAAK,WAAU,uBAAuB,kBAAQ,WAAU;AAAA,YACzD,qBAAC,UAAK,WAAU,kCACb;AAAA,sBAAQ,OAAO;AAAA,cAAO;AAAA,eACzB;AAAA,aACF;AAAA,UACA,oBAAC,SAAI,WAAU,0BACZ,kBAAQ,OAAO,IAAI,CAAC,EAAE,OAAO,MAAM,MAAM;AACxC,kBAAM,aAAa,aAAa,SAAS,KAAK;AAC9C,mBACE;AAAA,cAAC;AAAA;AAAA,gBAEC,SAAS,MAAM,cAAc,QAAQ,WAAW,KAAK;AAAA,gBACrD,WAAW,GAAG,WAAW,aAAa,UAAU,QAAQ;AAAA,gBAEvD;AAAA,gCAAc,oBAAC,SAAM,WAAU,WAAU;AAAA,kBAC1C,oBAAC,UAAM,iBAAM;AAAA,kBACb,oBAAC,UAAK,WAAW,aAAa,eAAe,cAC1C,iBACH;AAAA;AAAA;AAAA,cARK;AAAA,YASP;AAAA,UAEJ,CAAC,GACH;AAAA,aAzBQ,QAAQ,SA0BlB;AAAA,MAEJ,CAAC;AAAA,OACH;AAAA,KAEJ;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/collection-filters.tsx"],"sourcesContent":["\"use client\";\n\nimport { useMemo } from \"react\";\nimport { SlidersHorizontal, X, Check } from \"lucide-react\";\nimport { cn } from \"../utils/cn.js\";\nimport type { ApiToken, CollectionTokensSort } from \"@medialane/sdk\";\n\nconst EXCLUDED_TRAIT_TYPES = new Set([\"registration\"]);\n\nexport const SORT_OPTIONS: { value: CollectionTokensSort; label: string }[] = [\n { value: \"recent\", label: \"Recent\" },\n { value: \"oldest\", label: \"Oldest\" },\n { value: \"name\", label: \"Name\" },\n { value: \"price\", label: \"Price\" },\n];\n\nexport interface TraitSection {\n traitType: string;\n values: { value: string; count: number }[];\n}\n\nexport function useCollectionFilters(\n tokens: ApiToken[],\n selected: Record<string, string[]>,\n onChange: (filters: Record<string, string[]>) => void,\n sort: CollectionTokensSort,\n onSortChange: (sort: CollectionTokensSort) => void,\n) {\n\n const traitSections: TraitSection[] = useMemo(() => {\n const map = new Map<string, Map<string, number>>();\n for (const token of tokens) {\n const attrs = Array.isArray(token.metadata?.attributes)\n ? (token.metadata.attributes as { trait_type?: string; value?: string }[])\n : [];\n for (const attr of attrs) {\n if (!attr.trait_type || attr.value == null) continue;\n if (EXCLUDED_TRAIT_TYPES.has(attr.trait_type.toLowerCase())) continue;\n if (!map.has(attr.trait_type)) map.set(attr.trait_type, new Map());\n const counts = map.get(attr.trait_type)!;\n const v = String(attr.value);\n counts.set(v, (counts.get(v) ?? 0) + 1);\n }\n }\n return Array.from(map.entries())\n .map(([traitType, counts]) => ({\n traitType,\n values: Array.from(counts.entries())\n .map(([value, count]) => ({ value, count }))\n .sort((a, b) => b.count - a.count || a.value.localeCompare(b.value)),\n }))\n .filter((section) => section.values.length >= 2);\n }, [tokens]);\n\n const activeEntries = Object.entries(selected).flatMap(([traitType, values]) =>\n values.map((value) => ({ traitType, value }))\n );\n const traitActiveCount = activeEntries.length;\n const sortIsDefault = sort === \"recent\";\n const totalActiveCount = traitActiveCount + (sortIsDefault ? 0 : 1);\n\n function toggleValue(traitType: string, value: string) {\n const current = selected[traitType] ?? [];\n const next = current.includes(value)\n ? current.filter((v) => v !== value)\n : [...current, value];\n const nextSelected = { ...selected };\n if (next.length === 0) {\n delete nextSelected[traitType];\n } else {\n nextSelected[traitType] = next;\n }\n onChange(nextSelected);\n }\n\n function clearAll() {\n onChange({});\n onSortChange(\"recent\");\n }\n\n function removeFilter(traitType: string, value: string) {\n toggleValue(traitType, value);\n }\n\n return { traitSections, activeEntries, totalActiveCount, sortIsDefault, toggleValue, clearAll, removeFilter };\n}\n\nconst TRIGGER_BTN = \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md border border-input bg-background text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground h-8 px-3 shrink-0\";\n\nexport interface CollectionFiltersTriggerProps {\n totalActiveCount: number;\n sortIsDefault: boolean;\n sort: CollectionTokensSort;\n activeEntries: { traitType: string; value: string }[];\n onOpen: () => void;\n onSortReset: () => void;\n onRemoveFilter: (traitType: string, value: string) => void;\n onClearAll: () => void;\n showButton?: boolean;\n showChips?: boolean;\n}\n\nexport function CollectionFiltersTrigger({\n totalActiveCount,\n sortIsDefault,\n sort,\n activeEntries,\n onOpen,\n onSortReset,\n onRemoveFilter,\n onClearAll,\n showButton = true,\n showChips = true,\n}: CollectionFiltersTriggerProps) {\n if (!showButton && (!showChips || (sortIsDefault && activeEntries.length === 0))) return null;\n return (\n <div className=\"flex items-center justify-end gap-2 flex-wrap\">\n {showButton && (\n <button onClick={onOpen} className={TRIGGER_BTN} aria-label=\"Filters\">\n <SlidersHorizontal className=\"h-3.5 w-3.5\" />\n <span className=\"hidden sm:inline\">Filters</span>\n {totalActiveCount > 0 && (\n <span className=\"h-4 min-w-4 rounded-full bg-primary text-2xs font-bold text-primary-foreground flex items-center justify-center px-1 -mr-1\">\n {totalActiveCount}\n </span>\n )}\n </button>\n )}\n {showChips && (\n <>\n\n {!sortIsDefault && (\n <button\n onClick={onSortReset}\n className=\"inline-flex items-center gap-1 h-8 px-2.5 rounded-md border border-primary/40 bg-primary/10 text-xs font-medium text-foreground hover:bg-primary/20 transition-colors\"\n >\n <span className=\"text-muted-foreground text-2xs\">Sort:</span>\n <span>{SORT_OPTIONS.find((o) => o.value === sort)?.label}</span>\n <X className=\"h-3 w-3 text-muted-foreground ml-0.5\" />\n </button>\n )}\n\n {activeEntries.map(({ traitType, value }) => (\n <button\n key={`${traitType}:${value}`}\n onClick={() => onRemoveFilter(traitType, value)}\n className=\"inline-flex items-center gap-1 h-8 px-2.5 rounded-md border border-primary/40 bg-primary/10 text-xs font-medium text-foreground hover:bg-primary/20 transition-colors\"\n >\n <span className=\"text-muted-foreground text-2xs\">{traitType}:</span>\n <span>{value}</span>\n <X className=\"h-3 w-3 text-muted-foreground ml-0.5\" />\n </button>\n ))}\n\n {totalActiveCount > 1 && (\n <button\n onClick={onClearAll}\n className=\"text-xs text-muted-foreground hover:text-foreground underline-offset-2 hover:underline transition-colors\"\n >\n Clear all\n </button>\n )}\n </>\n )}\n </div>\n );\n}\n\nexport interface CollectionFiltersBodyProps {\n sort: CollectionTokensSort;\n onSortChange: (sort: CollectionTokensSort) => void;\n traitSections: TraitSection[];\n selected: Record<string, string[]>;\n onToggleValue: (traitType: string, value: string) => void;\n}\n\nconst PILL_BASE = \"inline-flex items-center gap-1 h-7 px-2.5 rounded-full border text-xs font-medium transition-colors\";\nconst PILL_ON = \"border-primary bg-primary text-primary-foreground\";\nconst PILL_OFF = \"border-border bg-transparent text-muted-foreground hover:text-foreground hover:border-foreground/30\";\n\nexport function CollectionFiltersBody({\n sort,\n onSortChange,\n traitSections,\n selected,\n onToggleValue,\n}: CollectionFiltersBodyProps) {\n return (\n <div className=\"flex-1 overflow-y-auto px-5 py-3 space-y-4\">\n\n <div>\n <div className=\"mb-2\">\n <span className=\"text-sm font-medium\">Sort by</span>\n </div>\n <div className=\"flex flex-wrap gap-1.5\">\n {SORT_OPTIONS.map(({ value, label }) => {\n const isSelected = sort === value;\n return (\n <button\n key={value}\n onClick={() => onSortChange(value)}\n className={cn(PILL_BASE, isSelected ? PILL_ON : PILL_OFF)}\n >\n {isSelected && <Check className=\"h-3 w-3\" />}\n <span>{label}</span>\n </button>\n );\n })}\n </div>\n </div>\n\n {traitSections.length > 0 && (\n <>\n <div className=\"h-px w-full bg-border\" />\n {traitSections.map((section, i) => {\n const activeValues = selected[section.traitType] ?? [];\n return (\n <div key={section.traitType}>\n {i > 0 && <div className=\"h-px w-full bg-border mb-4\" />}\n <div className=\"flex items-center justify-between mb-2\">\n <span className=\"text-sm font-medium\">{section.traitType}</span>\n <span className=\"text-2xs text-muted-foreground\">\n {section.values.length} values\n </span>\n </div>\n <div className=\"flex flex-wrap gap-1.5\">\n {section.values.map(({ value, count }) => {\n const isSelected = activeValues.includes(value);\n return (\n <button\n key={value}\n onClick={() => onToggleValue(section.traitType, value)}\n className={cn(PILL_BASE, isSelected ? PILL_ON : PILL_OFF)}\n >\n {isSelected && <Check className=\"h-3 w-3\" />}\n <span>{value}</span>\n <span className={isSelected ? \"opacity-80\" : \"opacity-60\"}>\n {count}\n </span>\n </button>\n );\n })}\n </div>\n </div>\n );\n })}\n </>\n )}\n </div>\n );\n}\n"],"mappings":";AAsHQ,SAWA,UAVE,KADF;AApHR,SAAS,eAAe;AACxB,SAAS,mBAAmB,GAAG,aAAa;AAC5C,SAAS,UAAU;AAGnB,MAAM,uBAAuB,oBAAI,IAAI,CAAC,cAAc,CAAC;AAE9C,MAAM,eAAiE;AAAA,EAC5E,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EACnC,EAAE,OAAO,UAAU,OAAO,SAAS;AAAA,EACnC,EAAE,OAAO,QAAQ,OAAO,OAAO;AAAA,EAC/B,EAAE,OAAO,SAAS,OAAO,QAAQ;AACnC;AAOO,SAAS,qBACd,QACA,UACA,UACA,MACA,cACA;AAEA,QAAM,gBAAgC,QAAQ,MAAM;AAClD,UAAM,MAAM,oBAAI,IAAiC;AACjD,eAAW,SAAS,QAAQ;AAC1B,YAAM,QAAQ,MAAM,QAAQ,MAAM,UAAU,UAAU,IACjD,MAAM,SAAS,aAChB,CAAC;AACL,iBAAW,QAAQ,OAAO;AACxB,YAAI,CAAC,KAAK,cAAc,KAAK,SAAS,KAAM;AAC5C,YAAI,qBAAqB,IAAI,KAAK,WAAW,YAAY,CAAC,EAAG;AAC7D,YAAI,CAAC,IAAI,IAAI,KAAK,UAAU,EAAG,KAAI,IAAI,KAAK,YAAY,oBAAI,IAAI,CAAC;AACjE,cAAM,SAAS,IAAI,IAAI,KAAK,UAAU;AACtC,cAAM,IAAI,OAAO,KAAK,KAAK;AAC3B,eAAO,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,CAAC;AAAA,MACxC;AAAA,IACF;AACA,WAAO,MAAM,KAAK,IAAI,QAAQ,C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AAM,cAAc,QAAQ,WAAW,KAAK;AAAA,gBACrD,WAAW,GAAG,WAAW,aAAa,UAAU,QAAQ;AAAA,gBAEvD;AAAA,gCAAc,oBAAC,SAAM,WAAU,WAAU;AAAA,kBAC1C,oBAAC,UAAM,iBAAM;AAAA,kBACb,oBAAC,UAAK,WAAW,aAAa,eAAe,cAC1C,iBACH;AAAA;AAAA;AAAA,cARK;AAAA,YASP;AAAA,UAEJ,CAAC,GACH;AAAA,aAzBQ,QAAQ,SA0BlB;AAAA,MAEJ,CAAC;AAAA,OACH;AAAA,KAEJ;AAEJ;","names":[]}
@@ -26,12 +26,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
26
26
  var import_lucide_react = require("lucide-react");
27
27
  var import_asset_top_sections = require("./asset-top-sections.js");
28
28
  var import_media_header = require("./media-header.js");
29
- var import_asset_utility_icons = require("./asset-utility-icons.js");
30
- var import_address_display = require("./address-display.js");
31
29
  var import_creator_chip = require("./creator-chip.js");
32
30
  var import_currency_icon = require("./currency-icon.js");
33
31
  var import_format = require("../utils/format.js");
34
- var import_explorer_url = require("../utils/explorer-url.js");
35
32
  var import_use_image_url = require("../utils/use-image-url.js");
36
33
  const CHIP = "text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground";
37
34
  function PriceStat({ label, raw }) {
@@ -39,7 +36,7 @@ function PriceStat({ label, raw }) {
39
36
  if (!symbol || numStr === "\u2014") return null;
40
37
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_media_header.HeaderStat, { label, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyAmount, { amount: numStr, symbol, iconSize: 12 }) });
41
38
  }
42
- function CollectionHeader({ collection, loading = false, onReportClick, children }) {
39
+ function CollectionHeader({ collection, loading = false, children }) {
43
40
  const resolveImage = (0, import_use_image_url.useImageUrl)();
44
41
  const image = resolveImage(collection?.image);
45
42
  const name = collection?.name ?? "Unnamed Collection";
@@ -50,7 +47,7 @@ function CollectionHeader({ collection, loading = false, onReportClick, children
50
47
  name,
51
48
  description: collection.description,
52
49
  badges: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
53
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: CHIP, children: collection.standard === "ERC1155" ? "Multi-edition" : "Single NFT" }),
50
+ collection.standard === "ERC1155" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: CHIP, children: "Multi-edition" }) : null,
54
51
  collection.symbol ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: CHIP, children: collection.symbol }) : null
55
52
  ] })
56
53
  }
@@ -61,18 +58,7 @@ function CollectionHeader({ collection, loading = false, onReportClick, children
61
58
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PriceStat, { label: "Floor", raw: collection.floorPrice }),
62
59
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PriceStat, { label: "Volume", raw: collection.totalVolume })
63
60
  ] }),
64
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
65
- collection.owner ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_creator_chip.CreatorChip, { address: collection.owner }) : null,
66
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_address_display.AddressDisplay, { address: collection.contractAddress, chars: 6, className: "text-xs text-muted-foreground" })
67
- ] }),
68
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "-ml-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
69
- import_asset_utility_icons.AssetUtilityIcons,
70
- {
71
- contractExplorerHref: `${import_explorer_url.EXPLORER_URL}/contract/${collection.contractAddress}`,
72
- shareTitle: name,
73
- onReportClick
74
- }
75
- ) }),
61
+ collection.owner ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_creator_chip.CreatorChip, { address: collection.owner }) : null,
76
62
  children
77
63
  ] }) : null });
78
64
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/collection-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Layers } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AssetUtilityIcons } from \"./asset-utility-icons.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorChip } from \"./creator-chip.js\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nconst CHIP = \"text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground\";\n\nexport interface CollectionHeaderProps {\n collection: ApiCollection | null | undefined;\n loading?: boolean;\n onReportClick: () => void;\n children?: ReactNode;\n}\n\nfunction PriceStat({ label, raw }: { label: string; raw: string | null }) {\n const { numStr, symbol } = parsePriceDisplay(raw);\n if (!symbol || numStr === \"—\") return null;\n return (\n <HeaderStat label={label}>\n <CurrencyAmount amount={numStr} symbol={symbol} iconSize={12} />\n </HeaderStat>\n );\n}\n\nexport function CollectionHeader({ collection, loading = false, onReportClick, children }: CollectionHeaderProps) {\n const resolveImage = useImageUrl();\n const image = resolveImage(collection?.image);\n const name = collection?.name ?? \"Unnamed Collection\";\n\n return (\n <MediaHeader image={image} imageAlt={name} fallbackIcon={Layers} loading={loading || !collection}>\n {collection ? (\n <>\n <AssetHeaderBlock\n name={name}\n description={collection.description}\n badges={(\n <>\n <span className={CHIP}>{collection.standard === \"ERC1155\" ? \"Multi-edition\" : \"Single NFT\"}</span>\n {collection.symbol ? <span className={CHIP}>{collection.symbol}</span> : null}\n </>\n )}\n />\n\n <HeaderStats>\n {collection.totalSupply != null ? <HeaderStat label=\"Items\">{collection.totalSupply.toLocaleString()}</HeaderStat> : null}\n {collection.holderCount != null ? <HeaderStat label=\"Holders\">{collection.holderCount.toLocaleString()}</HeaderStat> : null}\n <PriceStat label=\"Floor\" raw={collection.floorPrice} />\n <PriceStat label=\"Volume\" raw={collection.totalVolume} />\n </HeaderStats>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n {collection.owner ? <CreatorChip address={collection.owner} /> : null}\n <AddressDisplay address={collection.contractAddress} chars={6} className=\"text-xs text-muted-foreground\" />\n </div>\n\n <div className=\"-ml-3\">\n <AssetUtilityIcons\n contractExplorerHref={`${EXPLORER_URL}/contract/${collection.contractAddress}`}\n shareTitle={name}\n onReportClick={onReportClick}\n />\n </div>\n\n {children}\n </>\n ) : null}\n </MediaHeader>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BM;AA1BN,0BAAuB;AAEvB,gCAAiC;AACjC,0BAAqD;AACrD,iCAAkC;AAClC,6BAA+B;AAC/B,0BAA4B;AAC5B,2BAA+B;AAC/B,oBAAkC;AAClC,0BAA6B;AAC7B,2BAA4B;AAE5B,MAAM,OAAO;AASb,SAAS,UAAU,EAAE,OAAO,IAAI,GAA0C;AACxE,QAAM,EAAE,QAAQ,OAAO,QAAI,iCAAkB,GAAG;AAChD,MAAI,CAAC,UAAU,WAAW,SAAK,QAAO;AACtC,SACE,4CAAC,kCAAW,OACV,sDAAC,uCAAe,QAAQ,QAAQ,QAAgB,UAAU,IAAI,GAChE;AAEJ;AAEO,SAAS,iBAAiB,EAAE,YAAY,UAAU,OAAO,eAAe,SAAS,GAA0B;AAChH,QAAM,mBAAe,kCAAY;AACjC,QAAM,QAAQ,aAAa,YAAY,KAAK;AAC5C,QAAM,OAAO,YAAY,QAAQ;AAEjC,SACE,4CAAC,mCAAY,OAAc,UAAU,MAAM,cAAc,4BAAQ,SAAS,WAAW,CAAC,YACnF,uBACC,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,aAAa,WAAW;AAAA,QACxB,QACE,4EACE;AAAA,sDAAC,UAAK,WAAW,MAAO,qBAAW,aAAa,YAAY,kBAAkB,cAAa;AAAA,UAC1F,WAAW,SAAS,4CAAC,UAAK,WAAW,MAAO,qBAAW,QAAO,IAAU;AAAA,WAC3E;AAAA;AAAA,IAEJ;AAAA,IAEA,6CAAC,mCACE;AAAA,iBAAW,eAAe,OAAO,4CAAC,kCAAW,OAAM,SAAS,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACpH,WAAW,eAAe,OAAO,4CAAC,kCAAW,OAAM,WAAW,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACvH,4CAAC,aAAU,OAAM,SAAQ,KAAK,WAAW,YAAY;AAAA,MACrD,4CAAC,aAAU,OAAM,UAAS,KAAK,WAAW,aAAa;AAAA,OACzD;AAAA,IAEA,6CAAC,SAAI,WAAU,qCACZ;AAAA,iBAAW,QAAQ,4CAAC,mCAAY,SAAS,WAAW,OAAO,IAAK;AAAA,MACjE,4CAAC,yCAAe,SAAS,WAAW,iBAAiB,OAAO,GAAG,WAAU,iCAAgC;AAAA,OAC3G;AAAA,IAEA,4CAAC,SAAI,WAAU,SACb;AAAA,MAAC;AAAA;AAAA,QACC,sBAAsB,GAAG,gCAAY,aAAa,WAAW,eAAe;AAAA,QAC5E,YAAY;AAAA,QACZ;AAAA;AAAA,IACF,GACF;AAAA,IAEC;AAAA,KACH,IACE,MACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/collection-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Layers } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { CreatorChip } from \"./creator-chip.js\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nconst CHIP = \"text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground\";\n\nexport interface CollectionHeaderProps {\n collection: ApiCollection | null | undefined;\n loading?: boolean;\n children?: ReactNode;\n}\n\nfunction PriceStat({ label, raw }: { label: string; raw: string | null }) {\n const { numStr, symbol } = parsePriceDisplay(raw);\n if (!symbol || numStr === \"—\") return null;\n return (\n <HeaderStat label={label}>\n <CurrencyAmount amount={numStr} symbol={symbol} iconSize={12} />\n </HeaderStat>\n );\n}\n\nexport function CollectionHeader({ collection, loading = false, children }: CollectionHeaderProps) {\n const resolveImage = useImageUrl();\n const image = resolveImage(collection?.image);\n const name = collection?.name ?? \"Unnamed Collection\";\n\n return (\n <MediaHeader image={image} imageAlt={name} fallbackIcon={Layers} loading={loading || !collection}>\n {collection ? (\n <>\n <AssetHeaderBlock\n name={name}\n description={collection.description}\n badges={(\n <>\n {collection.standard === \"ERC1155\" ? <span className={CHIP}>Multi-edition</span> : null}\n {collection.symbol ? <span className={CHIP}>{collection.symbol}</span> : null}\n </>\n )}\n />\n\n <HeaderStats>\n {collection.totalSupply != null ? <HeaderStat label=\"Items\">{collection.totalSupply.toLocaleString()}</HeaderStat> : null}\n {collection.holderCount != null ? <HeaderStat label=\"Holders\">{collection.holderCount.toLocaleString()}</HeaderStat> : null}\n <PriceStat label=\"Floor\" raw={collection.floorPrice} />\n <PriceStat label=\"Volume\" raw={collection.totalVolume} />\n </HeaderStats>\n\n {collection.owner ? <CreatorChip address={collection.owner} /> : null}\n\n {children}\n </>\n ) : null}\n </MediaHeader>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBM;AAtBN,0BAAuB;AAEvB,gCAAiC;AACjC,0BAAqD;AACrD,0BAA4B;AAC5B,2BAA+B;AAC/B,oBAAkC;AAClC,2BAA4B;AAE5B,MAAM,OAAO;AAQb,SAAS,UAAU,EAAE,OAAO,IAAI,GAA0C;AACxE,QAAM,EAAE,QAAQ,OAAO,QAAI,iCAAkB,GAAG;AAChD,MAAI,CAAC,UAAU,WAAW,SAAK,QAAO;AACtC,SACE,4CAAC,kCAAW,OACV,sDAAC,uCAAe,QAAQ,QAAQ,QAAgB,UAAU,IAAI,GAChE;AAEJ;AAEO,SAAS,iBAAiB,EAAE,YAAY,UAAU,OAAO,SAAS,GAA0B;AACjG,QAAM,mBAAe,kCAAY;AACjC,QAAM,QAAQ,aAAa,YAAY,KAAK;AAC5C,QAAM,OAAO,YAAY,QAAQ;AAEjC,SACE,4CAAC,mCAAY,OAAc,UAAU,MAAM,cAAc,4BAAQ,SAAS,WAAW,CAAC,YACnF,uBACC,4EACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,aAAa,WAAW;AAAA,QACxB,QACE,4EACG;AAAA,qBAAW,aAAa,YAAY,4CAAC,UAAK,WAAW,MAAM,2BAAa,IAAU;AAAA,UAClF,WAAW,SAAS,4CAAC,UAAK,WAAW,MAAO,qBAAW,QAAO,IAAU;AAAA,WAC3E;AAAA;AAAA,IAEJ;AAAA,IAEA,6CAAC,mCACE;AAAA,iBAAW,eAAe,OAAO,4CAAC,kCAAW,OAAM,SAAS,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACpH,WAAW,eAAe,OAAO,4CAAC,kCAAW,OAAM,WAAW,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACvH,4CAAC,aAAU,OAAM,SAAQ,KAAK,WAAW,YAAY;AAAA,MACrD,4CAAC,aAAU,OAAM,UAAS,KAAK,WAAW,aAAa;AAAA,OACzD;AAAA,IAEC,WAAW,QAAQ,4CAAC,mCAAY,SAAS,WAAW,OAAO,IAAK;AAAA,IAEhE;AAAA,KACH,IACE,MACN;AAEJ;","names":[]}
@@ -5,9 +5,8 @@ import { ApiCollection } from '@medialane/sdk';
5
5
  interface CollectionHeaderProps {
6
6
  collection: ApiCollection | null | undefined;
7
7
  loading?: boolean;
8
- onReportClick: () => void;
9
8
  children?: ReactNode;
10
9
  }
11
- declare function CollectionHeader({ collection, loading, onReportClick, children }: CollectionHeaderProps): react_jsx_runtime.JSX.Element;
10
+ declare function CollectionHeader({ collection, loading, children }: CollectionHeaderProps): react_jsx_runtime.JSX.Element;
12
11
 
13
12
  export { CollectionHeader, type CollectionHeaderProps };
@@ -5,9 +5,8 @@ import { ApiCollection } from '@medialane/sdk';
5
5
  interface CollectionHeaderProps {
6
6
  collection: ApiCollection | null | undefined;
7
7
  loading?: boolean;
8
- onReportClick: () => void;
9
8
  children?: ReactNode;
10
9
  }
11
- declare function CollectionHeader({ collection, loading, onReportClick, children }: CollectionHeaderProps): react_jsx_runtime.JSX.Element;
10
+ declare function CollectionHeader({ collection, loading, children }: CollectionHeaderProps): react_jsx_runtime.JSX.Element;
12
11
 
13
12
  export { CollectionHeader, type CollectionHeaderProps };
@@ -3,12 +3,9 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Layers } from "lucide-react";
4
4
  import { AssetHeaderBlock } from "./asset-top-sections.js";
5
5
  import { MediaHeader, HeaderStats, HeaderStat } from "./media-header.js";
6
- import { AssetUtilityIcons } from "./asset-utility-icons.js";
7
- import { AddressDisplay } from "./address-display.js";
8
6
  import { CreatorChip } from "./creator-chip.js";
9
7
  import { CurrencyAmount } from "./currency-icon.js";
10
8
  import { parsePriceDisplay } from "../utils/format.js";
11
- import { EXPLORER_URL } from "../utils/explorer-url.js";
12
9
  import { useImageUrl } from "../utils/use-image-url.js";
13
10
  const CHIP = "text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground";
14
11
  function PriceStat({ label, raw }) {
@@ -16,7 +13,7 @@ function PriceStat({ label, raw }) {
16
13
  if (!symbol || numStr === "\u2014") return null;
17
14
  return /* @__PURE__ */ jsx(HeaderStat, { label, children: /* @__PURE__ */ jsx(CurrencyAmount, { amount: numStr, symbol, iconSize: 12 }) });
18
15
  }
19
- function CollectionHeader({ collection, loading = false, onReportClick, children }) {
16
+ function CollectionHeader({ collection, loading = false, children }) {
20
17
  const resolveImage = useImageUrl();
21
18
  const image = resolveImage(collection?.image);
22
19
  const name = collection?.name ?? "Unnamed Collection";
@@ -27,7 +24,7 @@ function CollectionHeader({ collection, loading = false, onReportClick, children
27
24
  name,
28
25
  description: collection.description,
29
26
  badges: /* @__PURE__ */ jsxs(Fragment, { children: [
30
- /* @__PURE__ */ jsx("span", { className: CHIP, children: collection.standard === "ERC1155" ? "Multi-edition" : "Single NFT" }),
27
+ collection.standard === "ERC1155" ? /* @__PURE__ */ jsx("span", { className: CHIP, children: "Multi-edition" }) : null,
31
28
  collection.symbol ? /* @__PURE__ */ jsx("span", { className: CHIP, children: collection.symbol }) : null
32
29
  ] })
33
30
  }
@@ -38,18 +35,7 @@ function CollectionHeader({ collection, loading = false, onReportClick, children
38
35
  /* @__PURE__ */ jsx(PriceStat, { label: "Floor", raw: collection.floorPrice }),
39
36
  /* @__PURE__ */ jsx(PriceStat, { label: "Volume", raw: collection.totalVolume })
40
37
  ] }),
41
- /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [
42
- collection.owner ? /* @__PURE__ */ jsx(CreatorChip, { address: collection.owner }) : null,
43
- /* @__PURE__ */ jsx(AddressDisplay, { address: collection.contractAddress, chars: 6, className: "text-xs text-muted-foreground" })
44
- ] }),
45
- /* @__PURE__ */ jsx("div", { className: "-ml-3", children: /* @__PURE__ */ jsx(
46
- AssetUtilityIcons,
47
- {
48
- contractExplorerHref: `${EXPLORER_URL}/contract/${collection.contractAddress}`,
49
- shareTitle: name,
50
- onReportClick
51
- }
52
- ) }),
38
+ collection.owner ? /* @__PURE__ */ jsx(CreatorChip, { address: collection.owner }) : null,
53
39
  children
54
40
  ] }) : null });
55
41
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/collection-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Layers } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { AssetUtilityIcons } from \"./asset-utility-icons.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { CreatorChip } from \"./creator-chip.js\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { EXPLORER_URL } from \"../utils/explorer-url.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nconst CHIP = \"text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground\";\n\nexport interface CollectionHeaderProps {\n collection: ApiCollection | null | undefined;\n loading?: boolean;\n onReportClick: () => void;\n children?: ReactNode;\n}\n\nfunction PriceStat({ label, raw }: { label: string; raw: string | null }) {\n const { numStr, symbol } = parsePriceDisplay(raw);\n if (!symbol || numStr === \"—\") return null;\n return (\n <HeaderStat label={label}>\n <CurrencyAmount amount={numStr} symbol={symbol} iconSize={12} />\n </HeaderStat>\n );\n}\n\nexport function CollectionHeader({ collection, loading = false, onReportClick, children }: CollectionHeaderProps) {\n const resolveImage = useImageUrl();\n const image = resolveImage(collection?.image);\n const name = collection?.name ?? \"Unnamed Collection\";\n\n return (\n <MediaHeader image={image} imageAlt={name} fallbackIcon={Layers} loading={loading || !collection}>\n {collection ? (\n <>\n <AssetHeaderBlock\n name={name}\n description={collection.description}\n badges={(\n <>\n <span className={CHIP}>{collection.standard === \"ERC1155\" ? \"Multi-edition\" : \"Single NFT\"}</span>\n {collection.symbol ? <span className={CHIP}>{collection.symbol}</span> : null}\n </>\n )}\n />\n\n <HeaderStats>\n {collection.totalSupply != null ? <HeaderStat label=\"Items\">{collection.totalSupply.toLocaleString()}</HeaderStat> : null}\n {collection.holderCount != null ? <HeaderStat label=\"Holders\">{collection.holderCount.toLocaleString()}</HeaderStat> : null}\n <PriceStat label=\"Floor\" raw={collection.floorPrice} />\n <PriceStat label=\"Volume\" raw={collection.totalVolume} />\n </HeaderStats>\n\n <div className=\"flex flex-wrap items-center gap-2\">\n {collection.owner ? <CreatorChip address={collection.owner} /> : null}\n <AddressDisplay address={collection.contractAddress} chars={6} className=\"text-xs text-muted-foreground\" />\n </div>\n\n <div className=\"-ml-3\">\n <AssetUtilityIcons\n contractExplorerHref={`${EXPLORER_URL}/contract/${collection.contractAddress}`}\n shareTitle={name}\n onReportClick={onReportClick}\n />\n </div>\n\n {children}\n </>\n ) : null}\n </MediaHeader>\n );\n}\n"],"mappings":";AA6BM,SAkBQ,UAlBR,KAkBQ,YAlBR;AA1BN,SAAS,cAAc;AAEvB,SAAS,wBAAwB;AACjC,SAAS,aAAa,aAAa,kBAAkB;AACrD,SAAS,yBAAyB;AAClC,SAAS,sBAAsB;AAC/B,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB;AAE5B,MAAM,OAAO;AASb,SAAS,UAAU,EAAE,OAAO,IAAI,GAA0C;AACxE,QAAM,EAAE,QAAQ,OAAO,IAAI,kBAAkB,GAAG;AAChD,MAAI,CAAC,UAAU,WAAW,SAAK,QAAO;AACtC,SACE,oBAAC,cAAW,OACV,8BAAC,kBAAe,QAAQ,QAAQ,QAAgB,UAAU,IAAI,GAChE;AAEJ;AAEO,SAAS,iBAAiB,EAAE,YAAY,UAAU,OAAO,eAAe,SAAS,GAA0B;AAChH,QAAM,eAAe,YAAY;AACjC,QAAM,QAAQ,aAAa,YAAY,KAAK;AAC5C,QAAM,OAAO,YAAY,QAAQ;AAEjC,SACE,oBAAC,eAAY,OAAc,UAAU,MAAM,cAAc,QAAQ,SAAS,WAAW,CAAC,YACnF,uBACC,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,aAAa,WAAW;AAAA,QACxB,QACE,iCACE;AAAA,8BAAC,UAAK,WAAW,MAAO,qBAAW,aAAa,YAAY,kBAAkB,cAAa;AAAA,UAC1F,WAAW,SAAS,oBAAC,UAAK,WAAW,MAAO,qBAAW,QAAO,IAAU;AAAA,WAC3E;AAAA;AAAA,IAEJ;AAAA,IAEA,qBAAC,eACE;AAAA,iBAAW,eAAe,OAAO,oBAAC,cAAW,OAAM,SAAS,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACpH,WAAW,eAAe,OAAO,oBAAC,cAAW,OAAM,WAAW,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACvH,oBAAC,aAAU,OAAM,SAAQ,KAAK,WAAW,YAAY;AAAA,MACrD,oBAAC,aAAU,OAAM,UAAS,KAAK,WAAW,aAAa;AAAA,OACzD;AAAA,IAEA,qBAAC,SAAI,WAAU,qCACZ;AAAA,iBAAW,QAAQ,oBAAC,eAAY,SAAS,WAAW,OAAO,IAAK;AAAA,MACjE,oBAAC,kBAAe,SAAS,WAAW,iBAAiB,OAAO,GAAG,WAAU,iCAAgC;AAAA,OAC3G;AAAA,IAEA,oBAAC,SAAI,WAAU,SACb;AAAA,MAAC;AAAA;AAAA,QACC,sBAAsB,GAAG,YAAY,aAAa,WAAW,eAAe;AAAA,QAC5E,YAAY;AAAA,QACZ;AAAA;AAAA,IACF,GACF;AAAA,IAEC;AAAA,KACH,IACE,MACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/collection-header.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Layers } from \"lucide-react\";\nimport type { ApiCollection } from \"@medialane/sdk\";\nimport { AssetHeaderBlock } from \"./asset-top-sections.js\";\nimport { MediaHeader, HeaderStats, HeaderStat } from \"./media-header.js\";\nimport { CreatorChip } from \"./creator-chip.js\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { useImageUrl } from \"../utils/use-image-url.js\";\n\nconst CHIP = \"text-2xs font-semibold px-2.5 py-1 rounded-full bg-muted text-muted-foreground\";\n\nexport interface CollectionHeaderProps {\n collection: ApiCollection | null | undefined;\n loading?: boolean;\n children?: ReactNode;\n}\n\nfunction PriceStat({ label, raw }: { label: string; raw: string | null }) {\n const { numStr, symbol } = parsePriceDisplay(raw);\n if (!symbol || numStr === \"—\") return null;\n return (\n <HeaderStat label={label}>\n <CurrencyAmount amount={numStr} symbol={symbol} iconSize={12} />\n </HeaderStat>\n );\n}\n\nexport function CollectionHeader({ collection, loading = false, children }: CollectionHeaderProps) {\n const resolveImage = useImageUrl();\n const image = resolveImage(collection?.image);\n const name = collection?.name ?? \"Unnamed Collection\";\n\n return (\n <MediaHeader image={image} imageAlt={name} fallbackIcon={Layers} loading={loading || !collection}>\n {collection ? (\n <>\n <AssetHeaderBlock\n name={name}\n description={collection.description}\n badges={(\n <>\n {collection.standard === \"ERC1155\" ? <span className={CHIP}>Multi-edition</span> : null}\n {collection.symbol ? <span className={CHIP}>{collection.symbol}</span> : null}\n </>\n )}\n />\n\n <HeaderStats>\n {collection.totalSupply != null ? <HeaderStat label=\"Items\">{collection.totalSupply.toLocaleString()}</HeaderStat> : null}\n {collection.holderCount != null ? <HeaderStat label=\"Holders\">{collection.holderCount.toLocaleString()}</HeaderStat> : null}\n <PriceStat label=\"Floor\" raw={collection.floorPrice} />\n <PriceStat label=\"Volume\" raw={collection.totalVolume} />\n </HeaderStats>\n\n {collection.owner ? <CreatorChip address={collection.owner} /> : null}\n\n {children}\n </>\n ) : null}\n </MediaHeader>\n );\n}\n"],"mappings":";AAyBM,SAkBQ,UAlBR,KAkBQ,YAlBR;AAtBN,SAAS,cAAc;AAEvB,SAAS,wBAAwB;AACjC,SAAS,aAAa,aAAa,kBAAkB;AACrD,SAAS,mBAAmB;AAC5B,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,SAAS,mBAAmB;AAE5B,MAAM,OAAO;AAQb,SAAS,UAAU,EAAE,OAAO,IAAI,GAA0C;AACxE,QAAM,EAAE,QAAQ,OAAO,IAAI,kBAAkB,GAAG;AAChD,MAAI,CAAC,UAAU,WAAW,SAAK,QAAO;AACtC,SACE,oBAAC,cAAW,OACV,8BAAC,kBAAe,QAAQ,QAAQ,QAAgB,UAAU,IAAI,GAChE;AAEJ;AAEO,SAAS,iBAAiB,EAAE,YAAY,UAAU,OAAO,SAAS,GAA0B;AACjG,QAAM,eAAe,YAAY;AACjC,QAAM,QAAQ,aAAa,YAAY,KAAK;AAC5C,QAAM,OAAO,YAAY,QAAQ;AAEjC,SACE,oBAAC,eAAY,OAAc,UAAU,MAAM,cAAc,QAAQ,SAAS,WAAW,CAAC,YACnF,uBACC,iCACE;AAAA;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,aAAa,WAAW;AAAA,QACxB,QACE,iCACG;AAAA,qBAAW,aAAa,YAAY,oBAAC,UAAK,WAAW,MAAM,2BAAa,IAAU;AAAA,UAClF,WAAW,SAAS,oBAAC,UAAK,WAAW,MAAO,qBAAW,QAAO,IAAU;AAAA,WAC3E;AAAA;AAAA,IAEJ;AAAA,IAEA,qBAAC,eACE;AAAA,iBAAW,eAAe,OAAO,oBAAC,cAAW,OAAM,SAAS,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACpH,WAAW,eAAe,OAAO,oBAAC,cAAW,OAAM,WAAW,qBAAW,YAAY,eAAe,GAAE,IAAgB;AAAA,MACvH,oBAAC,aAAU,OAAM,SAAQ,KAAK,WAAW,YAAY;AAAA,MACrD,oBAAC,aAAU,OAAM,UAAS,KAAK,WAAW,aAAa;AAAA,OACzD;AAAA,IAEC,WAAW,QAAQ,oBAAC,eAAY,SAAS,WAAW,OAAO,IAAK;AAAA,IAEhE;AAAA,KACH,IACE,MACN;AAEJ;","names":[]}
@@ -0,0 +1,74 @@
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 collection_more_menu_exports = {};
21
+ __export(collection_more_menu_exports, {
22
+ CollectionMoreMenu: () => CollectionMoreMenu
23
+ });
24
+ module.exports = __toCommonJS(collection_more_menu_exports);
25
+ var import_jsx_runtime = require("react/jsx-runtime");
26
+ var import_react = require("react");
27
+ var import_lucide_react = require("lucide-react");
28
+ var import_dropdown_menu = require("./dropdown-menu.js");
29
+ var import_share = require("../utils/share.js");
30
+ function CollectionMoreMenu({ explorerHref, shareTitle, onReport }) {
31
+ const [copied, setCopied] = (0, import_react.useState)(false);
32
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenu, { children: [
33
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
34
+ import_dropdown_menu.DropdownMenuTrigger,
35
+ {
36
+ "aria-label": "More options",
37
+ className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-input bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
38
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.MoreHorizontal, { className: "h-4 w-4" })
39
+ }
40
+ ),
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuContent, { align: "end", children: [
42
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_dropdown_menu.DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href: explorerHref, target: "_blank", rel: "noopener noreferrer", children: [
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ExternalLink, {}),
44
+ "View on explorer"
45
+ ] }) }),
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
47
+ import_dropdown_menu.DropdownMenuItem,
48
+ {
49
+ onSelect: (e) => {
50
+ e.preventDefault();
51
+ void (0, import_share.shareOrCopy)(shareTitle).then((result) => {
52
+ if (result !== "copied") return;
53
+ setCopied(true);
54
+ setTimeout(() => setCopied(false), 2e3);
55
+ });
56
+ },
57
+ children: [
58
+ copied ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Check, { className: "text-emerald-500" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Share2, {}),
59
+ copied ? "Link copied" : "Share"
60
+ ]
61
+ }
62
+ ),
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_dropdown_menu.DropdownMenuItem, { onSelect: onReport, children: [
64
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Flag, {}),
65
+ "Report"
66
+ ] })
67
+ ] })
68
+ ] });
69
+ }
70
+ // Annotate the CommonJS export names for ESM import in node:
71
+ 0 && (module.exports = {
72
+ CollectionMoreMenu
73
+ });
74
+ //# sourceMappingURL=collection-more-menu.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/collection-more-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Check, ExternalLink, Flag, MoreHorizontal, Share2 } from \"lucide-react\";\nimport { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from \"./dropdown-menu.js\";\nimport { shareOrCopy } from \"../utils/share.js\";\n\nexport function CollectionMoreMenu({ explorerHref, shareTitle, onReport }: { explorerHref: string; shareTitle: string; onReport: () => void }) {\n const [copied, setCopied] = useState(false);\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n aria-label=\"More options\"\n className=\"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-input bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground\"\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem asChild>\n <a href={explorerHref} target=\"_blank\" rel=\"noopener noreferrer\">\n <ExternalLink />\n View on explorer\n </a>\n </DropdownMenuItem>\n <DropdownMenuItem\n onSelect={(e) => {\n e.preventDefault();\n void shareOrCopy(shareTitle).then((result) => {\n if (result !== \"copied\") return;\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n });\n }}\n >\n {copied ? <Check className=\"text-emerald-500\" /> : <Share2 />}\n {copied ? \"Link copied\" : \"Share\"}\n </DropdownMenuItem>\n <DropdownMenuItem onSelect={onReport}>\n <Flag />\n Report\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAeQ;AAbR,mBAAyB;AACzB,0BAAkE;AAClE,2BAAyF;AACzF,mBAA4B;AAErB,SAAS,mBAAmB,EAAE,cAAc,YAAY,SAAS,GAAuE;AAC7I,QAAM,CAAC,QAAQ,SAAS,QAAI,uBAAS,KAAK;AAC1C,SACE,6CAAC,qCACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,cAAW;AAAA,QACX,WAAU;AAAA,QAEV,sDAAC,sCAAe,WAAU,WAAU;AAAA;AAAA,IACtC;AAAA,IACA,6CAAC,4CAAoB,OAAM,OACzB;AAAA,kDAAC,yCAAiB,SAAO,MACvB,uDAAC,OAAE,MAAM,cAAc,QAAO,UAAS,KAAI,uBACzC;AAAA,oDAAC,oCAAa;AAAA,QAAE;AAAA,SAElB,GACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU,CAAC,MAAM;AACf,cAAE,eAAe;AACjB,qBAAK,0BAAY,UAAU,EAAE,KAAK,CAAC,WAAW;AAC5C,kBAAI,WAAW,SAAU;AACzB,wBAAU,IAAI;AACd,yBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,YACzC,CAAC;AAAA,UACH;AAAA,UAEC;AAAA,qBAAS,4CAAC,6BAAM,WAAU,oBAAmB,IAAK,4CAAC,8BAAO;AAAA,YAC1D,SAAS,gBAAgB;AAAA;AAAA;AAAA,MAC5B;AAAA,MACA,6CAAC,yCAAiB,UAAU,UAC1B;AAAA,oDAAC,4BAAK;AAAA,QAAE;AAAA,SAEV;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function CollectionMoreMenu({ explorerHref, shareTitle, onReport }: {
4
+ explorerHref: string;
5
+ shareTitle: string;
6
+ onReport: () => void;
7
+ }): react_jsx_runtime.JSX.Element;
8
+
9
+ export { CollectionMoreMenu };
@@ -0,0 +1,9 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function CollectionMoreMenu({ explorerHref, shareTitle, onReport }: {
4
+ explorerHref: string;
5
+ shareTitle: string;
6
+ onReport: () => void;
7
+ }): react_jsx_runtime.JSX.Element;
8
+
9
+ export { CollectionMoreMenu };
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { Check, ExternalLink, Flag, MoreHorizontal, Share2 } from "lucide-react";
5
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./dropdown-menu.js";
6
+ import { shareOrCopy } from "../utils/share.js";
7
+ function CollectionMoreMenu({ explorerHref, shareTitle, onReport }) {
8
+ const [copied, setCopied] = useState(false);
9
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
10
+ /* @__PURE__ */ jsx(
11
+ DropdownMenuTrigger,
12
+ {
13
+ "aria-label": "More options",
14
+ className: "inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-input bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
15
+ children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" })
16
+ }
17
+ ),
18
+ /* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", children: [
19
+ /* @__PURE__ */ jsx(DropdownMenuItem, { asChild: true, children: /* @__PURE__ */ jsxs("a", { href: explorerHref, target: "_blank", rel: "noopener noreferrer", children: [
20
+ /* @__PURE__ */ jsx(ExternalLink, {}),
21
+ "View on explorer"
22
+ ] }) }),
23
+ /* @__PURE__ */ jsxs(
24
+ DropdownMenuItem,
25
+ {
26
+ onSelect: (e) => {
27
+ e.preventDefault();
28
+ void shareOrCopy(shareTitle).then((result) => {
29
+ if (result !== "copied") return;
30
+ setCopied(true);
31
+ setTimeout(() => setCopied(false), 2e3);
32
+ });
33
+ },
34
+ children: [
35
+ copied ? /* @__PURE__ */ jsx(Check, { className: "text-emerald-500" }) : /* @__PURE__ */ jsx(Share2, {}),
36
+ copied ? "Link copied" : "Share"
37
+ ]
38
+ }
39
+ ),
40
+ /* @__PURE__ */ jsxs(DropdownMenuItem, { onSelect: onReport, children: [
41
+ /* @__PURE__ */ jsx(Flag, {}),
42
+ "Report"
43
+ ] })
44
+ ] })
45
+ ] });
46
+ }
47
+ export {
48
+ CollectionMoreMenu
49
+ };
50
+ //# sourceMappingURL=collection-more-menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/components/collection-more-menu.tsx"],"sourcesContent":["\"use client\";\n\nimport { useState } from \"react\";\nimport { Check, ExternalLink, Flag, MoreHorizontal, Share2 } from \"lucide-react\";\nimport { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from \"./dropdown-menu.js\";\nimport { shareOrCopy } from \"../utils/share.js\";\n\nexport function CollectionMoreMenu({ explorerHref, shareTitle, onReport }: { explorerHref: string; shareTitle: string; onReport: () => void }) {\n const [copied, setCopied] = useState(false);\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n aria-label=\"More options\"\n className=\"inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-md border border-input bg-background text-muted-foreground transition-colors hover:bg-accent hover:text-foreground\"\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem asChild>\n <a href={explorerHref} target=\"_blank\" rel=\"noopener noreferrer\">\n <ExternalLink />\n View on explorer\n </a>\n </DropdownMenuItem>\n <DropdownMenuItem\n onSelect={(e) => {\n e.preventDefault();\n void shareOrCopy(shareTitle).then((result) => {\n if (result !== \"copied\") return;\n setCopied(true);\n setTimeout(() => setCopied(false), 2000);\n });\n }}\n >\n {copied ? <Check className=\"text-emerald-500\" /> : <Share2 />}\n {copied ? \"Link copied\" : \"Share\"}\n </DropdownMenuItem>\n <DropdownMenuItem onSelect={onReport}>\n <Flag />\n Report\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"mappings":";AAeQ,cAIE,YAJF;AAbR,SAAS,gBAAgB;AACzB,SAAS,OAAO,cAAc,MAAM,gBAAgB,cAAc;AAClE,SAAS,cAAc,qBAAqB,kBAAkB,2BAA2B;AACzF,SAAS,mBAAmB;AAErB,SAAS,mBAAmB,EAAE,cAAc,YAAY,SAAS,GAAuE;AAC7I,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,KAAK;AAC1C,SACE,qBAAC,gBACC;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,cAAW;AAAA,QACX,WAAU;AAAA,QAEV,8BAAC,kBAAe,WAAU,WAAU;AAAA;AAAA,IACtC;AAAA,IACA,qBAAC,uBAAoB,OAAM,OACzB;AAAA,0BAAC,oBAAiB,SAAO,MACvB,+BAAC,OAAE,MAAM,cAAc,QAAO,UAAS,KAAI,uBACzC;AAAA,4BAAC,gBAAa;AAAA,QAAE;AAAA,SAElB,GACF;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,UAAU,CAAC,MAAM;AACf,cAAE,eAAe;AACjB,iBAAK,YAAY,UAAU,EAAE,KAAK,CAAC,WAAW;AAC5C,kBAAI,WAAW,SAAU;AACzB,wBAAU,IAAI;AACd,yBAAW,MAAM,UAAU,KAAK,GAAG,GAAI;AAAA,YACzC,CAAC;AAAA,UACH;AAAA,UAEC;AAAA,qBAAS,oBAAC,SAAM,WAAU,oBAAmB,IAAK,oBAAC,UAAO;AAAA,YAC1D,SAAS,gBAAgB;AAAA;AAAA;AAAA,MAC5B;AAAA,MACA,qBAAC,oBAAiB,UAAU,UAC1B;AAAA,4BAAC,QAAK;AAAA,QAAE;AAAA,SAEV;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
@@ -41,6 +41,8 @@ var import_link = __toESM(require("./link.js"), 1);
41
41
  var import_asset_card = require("./asset-card.js");
42
42
  var import_collection_header = require("./collection-header.js");
43
43
  var import_collection_filters_dialog = require("./collection-filters-dialog.js");
44
+ var import_collection_more_menu = require("./collection-more-menu.js");
45
+ var import_explorer_url = require("../utils/explorer-url.js");
44
46
  var import_collection_activity_tab = require("./collection-activity-tab.js");
45
47
  var import_collection_traits_tab = require("./collection-traits-tab.js");
46
48
  var import_club_owner_actions = require("./club-owner-actions.js");
@@ -89,14 +91,12 @@ function EmptyState({ title, body, action }) {
89
91
  ] }) : null
90
92
  ] });
91
93
  }
92
- function CollectionItems({ collection, activeListings, mintHref }) {
93
- const contract = collection.contractAddress;
94
+ function useCollectionItems(contract) {
94
95
  const [page, setPage] = (0, import_react.useState)(1);
95
96
  const [sort, setSort] = (0, import_react.useState)("recent");
96
97
  const [allTokens, setAllTokens] = (0, import_react.useState)([]);
97
98
  const [selectedFilters, setSelectedFilters] = (0, import_react.useState)({});
98
99
  const { tokens, meta, isLoading } = (0, import_use_collections.useCollectionTokens)(contract, page, PAGE_SIZE, sort);
99
- const usdPrices = (0, import_use_usd_prices.useUsdPrices)();
100
100
  const handleSortChange = (next) => {
101
101
  setSort(next);
102
102
  setPage(1);
@@ -109,6 +109,11 @@ function CollectionItems({ collection, activeListings, mintHref }) {
109
109
  return page === 1 ? tokens : [...prev, ...tokens.filter((t) => !ids.has(`${t.contractAddress}-${t.tokenId}`))];
110
110
  });
111
111
  }, [tokens, page]);
112
+ return { meta, isLoading, setPage, sort, handleSortChange, allTokens, selectedFilters, setSelectedFilters };
113
+ }
114
+ function CollectionItems({ items, activeListings, mintHref }) {
115
+ const { meta, isLoading, setPage, sort, handleSortChange, allTokens, selectedFilters, setSelectedFilters } = items;
116
+ const usdPrices = (0, import_use_usd_prices.useUsdPrices)();
112
117
  const listingByTokenId = (0, import_react.useMemo)(() => new Map(activeListings.filter((o) => o.nftTokenId).map((o) => [o.nftTokenId, o])), [activeListings]);
113
118
  const visibleTokens = (0, import_react.useMemo)(() => {
114
119
  const filters = Object.entries(selectedFilters);
@@ -125,7 +130,7 @@ function CollectionItems({ collection, activeListings, mintHref }) {
125
130
  return mintHref ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, { title: "Ready for your first work", body: "Mint into this collection and it appears here.", action: { href: mintHref, label: "Mint your first work" } }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, { title: "No items yet", body: "Tokens in this collection will appear here once indexed." });
126
131
  }
127
132
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
128
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex items-center justify-end gap-2", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collection_filters_dialog.CollectionFiltersDialog, { tokens: allTokens, selected: selectedFilters, onChange: setSelectedFilters, sort, onSortChange: handleSortChange }) }),
133
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collection_filters_dialog.CollectionActiveFilters, { tokens: allTokens, selected: selectedFilters, onChange: setSelectedFilters, sort, onSortChange: handleSortChange }),
129
134
  visibleTokens.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmptyState, { title: "No items match these filters", body: "Try removing some filters to see more results." }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: GRID, children: visibleTokens.map((t) => {
130
135
  const listing = t.activeOrders?.find((o) => o.offer.itemType === "ERC721" || o.offer.itemType === "ERC1155") ?? listingByTokenId.get(t.tokenId);
131
136
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -150,21 +155,14 @@ function CollectionItems({ collection, activeListings, mintHref }) {
150
155
  function OwnerActions({ collection }) {
151
156
  const service = (0, import_sdk.getService)(collection.service)?.id;
152
157
  const contract = collection.contractAddress;
153
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-center gap-2", children: [
154
- service === "ip-tickets" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: `/launchpad/tickets/${contract}/mint`, className: "flex items-center gap-1.5 h-8 px-3 rounded-lg text-xs font-semibold text-white bg-brand-blue hover:brightness-110 active:scale-[0.98] transition", children: [
158
+ if (service === "ip-tickets") {
159
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: `/launchpad/tickets/${contract}/mint`, className: "flex w-fit items-center gap-1.5 h-8 px-3 rounded-lg text-xs font-semibold text-white bg-brand-blue hover:brightness-110 active:scale-[0.98] transition", children: [
155
160
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Ticket, { className: "h-3.5 w-3.5" }),
156
161
  "Mint tickets"
157
- ] }) : null,
158
- service === "ip-club" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_club_owner_actions.ClubOwnerActions, { contractAddress: contract, isOwner: true }) : null,
159
- service === "mip-erc1155" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: `/launchpad/nfteditions/${contract}/mint`, className: "flex items-center gap-1.5 h-8 px-3 rounded-lg text-xs font-semibold text-white bg-brand-purple hover:brightness-110 active:scale-[0.98] transition", children: [
160
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Sparkles, { className: "h-3.5 w-3.5" }),
161
- "Mint editions"
162
- ] }) : null,
163
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: `/portfolio/collections/${contract}/settings`, className: "flex items-center gap-1.5 h-8 px-3 rounded-lg text-xs font-semibold border border-border hover:bg-muted active:scale-[0.98] transition text-muted-foreground hover:text-foreground", children: [
164
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Settings, { className: "h-3.5 w-3.5" }),
165
- "Settings"
166
- ] })
167
- ] });
162
+ ] });
163
+ }
164
+ if (service === "ip-club") return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_club_owner_actions.ClubOwnerActions, { contractAddress: contract, isOwner: true });
165
+ return null;
168
166
  }
169
167
  function CollectionPage({ contract, slots }) {
170
168
  const { walletAddress, ReportDialog } = (0, import_medialane_app.useMedialaneApp)();
@@ -180,12 +178,13 @@ function CollectionPage({ contract, slots }) {
180
178
  const [listingsSort, setListingsSort] = (0, import_react.useState)("recent");
181
179
  const [offersSort, setOffersSort] = (0, import_react.useState)("recent");
182
180
  const usdPrices = (0, import_use_usd_prices.useUsdPrices)();
181
+ const items = useCollectionItems(contract);
183
182
  const activeListings = orders.filter((o) => o.status === "ACTIVE" && (o.offer.itemType === "ERC721" || o.offer.itemType === "ERC1155"));
184
183
  const activeBids = orders.filter((o) => o.status === "ACTIVE" && o.offer.itemType === "ERC20");
185
184
  const isOwner = !!collection?.owner && !!walletAddress && (0, import_same_address.isSameAddress)(collection.owner, walletAddress);
186
185
  const mintHref = isOwner && collection ? MINT_HREFS[(0, import_sdk.getService)(collection.service)?.id ?? ""]?.(contract) ?? null : null;
187
186
  const { ServiceAction, TransferOwnership } = slots;
188
- const listingGrid = (items, sort, buyable) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: GRID, children: (0, import_order_sort_control.sortOrders)(items, sort).map((o) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
187
+ const listingGrid = (items2, sort, buyable) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: GRID, children: (0, import_order_sort_control.sortOrders)(items2, sort).map((o) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
189
188
  import_listing_card.ListingCard,
190
189
  {
191
190
  order: o,
@@ -199,29 +198,42 @@ function CollectionPage({ contract, slots }) {
199
198
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative z-0 min-h-screen", children: [
200
199
  collection?.isHidden ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_hidden_content_banner.HiddenContentBanner, {}) : null,
201
200
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "px-4 sm:px-6 pt-20 pb-6 space-y-4", children: [
202
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_collection_header.CollectionHeader, { collection, loading: collectionLoading, onReportClick: () => setReportOpen(true), children: [
201
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_collection_header.CollectionHeader, { collection, loading: collectionLoading, children: [
203
202
  collection && isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OwnerActions, { collection }) : null,
204
203
  collection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ServiceAction, { service: collection.service, contractAddress: collection.contractAddress }) : null
205
204
  ] }),
206
205
  collection && profile ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_gated_content.GatedContentHero, { profile, state: gatedState, onViewExclusive: () => setActiveTab("exclusive") }) : null
207
206
  ] }),
208
207
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "px-4 sm:px-6 pb-12", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.Tabs, { value: activeTab, onValueChange: setActiveTab, children: [
209
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "sticky top-0 z-10 pt-3 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsList, { className: "w-full sm:w-auto", children: [
210
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsTrigger, { value: "assets", className: "flex-1 sm:flex-none", children: [
211
- "Assets",
212
- collection?.totalSupply ? ` (${collection.totalSupply.toLocaleString()})` : ""
213
- ] }),
214
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsTrigger, { value: "market", className: "flex-1 sm:flex-none", children: [
215
- "Market",
216
- !ordersLoading && activeListings.length + activeBids.length > 0 && ` (${activeListings.length + activeBids.length})`
208
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "sticky top-0 z-10 flex items-center gap-2 pt-3 pb-1", children: [
209
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsList, { className: "min-w-0 flex-1 justify-start overflow-x-auto sm:flex-none", children: [
210
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsTrigger, { value: "assets", className: "flex-1 sm:flex-none", children: [
211
+ "Assets",
212
+ collection?.totalSupply ? ` (${collection.totalSupply.toLocaleString()})` : ""
213
+ ] }),
214
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsTrigger, { value: "market", className: "flex-1 sm:flex-none", children: [
215
+ "Market",
216
+ !ordersLoading && activeListings.length + activeBids.length > 0 && ` (${activeListings.length + activeBids.length})`
217
+ ] }),
218
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTrigger, { value: "provenance", className: "flex-1 sm:flex-none", children: "Provenance" }),
219
+ profile?.hasGatedContent ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsTrigger, { value: "exclusive", className: "flex-1 sm:flex-none gap-1.5", children: [
220
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Lock, { className: "h-3.5 w-3.5" }),
221
+ "Exclusive"
222
+ ] }) : null
217
223
  ] }),
218
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsTrigger, { value: "provenance", className: "flex-1 sm:flex-none", children: "Provenance" }),
219
- profile?.hasGatedContent ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsTrigger, { value: "exclusive", className: "flex-1 sm:flex-none gap-1.5", children: [
220
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Lock, { className: "h-3.5 w-3.5" }),
221
- "Exclusive"
222
- ] }) : null
223
- ] }) }),
224
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsContent, { value: "assets", className: "mt-4", children: collection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollectionItems, { collection, activeListings, mintHref }) : null }),
224
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "ml-auto flex shrink-0 items-center gap-2", children: [
225
+ activeTab === "assets" && items.allTokens.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_collection_filters_dialog.CollectionFiltersDialog, { tokens: items.allTokens, selected: items.selectedFilters, onChange: items.setSelectedFilters, sort: items.sort, onSortChange: items.handleSortChange, chips: false }) : null,
226
+ collection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
227
+ import_collection_more_menu.CollectionMoreMenu,
228
+ {
229
+ explorerHref: `${import_explorer_url.EXPLORER_URL}/contract/${collection.contractAddress}`,
230
+ shareTitle: collection.name ?? "Collection",
231
+ onReport: () => setReportOpen(true)
232
+ }
233
+ ) : null
234
+ ] })
235
+ ] }),
236
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsContent, { value: "assets", className: "mt-4", children: collection ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CollectionItems, { items, activeListings, mintHref }) : null }),
225
237
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_tabs.TabsContent, { value: "market", className: "mt-4", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.Tabs, { value: marketTab, onValueChange: (v) => setMarketTab(v), children: [
226
238
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsList, { className: "h-9", children: [
227
239
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_tabs.TabsTrigger, { value: "listings", className: "text-xs px-3 py-1", children: [