@medialane/ui 0.94.4 → 0.94.7

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.
@@ -60,6 +60,9 @@ function ActionButton({
60
60
  icon,
61
61
  big,
62
62
  ghost,
63
+ helpContent,
64
+ renderHelp,
65
+ disabled,
63
66
  children,
64
67
  className,
65
68
  style,
@@ -71,16 +74,18 @@ function ActionButton({
71
74
  "button",
72
75
  {
73
76
  ...rest,
77
+ disabled,
74
78
  className: (0, import_cn.cn)(
75
79
  "inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
76
- "bg-muted text-foreground border-none",
80
+ "bg-muted text-foreground border-none disabled:opacity-50 disabled:pointer-events-none",
77
81
  sizeClass,
78
82
  className
79
83
  ),
80
84
  style,
81
85
  children: [
82
86
  icon,
83
- children
87
+ children,
88
+ helpContent && renderHelp ? renderHelp(helpContent) : null
84
89
  ]
85
90
  }
86
91
  );
@@ -92,16 +97,18 @@ function ActionButton({
92
97
  "button",
93
98
  {
94
99
  ...rest,
100
+ disabled,
95
101
  className: (0, import_cn.cn)(
96
102
  "ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
97
- "bg-card text-foreground border-none relative",
103
+ "bg-transparent text-foreground border-none relative disabled:opacity-40 disabled:pointer-events-none",
98
104
  sizeClass,
99
105
  className
100
106
  ),
101
107
  style: { "--ml-grad": grad, ...style },
102
108
  children: [
103
109
  icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "inline-flex", style: { color: fg }, children: icon }),
104
- children
110
+ children,
111
+ helpContent && renderHelp ? renderHelp(helpContent) : null
105
112
  ]
106
113
  }
107
114
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/action-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst ACTION_GRADIENTS: Record<string, [string, string, string]> = {\n buy: ['#3b7bff', '#8a5cf6', '#3b7bff'],\n submit: ['#d6359a', '#5b4ce6', '#d6359a'],\n offer: ['#f6608f', '#fb8b46', '#f6608f'],\n remix: ['#8a5cf6', '#f6608f', '#8a5cf6'],\n license: ['#3b7bff', '#5b4ce6', '#3b7bff'],\n};\n\nconst ACTION_FOREGROUNDS: Record<string, string> = {\n buy: '#3b7bff',\n submit: '#5b4ce6',\n offer: '#fb7a32',\n remix: '#8a3ff0',\n license: '#3b7bff',\n};\n\nconst TONE_GRADIENTS: Record<string, [string, string, string]> = {\n blue: ['#3b7bff', '#5b4ce6', '#3b7bff'],\n indigo: ['#5b4ce6', '#8a5cf6', '#5b4ce6'],\n purple: ['#8a5cf6', '#f6608f', '#8a5cf6'],\n orange: ['#fb8b46', '#f6608f', '#fb8b46'],\n red: ['#ef5a5a', '#f6608f', '#ef5a5a'],\n rose: ['#f6608f', '#fb8b46', '#f6608f'],\n};\n\nconst TONE_FOREGROUNDS: Record<string, string> = {\n blue: '#2f6bff',\n indigo: '#5b4ce6',\n purple: '#8a3ff0',\n orange: '#fb7a32',\n red: '#ef5a5a',\n rose: '#f6608f',\n};\n\nexport type ActionKey = keyof typeof ACTION_GRADIENTS;\nexport type ToneKey = keyof typeof TONE_GRADIENTS;\n\nexport interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Semantic action — hue signals the action, never decorative. */\n action?: ActionKey;\n /** Tone — for secondary/owner actions. Ignored when action is set. */\n tone?: ToneKey;\n icon?: React.ReactNode;\n /** Tall 54px variant for hero contexts. */\n big?: boolean;\n /** Ghost: no gradient border, muted surface fill. */\n ghost?: boolean;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n ghost,\n children,\n className,\n style,\n ...rest\n}: ActionButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[13px] text-[15px]\"\n : \"h-[46px] px-5 rounded-[13px] text-sm\";\n\n if (ghost) {\n return (\n <button\n {...rest}\n className={cn(\n \"inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap\",\n \"bg-muted text-foreground border-none\",\n sizeClass,\n className,\n )}\n style={style}\n >\n {icon}{children}\n </button>\n );\n }\n\n const gradColors =\n action ? ACTION_GRADIENTS[action] :\n tone ? TONE_GRADIENTS[tone] :\n ACTION_GRADIENTS.buy;\n\n const fg =\n action ? ACTION_FOREGROUNDS[action] :\n tone ? TONE_FOREGROUNDS[tone] :\n ACTION_FOREGROUNDS.buy;\n\n const grad = `linear-gradient(115deg, ${gradColors.join(',')})`;\n\n return (\n <button\n {...rest}\n className={cn(\n \"ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap\",\n \"bg-card text-foreground border-none relative\",\n sizeClass,\n className,\n )}\n style={{ '--ml-grad': grad, ...style } as React.CSSProperties}\n >\n {icon && <span className=\"inline-flex\" style={{ color: fg }}>{icon}</span>}\n {children}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsEM;AApEN,gBAAmB;AAEnB,MAAM,mBAA6D;AAAA,EACjE,KAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,QAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,OAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,OAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,SAAS,CAAC,WAAW,WAAW,SAAS;AAC3C;AAEA,MAAM,qBAA6C;AAAA,EACjD,KAAS;AAAA,EACT,QAAS;AAAA,EACT,OAAS;AAAA,EACT,OAAS;AAAA,EACT,SAAS;AACX;AAEA,MAAM,iBAA2D;AAAA,EAC/D,MAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,QAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,QAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,QAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,KAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,MAAQ,CAAC,WAAW,WAAW,SAAS;AAC1C;AAEA,MAAM,mBAA2C;AAAA,EAC/C,MAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAQ;AAAA,EACR,MAAQ;AACV;AAiBO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,YAAY,MACd,6CACA;AAEJ,MAAI,OAAO;AACT,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,eAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,UAAM;AAAA;AAAA;AAAA,IACT;AAAA,EAEJ;AAEA,QAAM,aACJ,SAAS,iBAAiB,MAAM,IAChC,OAAS,eAAe,IAAI,IAC5B,iBAAiB;AAEnB,QAAM,KACJ,SAAS,mBAAmB,MAAM,IAClC,OAAS,iBAAiB,IAAI,IAC9B,mBAAmB;AAErB,QAAM,OAAO,2BAA2B,WAAW,KAAK,GAAG,CAAC;AAE5D,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,OAAO,EAAE,aAAa,MAAM,GAAG,MAAM;AAAA,MAEpC;AAAA,gBAAQ,4CAAC,UAAK,WAAU,eAAc,OAAO,EAAE,OAAO,GAAG,GAAI,gBAAK;AAAA,QAClE;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/action-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst ACTION_GRADIENTS: Record<string, [string, string, string]> = {\n buy: ['#3b7bff', '#8a5cf6', '#3b7bff'],\n submit: ['#d6359a', '#5b4ce6', '#d6359a'],\n offer: ['#f6608f', '#fb8b46', '#f6608f'],\n remix: ['#8a5cf6', '#f6608f', '#8a5cf6'],\n license: ['#3b7bff', '#5b4ce6', '#3b7bff'],\n};\n\nconst ACTION_FOREGROUNDS: Record<string, string> = {\n buy: '#3b7bff',\n submit: '#5b4ce6',\n offer: '#fb7a32',\n remix: '#8a3ff0',\n license: '#3b7bff',\n};\n\nconst TONE_GRADIENTS: Record<string, [string, string, string]> = {\n blue: ['#3b7bff', '#5b4ce6', '#3b7bff'],\n indigo: ['#5b4ce6', '#8a5cf6', '#5b4ce6'],\n purple: ['#8a5cf6', '#f6608f', '#8a5cf6'],\n orange: ['#fb8b46', '#f6608f', '#fb8b46'],\n red: ['#ef5a5a', '#f6608f', '#ef5a5a'],\n rose: ['#f6608f', '#fb8b46', '#f6608f'],\n};\n\nconst TONE_FOREGROUNDS: Record<string, string> = {\n blue: '#2f6bff',\n indigo: '#5b4ce6',\n purple: '#8a3ff0',\n orange: '#fb7a32',\n red: '#ef5a5a',\n rose: '#f6608f',\n};\n\nexport type ActionKey = keyof typeof ACTION_GRADIENTS;\nexport type ToneKey = keyof typeof TONE_GRADIENTS;\n\nexport interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Semantic action — hue signals the action, never decorative. */\n action?: ActionKey;\n /** Tone — for secondary/owner actions. Ignored when action is set. */\n tone?: ToneKey;\n icon?: React.ReactNode;\n /** Tall 54px variant for hero contexts. */\n big?: boolean;\n /** Ghost: no gradient border, muted surface fill. */\n ghost?: boolean;\n /**\n * Inline help/info affordance, rendered next to the label via `renderHelp`\n * — a render-prop rather than a built-in tooltip because this package\n * can't depend on an app-specific tooltip primitive.\n */\n helpContent?: string;\n renderHelp?: (content: string) => React.ReactNode;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n ghost,\n helpContent,\n renderHelp,\n disabled,\n children,\n className,\n style,\n ...rest\n}: ActionButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[13px] text-[15px]\"\n : \"h-[46px] px-5 rounded-[13px] text-sm\";\n\n if (ghost) {\n return (\n <button\n {...rest}\n disabled={disabled}\n className={cn(\n \"inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap\",\n \"bg-muted text-foreground border-none disabled:opacity-50 disabled:pointer-events-none\",\n sizeClass,\n className,\n )}\n style={style}\n >\n {icon}{children}\n {helpContent && renderHelp ? renderHelp(helpContent) : null}\n </button>\n );\n }\n\n const gradColors =\n action ? ACTION_GRADIENTS[action] :\n tone ? TONE_GRADIENTS[tone] :\n ACTION_GRADIENTS.buy;\n\n const fg =\n action ? ACTION_FOREGROUNDS[action] :\n tone ? TONE_FOREGROUNDS[tone] :\n ACTION_FOREGROUNDS.buy;\n\n const grad = `linear-gradient(115deg, ${gradColors.join(',')})`;\n\n return (\n <button\n {...rest}\n disabled={disabled}\n className={cn(\n \"ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap\",\n \"bg-transparent text-foreground border-none relative disabled:opacity-40 disabled:pointer-events-none\",\n sizeClass,\n className,\n )}\n style={{ '--ml-grad': grad, ...style } as React.CSSProperties}\n >\n {icon && <span className=\"inline-flex\" style={{ color: fg }}>{icon}</span>}\n {children}\n {helpContent && renderHelp ? renderHelp(helpContent) : null}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgFM;AA9EN,gBAAmB;AAEnB,MAAM,mBAA6D;AAAA,EACjE,KAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,QAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,OAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,OAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,SAAS,CAAC,WAAW,WAAW,SAAS;AAC3C;AAEA,MAAM,qBAA6C;AAAA,EACjD,KAAS;AA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A,MACA,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,OAAO,EAAE,aAAa,MAAM,GAAG,MAAM;AAAA,MAEpC;AAAA,gBAAQ,4CAAC,UAAK,WAAU,eAAc,OAAO,EAAE,OAAO,GAAG,GAAI,gBAAK;AAAA,QAClE;AAAA,QACA,eAAe,aAAa,WAAW,WAAW,IAAI;AAAA;AAAA;AAAA,EACzD;AAEJ;","names":[]}
@@ -14,7 +14,14 @@ interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement
14
14
  big?: boolean;
15
15
  /** Ghost: no gradient border, muted surface fill. */
16
16
  ghost?: boolean;
17
+ /**
18
+ * Inline help/info affordance, rendered next to the label via `renderHelp`
19
+ * — a render-prop rather than a built-in tooltip because this package
20
+ * can't depend on an app-specific tooltip primitive.
21
+ */
22
+ helpContent?: string;
23
+ renderHelp?: (content: string) => React.ReactNode;
17
24
  }
18
- declare function ActionButton({ action, tone, icon, big, ghost, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
25
+ declare function ActionButton({ action, tone, icon, big, ghost, helpContent, renderHelp, disabled, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
19
26
 
20
27
  export { ActionButton, type ActionButtonProps, type ActionKey, type ToneKey };
@@ -14,7 +14,14 @@ interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement
14
14
  big?: boolean;
15
15
  /** Ghost: no gradient border, muted surface fill. */
16
16
  ghost?: boolean;
17
+ /**
18
+ * Inline help/info affordance, rendered next to the label via `renderHelp`
19
+ * — a render-prop rather than a built-in tooltip because this package
20
+ * can't depend on an app-specific tooltip primitive.
21
+ */
22
+ helpContent?: string;
23
+ renderHelp?: (content: string) => React.ReactNode;
17
24
  }
18
- declare function ActionButton({ action, tone, icon, big, ghost, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
25
+ declare function ActionButton({ action, tone, icon, big, ghost, helpContent, renderHelp, disabled, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
19
26
 
20
27
  export { ActionButton, type ActionButtonProps, type ActionKey, type ToneKey };
@@ -37,6 +37,9 @@ function ActionButton({
37
37
  icon,
38
38
  big,
39
39
  ghost,
40
+ helpContent,
41
+ renderHelp,
42
+ disabled,
40
43
  children,
41
44
  className,
42
45
  style,
@@ -48,16 +51,18 @@ function ActionButton({
48
51
  "button",
49
52
  {
50
53
  ...rest,
54
+ disabled,
51
55
  className: cn(
52
56
  "inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
53
- "bg-muted text-foreground border-none",
57
+ "bg-muted text-foreground border-none disabled:opacity-50 disabled:pointer-events-none",
54
58
  sizeClass,
55
59
  className
56
60
  ),
57
61
  style,
58
62
  children: [
59
63
  icon,
60
- children
64
+ children,
65
+ helpContent && renderHelp ? renderHelp(helpContent) : null
61
66
  ]
62
67
  }
63
68
  );
@@ -69,16 +74,18 @@ function ActionButton({
69
74
  "button",
70
75
  {
71
76
  ...rest,
77
+ disabled,
72
78
  className: cn(
73
79
  "ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
74
- "bg-card text-foreground border-none relative",
80
+ "bg-transparent text-foreground border-none relative disabled:opacity-40 disabled:pointer-events-none",
75
81
  sizeClass,
76
82
  className
77
83
  ),
78
84
  style: { "--ml-grad": grad, ...style },
79
85
  children: [
80
86
  icon && /* @__PURE__ */ jsx("span", { className: "inline-flex", style: { color: fg }, children: icon }),
81
- children
87
+ children,
88
+ helpContent && renderHelp ? renderHelp(helpContent) : null
82
89
  ]
83
90
  }
84
91
  );
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/action-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst ACTION_GRADIENTS: Record<string, [string, string, string]> = {\n buy: ['#3b7bff', '#8a5cf6', '#3b7bff'],\n submit: ['#d6359a', '#5b4ce6', '#d6359a'],\n offer: ['#f6608f', '#fb8b46', '#f6608f'],\n remix: ['#8a5cf6', '#f6608f', '#8a5cf6'],\n license: ['#3b7bff', '#5b4ce6', '#3b7bff'],\n};\n\nconst ACTION_FOREGROUNDS: Record<string, string> = {\n buy: '#3b7bff',\n submit: '#5b4ce6',\n offer: '#fb7a32',\n remix: '#8a3ff0',\n license: '#3b7bff',\n};\n\nconst TONE_GRADIENTS: Record<string, [string, string, string]> = {\n blue: ['#3b7bff', '#5b4ce6', '#3b7bff'],\n indigo: ['#5b4ce6', '#8a5cf6', '#5b4ce6'],\n purple: ['#8a5cf6', '#f6608f', '#8a5cf6'],\n orange: ['#fb8b46', '#f6608f', '#fb8b46'],\n red: ['#ef5a5a', '#f6608f', '#ef5a5a'],\n rose: ['#f6608f', '#fb8b46', '#f6608f'],\n};\n\nconst TONE_FOREGROUNDS: Record<string, string> = {\n blue: '#2f6bff',\n indigo: '#5b4ce6',\n purple: '#8a3ff0',\n orange: '#fb7a32',\n red: '#ef5a5a',\n rose: '#f6608f',\n};\n\nexport type ActionKey = keyof typeof ACTION_GRADIENTS;\nexport type ToneKey = keyof typeof TONE_GRADIENTS;\n\nexport interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Semantic action — hue signals the action, never decorative. */\n action?: ActionKey;\n /** Tone — for secondary/owner actions. Ignored when action is set. */\n tone?: ToneKey;\n icon?: React.ReactNode;\n /** Tall 54px variant for hero contexts. */\n big?: boolean;\n /** Ghost: no gradient border, muted surface fill. */\n ghost?: boolean;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n ghost,\n children,\n className,\n style,\n ...rest\n}: ActionButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[13px] text-[15px]\"\n : \"h-[46px] px-5 rounded-[13px] text-sm\";\n\n if (ghost) {\n return (\n <button\n {...rest}\n className={cn(\n \"inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap\",\n \"bg-muted text-foreground border-none\",\n sizeClass,\n className,\n )}\n style={style}\n >\n {icon}{children}\n </button>\n );\n }\n\n const gradColors =\n action ? ACTION_GRADIENTS[action] :\n tone ? TONE_GRADIENTS[tone] :\n ACTION_GRADIENTS.buy;\n\n const fg =\n action ? ACTION_FOREGROUNDS[action] :\n tone ? TONE_FOREGROUNDS[tone] :\n ACTION_FOREGROUNDS.buy;\n\n const grad = `linear-gradient(115deg, ${gradColors.join(',')})`;\n\n return (\n <button\n {...rest}\n className={cn(\n \"ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap\",\n \"bg-card text-foreground border-none relative\",\n sizeClass,\n className,\n )}\n style={{ '--ml-grad': grad, ...style } as React.CSSProperties}\n >\n {icon && <span className=\"inline-flex\" style={{ color: fg }}>{icon}</span>}\n {children}\n </button>\n );\n}\n"],"mappings":";AAsEM,SAsCS,KAtCT;AApEN,SAAS,UAAU;AAEnB,MAAM,mBAA6D;AAAA,EACjE,KAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,QAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,OAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,OAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,SAAS,CAAC,WAAW,WAAW,SAAS;AAC3C;AAEA,MAAM,qBAA6C;AAAA,EACjD,KAAS;AAAA,EACT,QAAS;AAAA,EACT,OAAS;AAAA,EACT,OAAS;AAAA,EACT,SAAS;AACX;AAEA,MAAM,iBAA2D;AAAA,EAC/D,MAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,QAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,QAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,QAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,KAAQ,CAAC,WAAW,WAAW,SAAS;AAAA,EACxC,MAAQ,CAAC,WAAW,WAAW,SAAS;AAC1C;AAEA,MAAM,mBAA2C;AAAA,EAC/C,MAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,KAAQ;AAAA,EACR,MAAQ;AACV;AAiBO,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,YAAY,MACd,6CACA;AAEJ,MAAI,OAAO;AACT,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,UAAM;AAAA;AAAA;AAAA,IACT;AAAA,EAEJ;AAEA,QAAM,aACJ,SAAS,iBAAiB,MAAM,IAChC,OAAS,eAAe,IAAI,IAC5B,iBAAiB;AAEnB,QAAM,KACJ,SAAS,mBAAmB,MAAM,IAClC,OAAS,iBAAiB,IAAI,IAC9B,mBAAmB;AAErB,QAAM,OAAO,2BAA2B,WAAW,KAAK,GAAG,CAAC;AAE5D,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,OAAO,EAAE,aAAa,MAAM,GAAG,MAAM;AAAA,MAEpC;AAAA,gBAAQ,oBAAC,UAAK,WAAU,eAAc,OAAO,EAAE,OAAO,GAAG,GAAI,gBAAK;AAAA,QAClE;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/action-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nconst ACTION_GRADIENTS: Record<string, [string, string, string]> = {\n buy: ['#3b7bff', '#8a5cf6', '#3b7bff'],\n submit: ['#d6359a', '#5b4ce6', '#d6359a'],\n offer: ['#f6608f', '#fb8b46', '#f6608f'],\n remix: ['#8a5cf6', '#f6608f', '#8a5cf6'],\n license: ['#3b7bff', '#5b4ce6', '#3b7bff'],\n};\n\nconst ACTION_FOREGROUNDS: Record<string, string> = {\n buy: '#3b7bff',\n submit: '#5b4ce6',\n offer: '#fb7a32',\n remix: '#8a3ff0',\n license: '#3b7bff',\n};\n\nconst TONE_GRADIENTS: Record<string, [string, string, string]> = {\n blue: ['#3b7bff', '#5b4ce6', '#3b7bff'],\n indigo: ['#5b4ce6', '#8a5cf6', '#5b4ce6'],\n purple: ['#8a5cf6', '#f6608f', '#8a5cf6'],\n orange: ['#fb8b46', '#f6608f', '#fb8b46'],\n red: ['#ef5a5a', '#f6608f', '#ef5a5a'],\n rose: ['#f6608f', '#fb8b46', '#f6608f'],\n};\n\nconst TONE_FOREGROUNDS: Record<string, string> = {\n blue: '#2f6bff',\n indigo: '#5b4ce6',\n purple: '#8a3ff0',\n orange: '#fb7a32',\n red: '#ef5a5a',\n rose: '#f6608f',\n};\n\nexport type ActionKey = keyof typeof ACTION_GRADIENTS;\nexport type ToneKey = keyof typeof TONE_GRADIENTS;\n\nexport interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Semantic action — hue signals the action, never decorative. */\n action?: ActionKey;\n /** Tone — for secondary/owner actions. Ignored when action is set. */\n tone?: ToneKey;\n icon?: React.ReactNode;\n /** Tall 54px variant for hero contexts. */\n big?: boolean;\n /** Ghost: no gradient border, muted surface fill. */\n ghost?: boolean;\n /**\n * Inline help/info affordance, rendered next to the label via `renderHelp`\n * — a render-prop rather than a built-in tooltip because this package\n * can't depend on an app-specific tooltip primitive.\n */\n helpContent?: string;\n renderHelp?: (content: string) => React.ReactNode;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n ghost,\n helpContent,\n renderHelp,\n disabled,\n children,\n className,\n style,\n ...rest\n}: ActionButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[13px] text-[15px]\"\n : \"h-[46px] px-5 rounded-[13px] text-sm\";\n\n if (ghost) {\n return (\n <button\n {...rest}\n disabled={disabled}\n className={cn(\n \"inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap\",\n \"bg-muted text-foreground border-none disabled:opacity-50 disabled:pointer-events-none\",\n sizeClass,\n className,\n )}\n style={style}\n >\n {icon}{children}\n {helpContent && renderHelp ? renderHelp(helpContent) : null}\n </button>\n );\n }\n\n const gradColors =\n action ? ACTION_GRADIENTS[action] :\n tone ? TONE_GRADIENTS[tone] :\n ACTION_GRADIENTS.buy;\n\n const fg =\n action ? ACTION_FOREGROUNDS[action] :\n tone ? TONE_FOREGROUNDS[tone] :\n ACTION_FOREGROUNDS.buy;\n\n const grad = `linear-gradient(115deg, ${gradColors.join(',')})`;\n\n return (\n <button\n {...rest}\n disabled={disabled}\n className={cn(\n \"ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap\",\n \"bg-transparent text-foreground border-none relative disabled:opacity-40 disabled:pointer-events-none\",\n sizeClass,\n className,\n )}\n style={{ '--ml-grad': grad, ...style } as React.CSSProperties}\n >\n {icon && <span className=\"inline-flex\" style={{ color: fg }}>{icon}</span>}\n {children}\n {helpContent && renderHelp ? renderHelp(helpContent) : null}\n </button>\n );\n}\n"],"mappings":";AAgFM,SAyCS,KAzCT;AA9EN,SAAS,UAAU;AAEnB,MAAM,mBAA6D;AAAA,EACjE,KAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,QAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,OAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,OAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,SAAS,CAAC,WAAW,WAAW,SAAS;AAC3C;AAEA,MAAM,qBAA6C;AAAA,EACjD,KAAS;AAAA,EACT,QAAS;AAAA,EACT,OAAS;AAAA,EACT,OAAS;AAAA,EACT,SAAS;AACX;AAEA,MAAM,iBAA2D;A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AAa,MAAM,GAAG,MAAM;AAAA,MAEpC;AAAA,gBAAQ,oBAAC,UAAK,WAAU,eAAc,OAAO,EAAE,OAAO,GAAG,GAAI,gBAAK;AAAA,QAClE;AAAA,QACA,eAAe,aAAa,WAAW,WAAW,IAAI;AAAA;AAAA;AAAA,EACzD;AAEJ;","names":[]}
@@ -26,30 +26,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
26
26
  var import_lucide_react = require("lucide-react");
27
27
  var import_currency_icon = require("./currency-icon.js");
28
28
  var import_address_display = require("./address-display.js");
29
+ var import_action_button = require("./action-button.js");
29
30
  var import_format = require("../utils/format.js");
30
31
  var import_time = require("../utils/time.js");
31
- const actionToneClass = {
32
- blue: "bg-brand-blue",
33
- orange: "bg-brand-orange",
34
- purple: "bg-brand-purple",
35
- destructive: "bg-destructive",
36
- transparent: "bg-transparent"
37
- };
38
- function ActionButton({ label, icon, onClick, tone, disabled = false, helpContent, renderHelp }) {
39
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: `btn-border-animated p-[1px] rounded-2xl ${disabled ? "opacity-40 pointer-events-none" : ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
40
- "button",
41
- {
42
- className: `w-full h-10 rounded-[15px] flex items-center justify-center gap-2 px-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] disabled:opacity-50 ${actionToneClass[tone]}`,
43
- disabled,
44
- onClick,
45
- children: [
46
- icon,
47
- label,
48
- helpContent ? renderHelp(helpContent) : null
49
- ]
50
- }
51
- ) });
52
- }
53
32
  function StatRow({ floorPriceRaw, lastSaleRaw }) {
54
33
  const floor = floorPriceRaw ? (0, import_format.parsePriceDisplay)(floorPriceRaw) : null;
55
34
  const lastSale = lastSaleRaw ? (0, import_format.parsePriceDisplay)(lastSaleRaw) : null;
@@ -117,83 +96,83 @@ function AssetMarketplacePanel({
117
96
  isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
118
97
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
119
98
  myListing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
120
- ActionButton,
99
+ import_action_button.ActionButton,
121
100
  {
122
- label: "Cancel Listing",
123
101
  icon: isProcessing ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.X, { className: "h-4 w-4" }),
124
102
  onClick: () => onCancelClick(myListing),
125
103
  disabled: isProcessing,
126
- tone: "destructive",
127
- renderHelp
104
+ tone: "red",
105
+ renderHelp,
106
+ children: "Cancel Listing"
128
107
  }
129
108
  ) : null,
130
- !myListing || isERC1155 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "List on Marketplace", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "blue", renderHelp }) : null,
131
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Transfer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, tone: "orange", renderHelp }),
109
+ !myListing || isERC1155 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { tone: "blue", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, renderHelp, children: "List on Marketplace" }) : null,
110
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { tone: "orange", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, renderHelp, children: "Transfer" }),
132
111
  remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
133
- ActionButton,
112
+ import_action_button.ActionButton,
134
113
  {
135
- label: "Remix",
114
+ action: "remix",
136
115
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
137
116
  onClick: onOpenRemix,
138
117
  helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
139
- tone: "purple",
140
- renderHelp
118
+ renderHelp,
119
+ children: "Remix"
141
120
  }
142
121
  ) : null,
143
122
  showSponsorSolicitOption && onOpenSponsorSolicit ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
144
- ActionButton,
123
+ import_action_button.ActionButton,
145
124
  {
146
- label: "Open for Sponsorship",
125
+ tone: "blue",
147
126
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Handshake, { className: "h-4 w-4" }),
148
127
  onClick: onOpenSponsorSolicit,
149
128
  helpContent: "Let sponsors bid on a license for this asset.",
150
- tone: "blue",
151
- renderHelp
129
+ renderHelp,
130
+ children: "Open for Sponsorship"
152
131
  }
153
132
  ) : null
154
133
  ] }),
155
134
  canBuyMore && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
156
135
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "border-t border-border/40 pt-2 mt-1" }),
157
136
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
158
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
159
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp })
137
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { action: "buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), renderHelp, children: "Buy" }),
138
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { action: "offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, renderHelp, children: "Make offer" })
160
139
  ] })
161
140
  ] })
162
141
  ] }) : isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
163
142
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
164
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
165
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp }),
143
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { action: "buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), renderHelp, children: "Buy" }),
144
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { action: "offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, renderHelp, children: "Make offer" }),
166
145
  remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
167
- ActionButton,
146
+ import_action_button.ActionButton,
168
147
  {
169
- label: "Remix",
148
+ action: "remix",
170
149
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
171
150
  onClick: onOpenRemix,
172
151
  helpContent: "Create your own attributed derivative of this work.",
173
- tone: "purple",
174
- renderHelp
152
+ renderHelp,
153
+ children: "Remix"
175
154
  }
176
155
  ) : null,
177
156
  showDealOption && onProposeDeal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
178
- ActionButton,
157
+ import_action_button.ActionButton,
179
158
  {
180
- label: "License",
159
+ action: "license",
181
160
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }),
182
161
  onClick: onProposeDeal,
183
162
  helpContent: "Propose a license deal to the creator to use this work.",
184
- tone: "blue",
185
- renderHelp
163
+ renderHelp,
164
+ children: "License"
186
165
  }
187
166
  ) : null,
188
167
  showSponsorOption && onOpenSponsorProposal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
189
- ActionButton,
168
+ import_action_button.ActionButton,
190
169
  {
191
- label: "Sponsor this IP",
170
+ tone: "blue",
192
171
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Handshake, { className: "h-4 w-4" }),
193
172
  onClick: onOpenSponsorProposal,
194
173
  helpContent: "Propose to sponsor this creator's work \u2014 pay them directly for a license, no escrow.",
195
- tone: "blue",
196
- renderHelp
174
+ renderHelp,
175
+ children: "Sponsor this IP"
197
176
  }
198
177
  ) : null
199
178
  ] }),
@@ -202,52 +181,52 @@ function AssetMarketplacePanel({
202
181
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
203
182
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(StatRow, { floorPriceRaw, lastSaleRaw }),
204
183
  isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
205
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "List on Marketplace", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "transparent", renderHelp }),
206
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Transfer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, tone: "orange", renderHelp }),
184
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { tone: "blue", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Tag, { className: "h-4 w-4" }), onClick: onOpenListing, renderHelp, children: "List on Marketplace" }),
185
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { tone: "orange", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, renderHelp, children: "Transfer" }),
207
186
  remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
208
- ActionButton,
187
+ import_action_button.ActionButton,
209
188
  {
210
- label: "Remix",
189
+ action: "remix",
211
190
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
212
191
  onClick: onOpenRemix,
213
192
  helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
214
- tone: "purple",
215
- renderHelp
193
+ renderHelp,
194
+ children: "Remix"
216
195
  }
217
196
  ) : null,
218
197
  showSponsorSolicitOption && onOpenSponsorSolicit ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
219
- ActionButton,
198
+ import_action_button.ActionButton,
220
199
  {
221
- label: "Open for Sponsorship",
200
+ tone: "blue",
222
201
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Handshake, { className: "h-4 w-4" }),
223
202
  onClick: onOpenSponsorSolicit,
224
203
  helpContent: "Let sponsors bid on a license for this asset.",
225
- tone: "blue",
226
- renderHelp
204
+ renderHelp,
205
+ children: "Open for Sponsorship"
227
206
  }
228
207
  ) : null
229
208
  ] }) : isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "grid grid-cols-2 gap-2", children: [
230
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp }),
209
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { action: "offer", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, renderHelp, children: "Make offer" }),
231
210
  remixEnabled && onOpenRemix ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
232
- ActionButton,
211
+ import_action_button.ActionButton,
233
212
  {
234
- label: "Remix",
213
+ action: "remix",
235
214
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.GitBranch, { className: "h-4 w-4" }),
236
215
  onClick: onOpenRemix,
237
216
  helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
238
- tone: "purple",
239
- renderHelp
217
+ renderHelp,
218
+ children: "Remix"
240
219
  }
241
220
  ) : null,
242
221
  showSponsorOption && onOpenSponsorProposal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
243
- ActionButton,
222
+ import_action_button.ActionButton,
244
223
  {
245
- label: "Sponsor this IP",
224
+ tone: "blue",
246
225
  icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Handshake, { className: "h-4 w-4" }),
247
226
  onClick: onOpenSponsorProposal,
248
227
  helpContent: "Propose to sponsor this creator's work \u2014 pay them directly for a license, no escrow.",
249
- tone: "blue",
250
- renderHelp
228
+ renderHelp,
229
+ children: "Sponsor this IP"
251
230
  }
252
231
  ) : null
253
232
  ] }) : renderAuthAction("Sign in to make an offer")
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-marketplace-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport {\n ArrowRightLeft, CheckCircle, Clock, GitBranch, HandCoins, Handshake, Loader2,\n ShoppingCart, Tag, X,\n} from \"lucide-react\";\nimport { CurrencyIcon, CurrencyAmount } from \"./currency-icon.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { formatDisplayPrice, parsePriceDisplay } from \"../utils/format.js\";\nimport { timeUntil } from \"../utils/time.js\";\n\n/** Structural subset of `ApiOrder` (both apps' `@medialane/sdk` types satisfy this). */\nexport interface ApiOrderLike {\n orderHash: string;\n offerer: string;\n endTime: string;\n price: { formatted: string | null; currency: string | null };\n}\n\ninterface ActionButtonProps {\n label: string;\n icon: ReactNode;\n onClick: () => void;\n tone: \"blue\" | \"orange\" | \"purple\" | \"destructive\" | \"transparent\";\n disabled?: boolean;\n helpContent?: string;\n renderHelp: (content: string) => ReactNode;\n}\n\nconst actionToneClass: Record<ActionButtonProps[\"tone\"], string> = {\n blue: \"bg-brand-blue\",\n orange: \"bg-brand-orange\",\n purple: \"bg-brand-purple\",\n destructive: \"bg-destructive\",\n transparent: \"bg-transparent\",\n};\n\nfunction ActionButton({ label, icon, onClick, tone, disabled = false, helpContent, renderHelp }: ActionButtonProps) {\n return (\n <div className={`btn-border-animated p-[1px] rounded-2xl ${disabled ? \"opacity-40 pointer-events-none\" : \"\"}`}>\n <button\n className={`w-full h-10 rounded-[15px] flex items-center justify-center gap-2 px-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] disabled:opacity-50 ${actionToneClass[tone]}`}\n disabled={disabled}\n onClick={onClick}\n >\n {icon}\n {label}\n {helpContent ? renderHelp(helpContent) : null}\n </button>\n </div>\n );\n}\n\nexport interface AssetMarketplacePanelProps<T extends ApiOrderLike = ApiOrderLike> {\n cheapest?: T;\n isOwner: boolean;\n isSignedIn: boolean;\n isProcessing: boolean;\n isERC1155: boolean;\n isMarketLoading?: boolean;\n myListing: T | null;\n activeBids: T[];\n walletAddress?: string | null;\n remixEnabled?: boolean;\n showDealOption?: boolean;\n /** Raw \"0.07 STRK\"-style strings — already resolved by the caller. `null`/undefined renders \"—\". */\n floorPriceRaw?: string | null;\n lastSaleRaw?: string | null;\n /** Renders the sign-in/connect-wallet CTA for the given label (e.g. \"Sign in to trade\"). */\n renderAuthAction: (label: string) => ReactNode;\n /** Renders an inline help/info affordance for the given tooltip text. */\n renderHelp: (content: string) => ReactNode;\n onCancelClick: (order: T) => void;\n onAcceptBid: (order: T) => void;\n onOpenListing: () => void;\n onOpenTransfer: () => void;\n onOpenPurchase: (order: T) => void;\n onOpenOffer: () => void;\n onOpenRemix?: () => void;\n onProposeDeal?: () => void;\n /** Non-owner: propose a sponsorship deal on this asset. */\n showSponsorOption?: boolean;\n onOpenSponsorProposal?: () => void;\n /** Owner: open this asset for sponsorship bidding. */\n showSponsorSolicitOption?: boolean;\n onOpenSponsorSolicit?: () => void;\n}\n\n/** Floor + last-sale stats — each hides itself when its data is absent\n * (no dangling \"—\" placeholders), and the whole row disappears when\n * neither is available. */\nfunction StatRow({ floorPriceRaw, lastSaleRaw }: { floorPriceRaw?: string | null; lastSaleRaw?: string | null }) {\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n const lastSale = lastSaleRaw ? parsePriceDisplay(lastSaleRaw) : null;\n if (!floor?.symbol && !lastSale?.symbol) return null;\n return (\n <div className=\"flex items-center gap-4 text-sm text-muted-foreground\">\n {floor?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Floor</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n {lastSale?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Last sale</span>\n <CurrencyAmount amount={lastSale.numStr} symbol={lastSale.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n </div>\n );\n}\n\nexport function AssetMarketplacePanel<T extends ApiOrderLike = ApiOrderLike>({\n cheapest,\n isOwner,\n isSignedIn,\n isProcessing,\n isERC1155,\n isMarketLoading = false,\n myListing,\n activeBids,\n walletAddress,\n remixEnabled = false,\n showDealOption = false,\n showSponsorOption = false,\n onOpenSponsorProposal,\n showSponsorSolicitOption = false,\n onOpenSponsorSolicit,\n floorPriceRaw,\n lastSaleRaw,\n renderAuthAction,\n renderHelp,\n onCancelClick,\n onAcceptBid,\n onOpenListing,\n onOpenTransfer,\n onOpenPurchase,\n onOpenOffer,\n onOpenRemix,\n onProposeDeal,\n}: AssetMarketplacePanelProps<T>) {\n const myBid = !isOwner && walletAddress\n ? activeBids.find((bid) => bid.offerer.toLowerCase() === walletAddress.toLowerCase()) ?? null\n : null;\n\n const canBuyMore =\n isERC1155 && isOwner && !!cheapest && !!walletAddress &&\n cheapest.offerer.toLowerCase() !== walletAddress.toLowerCase();\n\n if (isMarketLoading && !cheapest) {\n return (\n <div className=\"space-y-4\">\n <div className=\"h-9 w-32 rounded-md bg-muted animate-pulse\" />\n <div className=\"h-12 w-full rounded-2xl bg-muted animate-pulse\" />\n </div>\n );\n }\n\n return (\n <div className=\"relative\">\n\n <div className=\"relative space-y-4\">\n {cheapest ? (\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap items-baseline gap-x-5 gap-y-1.5\">\n <div className=\"flex items-baseline gap-2\">\n <CurrencyIcon symbol={cheapest.price.currency ?? \"\"} size={26} />\n <span className=\"text-4xl font-bold tracking-tight\">\n {formatDisplayPrice(cheapest.price.formatted)}\n </span>\n {renderHelp(\n `${isOwner && !canBuyMore ? \"Your listing\" : \"Current price\"} · Expires ${timeUntil(cheapest.endTime)}`\n )}\n </div>\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n </div>\n\n {isOwner ? (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-2 gap-2\">\n {myListing ? (\n <ActionButton\n label=\"Cancel Listing\"\n icon={isProcessing ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <X className=\"h-4 w-4\" />}\n onClick={() => onCancelClick(myListing)}\n disabled={isProcessing}\n tone=\"destructive\"\n renderHelp={renderHelp}\n />\n ) : null}\n {/* ERC-721 has exactly one possible listing — once myListing exists,\n \"List on Marketplace\" is redundant next to \"Cancel Listing\" and\n reads as a broken/confusing pair. An ERC-1155 owner can still hold\n un-listed editions while one listing is active, so it stays for them. */}\n {(!myListing || isERC1155) ? (\n <ActionButton label=\"List on Marketplace\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} tone=\"blue\" renderHelp={renderHelp} />\n ) : null}\n <ActionButton label=\"Transfer\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n label=\"Open for Sponsorship\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n\n {canBuyMore && (\n <>\n <div className=\"border-t border-border/40 pt-2 mt-1\" />\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest!)} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n </div>\n </>\n )}\n </div>\n ) : isSignedIn ? (\n <>\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest)} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Create your own attributed derivative of this work.\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showDealOption && onProposeDeal ? (\n <ActionButton\n label=\"License\"\n icon={<HandCoins className=\"h-4 w-4\" />}\n onClick={onProposeDeal}\n helpContent=\"Propose a license deal to the creator to use this work.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n label=\"Sponsor this IP\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n {!remixEnabled && !showDealOption ? (\n <p className=\"text-xs text-muted-foreground mt-2 leading-relaxed\">\n The creator marked this asset as no-derivatives.\n </p>\n ) : null}\n </>\n ) : (\n renderAuthAction(\"Sign in to trade\")\n )}\n </div>\n ) : (\n <div className=\"space-y-3\">\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n {isOwner ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"List on Marketplace\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Transfer\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n label=\"Open for Sponsorship\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n ) : isSignedIn ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n label=\"Sponsor this IP\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n ) : (\n renderAuthAction(\"Sign in to make an offer\")\n )}\n </div>\n )}\n\n {myBid ? (\n <div className=\"rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3\">\n <div className=\"min-w-0 flex items-center gap-2.5\">\n <HandCoins className=\"h-4 w-4 text-amber-500 shrink-0\" />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-semibold text-amber-500\">Your active offer</p>\n <p className=\"text-xs text-muted-foreground flex items-center gap-1.5 mt-0.5\">\n <span className=\"font-bold text-foreground inline-flex items-center gap-1\">\n {formatDisplayPrice(myBid.price.formatted)}\n <CurrencyIcon symbol={myBid.price.currency ?? \"\"} size={12} />\n </span>\n <span>·</span>\n <Clock className=\"h-3 w-3\" />\n {timeUntil(myBid.endTime)}\n </p>\n </div>\n </div>\n <button\n className=\"shrink-0 text-xs font-semibold text-red-400 hover:text-red-300 transition-colors flex items-center gap-1\"\n onClick={() => onCancelClick(myBid)}\n >\n <X className=\"h-3.5 w-3.5\" />\n Cancel\n </button>\n </div>\n ) : null}\n\n {isOwner && activeBids.length > 0 ? (\n <div className=\"rounded-xl bg-card/40 p-5 space-y-3\">\n <p className=\"text-xs font-semibold text-muted-foreground\">\n Incoming offers ({activeBids.length})\n </p>\n <div className=\"space-y-2\">\n {activeBids.map((bid) => (\n <div key={bid.orderHash} className=\"flex items-center justify-between gap-3 rounded-lg bg-muted/30 px-3 py-2\">\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold\">\n <span className=\"inline-flex items-center gap-1.5\">\n {formatDisplayPrice(bid.price.formatted)}\n <CurrencyIcon symbol={bid.price.currency ?? \"\"} size={14} />\n </span>\n </p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <AddressDisplay address={bid.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n <span className=\"text-xs text-muted-foreground\">·</span>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(bid.endTime)}\n </div>\n </div>\n </div>\n <button\n disabled={isProcessing}\n onClick={() => onAcceptBid(bid)}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-primary-foreground disabled:opacity-50\"\n >\n <CheckCircle className=\"h-3.5 w-3.5\" />\n Accept\n </button>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwCI;AArCJ,0BAGO;AACP,2BAA6C;AAC7C,6BAA+B;AAC/B,oBAAsD;AACtD,kBAA0B;AAoB1B,MAAM,kBAA6D;AAAA,EACjE,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,aAAa;AACf;AAEA,SAAS,aAAa,EAAE,OAAO,MAAM,SAAS,MAAM,WAAW,OAAO,aAAa,WAAW,GAAsB;AAClH,SACE,4CAAC,SAAI,WAAW,2CAA2C,WAAW,mCAAmC,EAAE,IACzG;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,uLAAuL,gBAAgB,IAAI,CAAC;AAAA,MACvN;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA;AAAA,QACA,cAAc,WAAW,WAAW,IAAI;AAAA;AAAA;AAAA,EAC3C,GACF;AAEJ;AAwCA,SAAS,QAAQ,EAAE,eAAe,YAAY,GAAmE;AAC/G,QAAM,QAAQ,oBAAgB,iCAAkB,aAAa,IAAI;AACjE,QAAM,WAAW,kBAAc,iCAAkB,WAAW,IAAI;AAChE,MAAI,CAAC,OAAO,UAAU,CAAC,UAAU,OAAQ,QAAO;AAChD,SACE,6CAAC,SAAI,WAAU,yDACZ;AAAA,WAAO,UACN,6CAAC,UAAK,WAAU,6BACd;AAAA,kDAAC,UAAK,mBAAK;AAAA,MACX,4CAAC,uCAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,QAAQ,UAAU,IAAI,iBAAgB,iCAAgC;AAAA,OAC5H;AAAA,IAED,UAAU,UACT,6CAAC,UAAK,WAAU,6BACd;AAAA,kDAAC,UA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WAAU,iCAAgC;AAAA,YAC3G,4CAAC,UAAK,WAAU,iCAAgC,kBAAC;AAAA,YACjD,6CAAC,SAAI,WAAU,yDACb;AAAA,0DAAC,6BAAM,WAAU,WAAU;AAAA,kBAC1B,uBAAU,IAAI,OAAO;AAAA,eACxB;AAAA,aACF;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,SAAS,MAAM,YAAY,GAAG;AAAA,YAC9B,WAAU;AAAA,YAEV;AAAA,0DAAC,mCAAY,WAAU,eAAc;AAAA,cAAE;AAAA;AAAA;AAAA,QAEzC;AAAA,WAxBQ,IAAI,SAyBd,CACD,GACH;AAAA,OACF,IACE;AAAA,KACN,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-marketplace-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport {\n ArrowRightLeft, CheckCircle, Clock, GitBranch, HandCoins, Handshake, Loader2,\n ShoppingCart, Tag, X,\n} from \"lucide-react\";\nimport { CurrencyIcon, CurrencyAmount } from \"./currency-icon.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { formatDisplayPrice, parsePriceDisplay } from \"../utils/format.js\";\nimport { timeUntil } from \"../utils/time.js\";\n\n/** Structural subset of `ApiOrder` (both apps' `@medialane/sdk` types satisfy this). */\nexport interface ApiOrderLike {\n orderHash: string;\n offerer: string;\n endTime: string;\n price: { formatted: string | null; currency: string | null };\n}\n\nexport interface AssetMarketplacePanelProps<T extends ApiOrderLike = ApiOrderLike> {\n cheapest?: T;\n isOwner: boolean;\n isSignedIn: boolean;\n isProcessing: boolean;\n isERC1155: boolean;\n isMarketLoading?: boolean;\n myListing: T | null;\n activeBids: T[];\n walletAddress?: string | null;\n remixEnabled?: boolean;\n showDealOption?: boolean;\n /** Raw \"0.07 STRK\"-style strings — already resolved by the caller. `null`/undefined renders \"—\". */\n floorPriceRaw?: string | null;\n lastSaleRaw?: string | null;\n /** Renders the sign-in/connect-wallet CTA for the given label (e.g. \"Sign in to trade\"). */\n renderAuthAction: (label: string) => ReactNode;\n /** Renders an inline help/info affordance for the given tooltip text. */\n renderHelp: (content: string) => ReactNode;\n onCancelClick: (order: T) => void;\n onAcceptBid: (order: T) => void;\n onOpenListing: () => void;\n onOpenTransfer: () => void;\n onOpenPurchase: (order: T) => void;\n onOpenOffer: () => void;\n onOpenRemix?: () => void;\n onProposeDeal?: () => void;\n /** Non-owner: propose a sponsorship deal on this asset. */\n showSponsorOption?: boolean;\n onOpenSponsorProposal?: () => void;\n /** Owner: open this asset for sponsorship bidding. */\n showSponsorSolicitOption?: boolean;\n onOpenSponsorSolicit?: () => void;\n}\n\n/** Floor + last-sale stats — each hides itself when its data is absent\n * (no dangling \"—\" placeholders), and the whole row disappears when\n * neither is available. */\nfunction StatRow({ floorPriceRaw, lastSaleRaw }: { floorPriceRaw?: string | null; lastSaleRaw?: string | null }) {\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n const lastSale = lastSaleRaw ? parsePriceDisplay(lastSaleRaw) : null;\n if (!floor?.symbol && !lastSale?.symbol) return null;\n return (\n <div className=\"flex items-center gap-4 text-sm text-muted-foreground\">\n {floor?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Floor</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n {lastSale?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Last sale</span>\n <CurrencyAmount amount={lastSale.numStr} symbol={lastSale.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n </div>\n );\n}\n\nexport function AssetMarketplacePanel<T extends ApiOrderLike = ApiOrderLike>({\n cheapest,\n isOwner,\n isSignedIn,\n isProcessing,\n isERC1155,\n isMarketLoading = false,\n myListing,\n activeBids,\n walletAddress,\n remixEnabled = false,\n showDealOption = false,\n showSponsorOption = false,\n onOpenSponsorProposal,\n showSponsorSolicitOption = false,\n onOpenSponsorSolicit,\n floorPriceRaw,\n lastSaleRaw,\n renderAuthAction,\n renderHelp,\n onCancelClick,\n onAcceptBid,\n onOpenListing,\n onOpenTransfer,\n onOpenPurchase,\n onOpenOffer,\n onOpenRemix,\n onProposeDeal,\n}: AssetMarketplacePanelProps<T>) {\n const myBid = !isOwner && walletAddress\n ? activeBids.find((bid) => bid.offerer.toLowerCase() === walletAddress.toLowerCase()) ?? null\n : null;\n\n const canBuyMore =\n isERC1155 && isOwner && !!cheapest && !!walletAddress &&\n cheapest.offerer.toLowerCase() !== walletAddress.toLowerCase();\n\n if (isMarketLoading && !cheapest) {\n return (\n <div className=\"space-y-4\">\n <div className=\"h-9 w-32 rounded-md bg-muted animate-pulse\" />\n <div className=\"h-12 w-full rounded-2xl bg-muted animate-pulse\" />\n </div>\n );\n }\n\n return (\n <div className=\"relative\">\n\n <div className=\"relative space-y-4\">\n {cheapest ? (\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap items-baseline gap-x-5 gap-y-1.5\">\n <div className=\"flex items-baseline gap-2\">\n <CurrencyIcon symbol={cheapest.price.currency ?? \"\"} size={26} />\n <span className=\"text-4xl font-bold tracking-tight\">\n {formatDisplayPrice(cheapest.price.formatted)}\n </span>\n {renderHelp(\n `${isOwner && !canBuyMore ? \"Your listing\" : \"Current price\"} · Expires ${timeUntil(cheapest.endTime)}`\n )}\n </div>\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n </div>\n\n {isOwner ? (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-2 gap-2\">\n {myListing ? (\n <ActionButton\n icon={isProcessing ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <X className=\"h-4 w-4\" />}\n onClick={() => onCancelClick(myListing)}\n disabled={isProcessing}\n tone=\"red\"\n renderHelp={renderHelp}\n >\n Cancel Listing\n </ActionButton>\n ) : null}\n {/* ERC-721 has exactly one possible listing — once myListing exists,\n \"List on Marketplace\" is redundant next to \"Cancel Listing\" and\n reads as a broken/confusing pair. An ERC-1155 owner can still hold\n un-listed editions while one listing is active, so it stays for them. */}\n {(!myListing || isERC1155) ? (\n <ActionButton tone=\"blue\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} renderHelp={renderHelp}>List on Marketplace</ActionButton>\n ) : null}\n <ActionButton tone=\"orange\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} renderHelp={renderHelp}>Transfer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n renderHelp={renderHelp}\n >\n Open for Sponsorship\n </ActionButton>\n ) : null}\n </div>\n\n {canBuyMore && (\n <>\n <div className=\"border-t border-border/40 pt-2 mt-1\" />\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton action=\"buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest!)} renderHelp={renderHelp}>Buy</ActionButton>\n <ActionButton action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n </div>\n </>\n )}\n </div>\n ) : isSignedIn ? (\n <>\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton action=\"buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest)} renderHelp={renderHelp}>Buy</ActionButton>\n <ActionButton action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Create your own attributed derivative of this work.\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showDealOption && onProposeDeal ? (\n <ActionButton\n action=\"license\"\n icon={<HandCoins className=\"h-4 w-4\" />}\n onClick={onProposeDeal}\n helpContent=\"Propose a license deal to the creator to use this work.\"\n renderHelp={renderHelp}\n >\n License\n </ActionButton>\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n renderHelp={renderHelp}\n >\n Sponsor this IP\n </ActionButton>\n ) : null}\n </div>\n {!remixEnabled && !showDealOption ? (\n <p className=\"text-xs text-muted-foreground mt-2 leading-relaxed\">\n The creator marked this asset as no-derivatives.\n </p>\n ) : null}\n </>\n ) : (\n renderAuthAction(\"Sign in to trade\")\n )}\n </div>\n ) : (\n <div className=\"space-y-3\">\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n {isOwner ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton tone=\"blue\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} renderHelp={renderHelp}>List on Marketplace</ActionButton>\n <ActionButton tone=\"orange\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} renderHelp={renderHelp}>Transfer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n renderHelp={renderHelp}\n >\n Open for Sponsorship\n </ActionButton>\n ) : null}\n </div>\n ) : isSignedIn ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n renderHelp={renderHelp}\n >\n Sponsor this IP\n </ActionButton>\n ) : null}\n </div>\n ) : (\n renderAuthAction(\"Sign in to make an offer\")\n )}\n </div>\n )}\n\n {myBid ? (\n <div className=\"rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3\">\n <div className=\"min-w-0 flex items-center gap-2.5\">\n <HandCoins className=\"h-4 w-4 text-amber-500 shrink-0\" />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-semibold text-amber-500\">Your active offer</p>\n <p className=\"text-xs text-muted-foreground flex items-center gap-1.5 mt-0.5\">\n <span className=\"font-bold text-foreground inline-flex items-center gap-1\">\n {formatDisplayPrice(myBid.price.formatted)}\n <CurrencyIcon symbol={myBid.price.currency ?? \"\"} size={12} />\n </span>\n <span>·</span>\n <Clock className=\"h-3 w-3\" />\n {timeUntil(myBid.endTime)}\n </p>\n </div>\n </div>\n <button\n className=\"shrink-0 text-xs font-semibold text-red-400 hover:text-red-300 transition-colors flex items-center gap-1\"\n onClick={() => onCancelClick(myBid)}\n >\n <X className=\"h-3.5 w-3.5\" />\n Cancel\n </button>\n </div>\n ) : null}\n\n {isOwner && activeBids.length > 0 ? (\n <div className=\"rounded-xl bg-card/40 p-5 space-y-3\">\n <p className=\"text-xs font-semibold text-muted-foreground\">\n Incoming offers ({activeBids.length})\n </p>\n <div className=\"space-y-2\">\n {activeBids.map((bid) => (\n <div key={bid.orderHash} className=\"flex items-center justify-between gap-3 rounded-lg bg-muted/30 px-3 py-2\">\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold\">\n <span className=\"inline-flex items-center gap-1.5\">\n {formatDisplayPrice(bid.price.formatted)}\n <CurrencyIcon symbol={bid.price.currency ?? \"\"} size={14} />\n </span>\n </p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <AddressDisplay address={bid.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n <span className=\"text-xs text-muted-foreground\">·</span>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(bid.endTime)}\n </div>\n </div>\n </div>\n <button\n disabled={isProcessing}\n onClick={() => onAcceptBid(bid)}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-primary-foreground disabled:opacity-50\"\n >\n <CheckCircle className=\"h-3.5 w-3.5\" />\n Accept\n </button>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkEQ;AA/DR,0BAGO;AACP,2BAA6C;AAC7C,6BAA+B;AAC/B,2BAA6B;AAC7B,oBAAsD;AACtD,kBAA0B;AAgD1B,SAAS,QAAQ,EAAE,eAAe,YAAY,GAAmE;AAC/G,QAA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AU,4EACjC;AAAA,qDAAC,SAAI,WAAU,WACb;AAAA,sDAAC,OAAE,WAAU,qBACX,uDAAC,UAAK,WAAU,oCACb;AAAA,kDAAmB,IAAI,MAAM,SAAS;AAAA,YACvC,4CAAC,qCAAa,QAAQ,IAAI,MAAM,YAAY,IAAI,MAAM,IAAI;AAAA,aAC5D,GACF;AAAA,UACA,6CAAC,SAAI,WAAU,kCACb;AAAA,wDAAC,yCAAe,SAAS,IAAI,SAAS,OAAO,GAAG,UAAU,OAAO,WAAU,iCAAgC;AAAA,YAC3G,4CAAC,UAAK,WAAU,iCAAgC,kBAAC;AAAA,YACjD,6CAAC,SAAI,WAAU,yDACb;AAAA,0DAAC,6BAAM,WAAU,WAAU;AAAA,kBAC1B,uBAAU,IAAI,OAAO;AAAA,eACxB;AAAA,aACF;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,SAAS,MAAM,YAAY,GAAG;AAAA,YAC9B,WAAU;AAAA,YAEV;AAAA,0DAAC,mCAAY,WAAU,eAAc;AAAA,cAAE;AAAA;AAAA;AAAA,QAEzC;AAAA,WAxBQ,IAAI,SAyBd,CACD,GACH;AAAA,OACF,IACE;AAAA,KACN,GACF;AAEJ;","names":[]}
@@ -14,30 +14,9 @@ import {
14
14
  } from "lucide-react";
15
15
  import { CurrencyIcon, CurrencyAmount } from "./currency-icon.js";
16
16
  import { AddressDisplay } from "./address-display.js";
17
+ import { ActionButton } from "./action-button.js";
17
18
  import { formatDisplayPrice, parsePriceDisplay } from "../utils/format.js";
18
19
  import { timeUntil } from "../utils/time.js";
19
- const actionToneClass = {
20
- blue: "bg-brand-blue",
21
- orange: "bg-brand-orange",
22
- purple: "bg-brand-purple",
23
- destructive: "bg-destructive",
24
- transparent: "bg-transparent"
25
- };
26
- function ActionButton({ label, icon, onClick, tone, disabled = false, helpContent, renderHelp }) {
27
- return /* @__PURE__ */ jsx("div", { className: `btn-border-animated p-[1px] rounded-2xl ${disabled ? "opacity-40 pointer-events-none" : ""}`, children: /* @__PURE__ */ jsxs(
28
- "button",
29
- {
30
- className: `w-full h-10 rounded-[15px] flex items-center justify-center gap-2 px-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] disabled:opacity-50 ${actionToneClass[tone]}`,
31
- disabled,
32
- onClick,
33
- children: [
34
- icon,
35
- label,
36
- helpContent ? renderHelp(helpContent) : null
37
- ]
38
- }
39
- ) });
40
- }
41
20
  function StatRow({ floorPriceRaw, lastSaleRaw }) {
42
21
  const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;
43
22
  const lastSale = lastSaleRaw ? parsePriceDisplay(lastSaleRaw) : null;
@@ -107,81 +86,81 @@ function AssetMarketplacePanel({
107
86
  myListing ? /* @__PURE__ */ jsx(
108
87
  ActionButton,
109
88
  {
110
- label: "Cancel Listing",
111
89
  icon: isProcessing ? /* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx(X, { className: "h-4 w-4" }),
112
90
  onClick: () => onCancelClick(myListing),
113
91
  disabled: isProcessing,
114
- tone: "destructive",
115
- renderHelp
92
+ tone: "red",
93
+ renderHelp,
94
+ children: "Cancel Listing"
116
95
  }
117
96
  ) : null,
118
- !myListing || isERC1155 ? /* @__PURE__ */ jsx(ActionButton, { label: "List on Marketplace", icon: /* @__PURE__ */ jsx(Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "blue", renderHelp }) : null,
119
- /* @__PURE__ */ jsx(ActionButton, { label: "Transfer", icon: /* @__PURE__ */ jsx(ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, tone: "orange", renderHelp }),
97
+ !myListing || isERC1155 ? /* @__PURE__ */ jsx(ActionButton, { tone: "blue", icon: /* @__PURE__ */ jsx(Tag, { className: "h-4 w-4" }), onClick: onOpenListing, renderHelp, children: "List on Marketplace" }) : null,
98
+ /* @__PURE__ */ jsx(ActionButton, { tone: "orange", icon: /* @__PURE__ */ jsx(ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, renderHelp, children: "Transfer" }),
120
99
  remixEnabled && onOpenRemix ? /* @__PURE__ */ jsx(
121
100
  ActionButton,
122
101
  {
123
- label: "Remix",
102
+ action: "remix",
124
103
  icon: /* @__PURE__ */ jsx(GitBranch, { className: "h-4 w-4" }),
125
104
  onClick: onOpenRemix,
126
105
  helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
127
- tone: "purple",
128
- renderHelp
106
+ renderHelp,
107
+ children: "Remix"
129
108
  }
130
109
  ) : null,
131
110
  showSponsorSolicitOption && onOpenSponsorSolicit ? /* @__PURE__ */ jsx(
132
111
  ActionButton,
133
112
  {
134
- label: "Open for Sponsorship",
113
+ tone: "blue",
135
114
  icon: /* @__PURE__ */ jsx(Handshake, { className: "h-4 w-4" }),
136
115
  onClick: onOpenSponsorSolicit,
137
116
  helpContent: "Let sponsors bid on a license for this asset.",
138
- tone: "blue",
139
- renderHelp
117
+ renderHelp,
118
+ children: "Open for Sponsorship"
140
119
  }
141
120
  ) : null
142
121
  ] }),
143
122
  canBuyMore && /* @__PURE__ */ jsxs(Fragment, { children: [
144
123
  /* @__PURE__ */ jsx("div", { className: "border-t border-border/40 pt-2 mt-1" }),
145
124
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
146
- /* @__PURE__ */ jsx(ActionButton, { label: "Buy", icon: /* @__PURE__ */ jsx(ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
147
- /* @__PURE__ */ jsx(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ jsx(HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp })
125
+ /* @__PURE__ */ jsx(ActionButton, { action: "buy", icon: /* @__PURE__ */ jsx(ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), renderHelp, children: "Buy" }),
126
+ /* @__PURE__ */ jsx(ActionButton, { action: "offer", icon: /* @__PURE__ */ jsx(HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, renderHelp, children: "Make offer" })
148
127
  ] })
149
128
  ] })
150
129
  ] }) : isSignedIn ? /* @__PURE__ */ jsxs(Fragment, { children: [
151
130
  /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
152
- /* @__PURE__ */ jsx(ActionButton, { label: "Buy", icon: /* @__PURE__ */ jsx(ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), tone: "transparent", renderHelp }),
153
- /* @__PURE__ */ jsx(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ jsx(HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp }),
131
+ /* @__PURE__ */ jsx(ActionButton, { action: "buy", icon: /* @__PURE__ */ jsx(ShoppingCart, { className: "h-4 w-4" }), onClick: () => onOpenPurchase(cheapest), renderHelp, children: "Buy" }),
132
+ /* @__PURE__ */ jsx(ActionButton, { action: "offer", icon: /* @__PURE__ */ jsx(HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, renderHelp, children: "Make offer" }),
154
133
  remixEnabled && onOpenRemix ? /* @__PURE__ */ jsx(
155
134
  ActionButton,
156
135
  {
157
- label: "Remix",
136
+ action: "remix",
158
137
  icon: /* @__PURE__ */ jsx(GitBranch, { className: "h-4 w-4" }),
159
138
  onClick: onOpenRemix,
160
139
  helpContent: "Create your own attributed derivative of this work.",
161
- tone: "purple",
162
- renderHelp
140
+ renderHelp,
141
+ children: "Remix"
163
142
  }
164
143
  ) : null,
165
144
  showDealOption && onProposeDeal ? /* @__PURE__ */ jsx(
166
145
  ActionButton,
167
146
  {
168
- label: "License",
147
+ action: "license",
169
148
  icon: /* @__PURE__ */ jsx(HandCoins, { className: "h-4 w-4" }),
170
149
  onClick: onProposeDeal,
171
150
  helpContent: "Propose a license deal to the creator to use this work.",
172
- tone: "blue",
173
- renderHelp
151
+ renderHelp,
152
+ children: "License"
174
153
  }
175
154
  ) : null,
176
155
  showSponsorOption && onOpenSponsorProposal ? /* @__PURE__ */ jsx(
177
156
  ActionButton,
178
157
  {
179
- label: "Sponsor this IP",
158
+ tone: "blue",
180
159
  icon: /* @__PURE__ */ jsx(Handshake, { className: "h-4 w-4" }),
181
160
  onClick: onOpenSponsorProposal,
182
161
  helpContent: "Propose to sponsor this creator's work \u2014 pay them directly for a license, no escrow.",
183
- tone: "blue",
184
- renderHelp
162
+ renderHelp,
163
+ children: "Sponsor this IP"
185
164
  }
186
165
  ) : null
187
166
  ] }),
@@ -190,52 +169,52 @@ function AssetMarketplacePanel({
190
169
  ] }) : /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
191
170
  /* @__PURE__ */ jsx(StatRow, { floorPriceRaw, lastSaleRaw }),
192
171
  isOwner ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
193
- /* @__PURE__ */ jsx(ActionButton, { label: "List on Marketplace", icon: /* @__PURE__ */ jsx(Tag, { className: "h-4 w-4" }), onClick: onOpenListing, tone: "transparent", renderHelp }),
194
- /* @__PURE__ */ jsx(ActionButton, { label: "Transfer", icon: /* @__PURE__ */ jsx(ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, tone: "orange", renderHelp }),
172
+ /* @__PURE__ */ jsx(ActionButton, { tone: "blue", icon: /* @__PURE__ */ jsx(Tag, { className: "h-4 w-4" }), onClick: onOpenListing, renderHelp, children: "List on Marketplace" }),
173
+ /* @__PURE__ */ jsx(ActionButton, { tone: "orange", icon: /* @__PURE__ */ jsx(ArrowRightLeft, { className: "h-4 w-4" }), onClick: onOpenTransfer, renderHelp, children: "Transfer" }),
195
174
  remixEnabled && onOpenRemix ? /* @__PURE__ */ jsx(
196
175
  ActionButton,
197
176
  {
198
- label: "Remix",
177
+ action: "remix",
199
178
  icon: /* @__PURE__ */ jsx(GitBranch, { className: "h-4 w-4" }),
200
179
  onClick: onOpenRemix,
201
180
  helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
202
- tone: "purple",
203
- renderHelp
181
+ renderHelp,
182
+ children: "Remix"
204
183
  }
205
184
  ) : null,
206
185
  showSponsorSolicitOption && onOpenSponsorSolicit ? /* @__PURE__ */ jsx(
207
186
  ActionButton,
208
187
  {
209
- label: "Open for Sponsorship",
188
+ tone: "blue",
210
189
  icon: /* @__PURE__ */ jsx(Handshake, { className: "h-4 w-4" }),
211
190
  onClick: onOpenSponsorSolicit,
212
191
  helpContent: "Let sponsors bid on a license for this asset.",
213
- tone: "blue",
214
- renderHelp
192
+ renderHelp,
193
+ children: "Open for Sponsorship"
215
194
  }
216
195
  ) : null
217
196
  ] }) : isSignedIn ? /* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-2", children: [
218
- /* @__PURE__ */ jsx(ActionButton, { label: "Make offer", icon: /* @__PURE__ */ jsx(HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, tone: "orange", renderHelp }),
197
+ /* @__PURE__ */ jsx(ActionButton, { action: "offer", icon: /* @__PURE__ */ jsx(HandCoins, { className: "h-4 w-4" }), onClick: onOpenOffer, renderHelp, children: "Make offer" }),
219
198
  remixEnabled && onOpenRemix ? /* @__PURE__ */ jsx(
220
199
  ActionButton,
221
200
  {
222
- label: "Remix",
201
+ action: "remix",
223
202
  icon: /* @__PURE__ */ jsx(GitBranch, { className: "h-4 w-4" }),
224
203
  onClick: onOpenRemix,
225
204
  helpContent: "Build a licensed derivative of this digital asset \u2014 your remix is minted as a new onchain NFT linked to the original",
226
- tone: "purple",
227
- renderHelp
205
+ renderHelp,
206
+ children: "Remix"
228
207
  }
229
208
  ) : null,
230
209
  showSponsorOption && onOpenSponsorProposal ? /* @__PURE__ */ jsx(
231
210
  ActionButton,
232
211
  {
233
- label: "Sponsor this IP",
212
+ tone: "blue",
234
213
  icon: /* @__PURE__ */ jsx(Handshake, { className: "h-4 w-4" }),
235
214
  onClick: onOpenSponsorProposal,
236
215
  helpContent: "Propose to sponsor this creator's work \u2014 pay them directly for a license, no escrow.",
237
- tone: "blue",
238
- renderHelp
216
+ renderHelp,
217
+ children: "Sponsor this IP"
239
218
  }
240
219
  ) : null
241
220
  ] }) : renderAuthAction("Sign in to make an offer")
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-marketplace-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport {\n ArrowRightLeft, CheckCircle, Clock, GitBranch, HandCoins, Handshake, Loader2,\n ShoppingCart, Tag, X,\n} from \"lucide-react\";\nimport { CurrencyIcon, CurrencyAmount } from \"./currency-icon.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { formatDisplayPrice, parsePriceDisplay } from \"../utils/format.js\";\nimport { timeUntil } from \"../utils/time.js\";\n\n/** Structural subset of `ApiOrder` (both apps' `@medialane/sdk` types satisfy this). */\nexport interface ApiOrderLike {\n orderHash: string;\n offerer: string;\n endTime: string;\n price: { formatted: string | null; currency: string | null };\n}\n\ninterface ActionButtonProps {\n label: string;\n icon: ReactNode;\n onClick: () => void;\n tone: \"blue\" | \"orange\" | \"purple\" | \"destructive\" | \"transparent\";\n disabled?: boolean;\n helpContent?: string;\n renderHelp: (content: string) => ReactNode;\n}\n\nconst actionToneClass: Record<ActionButtonProps[\"tone\"], string> = {\n blue: \"bg-brand-blue\",\n orange: \"bg-brand-orange\",\n purple: \"bg-brand-purple\",\n destructive: \"bg-destructive\",\n transparent: \"bg-transparent\",\n};\n\nfunction ActionButton({ label, icon, onClick, tone, disabled = false, helpContent, renderHelp }: ActionButtonProps) {\n return (\n <div className={`btn-border-animated p-[1px] rounded-2xl ${disabled ? \"opacity-40 pointer-events-none\" : \"\"}`}>\n <button\n className={`w-full h-10 rounded-[15px] flex items-center justify-center gap-2 px-3 text-sm font-semibold text-white transition-all hover:brightness-110 active:scale-[0.98] disabled:opacity-50 ${actionToneClass[tone]}`}\n disabled={disabled}\n onClick={onClick}\n >\n {icon}\n {label}\n {helpContent ? renderHelp(helpContent) : null}\n </button>\n </div>\n );\n}\n\nexport interface AssetMarketplacePanelProps<T extends ApiOrderLike = ApiOrderLike> {\n cheapest?: T;\n isOwner: boolean;\n isSignedIn: boolean;\n isProcessing: boolean;\n isERC1155: boolean;\n isMarketLoading?: boolean;\n myListing: T | null;\n activeBids: T[];\n walletAddress?: string | null;\n remixEnabled?: boolean;\n showDealOption?: boolean;\n /** Raw \"0.07 STRK\"-style strings — already resolved by the caller. `null`/undefined renders \"—\". */\n floorPriceRaw?: string | null;\n lastSaleRaw?: string | null;\n /** Renders the sign-in/connect-wallet CTA for the given label (e.g. \"Sign in to trade\"). */\n renderAuthAction: (label: string) => ReactNode;\n /** Renders an inline help/info affordance for the given tooltip text. */\n renderHelp: (content: string) => ReactNode;\n onCancelClick: (order: T) => void;\n onAcceptBid: (order: T) => void;\n onOpenListing: () => void;\n onOpenTransfer: () => void;\n onOpenPurchase: (order: T) => void;\n onOpenOffer: () => void;\n onOpenRemix?: () => void;\n onProposeDeal?: () => void;\n /** Non-owner: propose a sponsorship deal on this asset. */\n showSponsorOption?: boolean;\n onOpenSponsorProposal?: () => void;\n /** Owner: open this asset for sponsorship bidding. */\n showSponsorSolicitOption?: boolean;\n onOpenSponsorSolicit?: () => void;\n}\n\n/** Floor + last-sale stats — each hides itself when its data is absent\n * (no dangling \"—\" placeholders), and the whole row disappears when\n * neither is available. */\nfunction StatRow({ floorPriceRaw, lastSaleRaw }: { floorPriceRaw?: string | null; lastSaleRaw?: string | null }) {\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n const lastSale = lastSaleRaw ? parsePriceDisplay(lastSaleRaw) : null;\n if (!floor?.symbol && !lastSale?.symbol) return null;\n return (\n <div className=\"flex items-center gap-4 text-sm text-muted-foreground\">\n {floor?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Floor</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n {lastSale?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Last sale</span>\n <CurrencyAmount amount={lastSale.numStr} symbol={lastSale.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n </div>\n );\n}\n\nexport function AssetMarketplacePanel<T extends ApiOrderLike = ApiOrderLike>({\n cheapest,\n isOwner,\n isSignedIn,\n isProcessing,\n isERC1155,\n isMarketLoading = false,\n myListing,\n activeBids,\n walletAddress,\n remixEnabled = false,\n showDealOption = false,\n showSponsorOption = false,\n onOpenSponsorProposal,\n showSponsorSolicitOption = false,\n onOpenSponsorSolicit,\n floorPriceRaw,\n lastSaleRaw,\n renderAuthAction,\n renderHelp,\n onCancelClick,\n onAcceptBid,\n onOpenListing,\n onOpenTransfer,\n onOpenPurchase,\n onOpenOffer,\n onOpenRemix,\n onProposeDeal,\n}: AssetMarketplacePanelProps<T>) {\n const myBid = !isOwner && walletAddress\n ? activeBids.find((bid) => bid.offerer.toLowerCase() === walletAddress.toLowerCase()) ?? null\n : null;\n\n const canBuyMore =\n isERC1155 && isOwner && !!cheapest && !!walletAddress &&\n cheapest.offerer.toLowerCase() !== walletAddress.toLowerCase();\n\n if (isMarketLoading && !cheapest) {\n return (\n <div className=\"space-y-4\">\n <div className=\"h-9 w-32 rounded-md bg-muted animate-pulse\" />\n <div className=\"h-12 w-full rounded-2xl bg-muted animate-pulse\" />\n </div>\n );\n }\n\n return (\n <div className=\"relative\">\n\n <div className=\"relative space-y-4\">\n {cheapest ? (\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap items-baseline gap-x-5 gap-y-1.5\">\n <div className=\"flex items-baseline gap-2\">\n <CurrencyIcon symbol={cheapest.price.currency ?? \"\"} size={26} />\n <span className=\"text-4xl font-bold tracking-tight\">\n {formatDisplayPrice(cheapest.price.formatted)}\n </span>\n {renderHelp(\n `${isOwner && !canBuyMore ? \"Your listing\" : \"Current price\"} · Expires ${timeUntil(cheapest.endTime)}`\n )}\n </div>\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n </div>\n\n {isOwner ? (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-2 gap-2\">\n {myListing ? (\n <ActionButton\n label=\"Cancel Listing\"\n icon={isProcessing ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <X className=\"h-4 w-4\" />}\n onClick={() => onCancelClick(myListing)}\n disabled={isProcessing}\n tone=\"destructive\"\n renderHelp={renderHelp}\n />\n ) : null}\n {/* ERC-721 has exactly one possible listing — once myListing exists,\n \"List on Marketplace\" is redundant next to \"Cancel Listing\" and\n reads as a broken/confusing pair. An ERC-1155 owner can still hold\n un-listed editions while one listing is active, so it stays for them. */}\n {(!myListing || isERC1155) ? (\n <ActionButton label=\"List on Marketplace\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} tone=\"blue\" renderHelp={renderHelp} />\n ) : null}\n <ActionButton label=\"Transfer\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n label=\"Open for Sponsorship\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n\n {canBuyMore && (\n <>\n <div className=\"border-t border-border/40 pt-2 mt-1\" />\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest!)} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n </div>\n </>\n )}\n </div>\n ) : isSignedIn ? (\n <>\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest)} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Create your own attributed derivative of this work.\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showDealOption && onProposeDeal ? (\n <ActionButton\n label=\"License\"\n icon={<HandCoins className=\"h-4 w-4\" />}\n onClick={onProposeDeal}\n helpContent=\"Propose a license deal to the creator to use this work.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n label=\"Sponsor this IP\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n {!remixEnabled && !showDealOption ? (\n <p className=\"text-xs text-muted-foreground mt-2 leading-relaxed\">\n The creator marked this asset as no-derivatives.\n </p>\n ) : null}\n </>\n ) : (\n renderAuthAction(\"Sign in to trade\")\n )}\n </div>\n ) : (\n <div className=\"space-y-3\">\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n {isOwner ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"List on Marketplace\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} tone=\"transparent\" renderHelp={renderHelp} />\n <ActionButton label=\"Transfer\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n label=\"Open for Sponsorship\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n ) : isSignedIn ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton label=\"Make offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} tone=\"orange\" renderHelp={renderHelp} />\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n label=\"Remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n tone=\"purple\"\n renderHelp={renderHelp}\n />\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n label=\"Sponsor this IP\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n tone=\"blue\"\n renderHelp={renderHelp}\n />\n ) : null}\n </div>\n ) : (\n renderAuthAction(\"Sign in to make an offer\")\n )}\n </div>\n )}\n\n {myBid ? (\n <div className=\"rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3\">\n <div className=\"min-w-0 flex items-center gap-2.5\">\n <HandCoins className=\"h-4 w-4 text-amber-500 shrink-0\" />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-semibold text-amber-500\">Your active offer</p>\n <p className=\"text-xs text-muted-foreground flex items-center gap-1.5 mt-0.5\">\n <span className=\"font-bold text-foreground inline-flex items-center gap-1\">\n {formatDisplayPrice(myBid.price.formatted)}\n <CurrencyIcon symbol={myBid.price.currency ?? \"\"} size={12} />\n </span>\n <span>·</span>\n <Clock className=\"h-3 w-3\" />\n {timeUntil(myBid.endTime)}\n </p>\n </div>\n </div>\n <button\n className=\"shrink-0 text-xs font-semibold text-red-400 hover:text-red-300 transition-colors flex items-center gap-1\"\n onClick={() => onCancelClick(myBid)}\n >\n <X className=\"h-3.5 w-3.5\" />\n Cancel\n </button>\n </div>\n ) : null}\n\n {isOwner && activeBids.length > 0 ? (\n <div className=\"rounded-xl bg-card/40 p-5 space-y-3\">\n <p className=\"text-xs font-semibold text-muted-foreground\">\n Incoming offers ({activeBids.length})\n </p>\n <div className=\"space-y-2\">\n {activeBids.map((bid) => (\n <div key={bid.orderHash} className=\"flex items-center justify-between gap-3 rounded-lg bg-muted/30 px-3 py-2\">\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold\">\n <span className=\"inline-flex items-center gap-1.5\">\n {formatDisplayPrice(bid.price.formatted)}\n <CurrencyIcon symbol={bid.price.currency ?? \"\"} size={14} />\n </span>\n </p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <AddressDisplay address={bid.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n <span className=\"text-xs text-muted-foreground\">·</span>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(bid.endTime)}\n </div>\n </div>\n </div>\n <button\n disabled={isProcessing}\n onClick={() => onAcceptBid(bid)}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-primary-foreground disabled:opacity-50\"\n >\n <CheckCircle className=\"h-3.5 w-3.5\" />\n Accept\n </button>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";AAwCI,SAuLc,UAvLd,KACE,YADF;AArCJ;AAAA,EACE;AAAA,EAAgB;AAAA,EAAa;AAAA,EAAO;AAAA,EAAW;AAAA,EAAW;AAAA,EAAW;AAAA,EACrE;AAAA,EAAc;AAAA,EAAK;AAAA,OACd;AACP,SAAS,cAAc,sBAAsB;AAC7C,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB,yBAAyB;AACtD,SAAS,iBAAiB;AAoB1B,MAAM,kBAA6D;AAAA,EACjE,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,aAAa;AACf;AAEA,SAAS,aAAa,EAAE,OAAO,MAAM,SAAS,MAAM,WAAW,OAAO,aAAa,WAAW,GAAsB;AAClH,SACE,oBAAC,SAAI,WAAW,2CAA2C,WAAW,mCAAmC,EAAE,IACzG;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,uLAAuL,gBAAgB,IAAI,CAAC;AAAA,MACvN;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA;AAAA,QACA,cAAc,WAAW,WAAW,IAAI;AAAA;AAAA;AAAA,EAC3C,GACF;AAEJ;AAwCA,SAAS,QAAQ,EAAE,eAAe,YAAY,GAAmE;AAC/G,QAAM,QAAQ,gBAAgB,kBAAkB,aAAa,IAAI;AACjE,QAAM,WAAW,cAAc,kBAAkB,WAAW,IAAI;AAChE,MAAI,CAAC,OAAO,UAAU,CAAC,UAAU,OAAQ,QAAO;AAChD,SACE,qBAAC,SAAI,WAAU,yDACZ;AAAA,WAAO,UACN,qBAAC,UAAK,WAAU,6BACd;AAAA,0BAAC,UAAK,mBAAK;AAAA,MACX,oBAAC,kBAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,QAAQ,UAAU,IAA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kCACb;AAAA,gCAAC,kBAAe,SAAS,IAAI,SAAS,OAAO,GAAG,UAAU,OAAO,WAAU,iCAAgC;AAAA,YAC3G,oBAAC,UAAK,WAAU,iCAAgC,kBAAC;AAAA,YACjD,qBAAC,SAAI,WAAU,yDACb;AAAA,kCAAC,SAAM,WAAU,WAAU;AAAA,cAC1B,UAAU,IAAI,OAAO;AAAA,eACxB;AAAA,aACF;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,SAAS,MAAM,YAAY,GAAG;AAAA,YAC9B,WAAU;AAAA,YAEV;AAAA,kCAAC,eAAY,WAAU,eAAc;AAAA,cAAE;AAAA;AAAA;AAAA,QAEzC;AAAA,WAxBQ,IAAI,SAyBd,CACD,GACH;AAAA,OACF,IACE;AAAA,KACN,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-marketplace-panel.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport {\n ArrowRightLeft, CheckCircle, Clock, GitBranch, HandCoins, Handshake, Loader2,\n ShoppingCart, Tag, X,\n} from \"lucide-react\";\nimport { CurrencyIcon, CurrencyAmount } from \"./currency-icon.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { formatDisplayPrice, parsePriceDisplay } from \"../utils/format.js\";\nimport { timeUntil } from \"../utils/time.js\";\n\n/** Structural subset of `ApiOrder` (both apps' `@medialane/sdk` types satisfy this). */\nexport interface ApiOrderLike {\n orderHash: string;\n offerer: string;\n endTime: string;\n price: { formatted: string | null; currency: string | null };\n}\n\nexport interface AssetMarketplacePanelProps<T extends ApiOrderLike = ApiOrderLike> {\n cheapest?: T;\n isOwner: boolean;\n isSignedIn: boolean;\n isProcessing: boolean;\n isERC1155: boolean;\n isMarketLoading?: boolean;\n myListing: T | null;\n activeBids: T[];\n walletAddress?: string | null;\n remixEnabled?: boolean;\n showDealOption?: boolean;\n /** Raw \"0.07 STRK\"-style strings — already resolved by the caller. `null`/undefined renders \"—\". */\n floorPriceRaw?: string | null;\n lastSaleRaw?: string | null;\n /** Renders the sign-in/connect-wallet CTA for the given label (e.g. \"Sign in to trade\"). */\n renderAuthAction: (label: string) => ReactNode;\n /** Renders an inline help/info affordance for the given tooltip text. */\n renderHelp: (content: string) => ReactNode;\n onCancelClick: (order: T) => void;\n onAcceptBid: (order: T) => void;\n onOpenListing: () => void;\n onOpenTransfer: () => void;\n onOpenPurchase: (order: T) => void;\n onOpenOffer: () => void;\n onOpenRemix?: () => void;\n onProposeDeal?: () => void;\n /** Non-owner: propose a sponsorship deal on this asset. */\n showSponsorOption?: boolean;\n onOpenSponsorProposal?: () => void;\n /** Owner: open this asset for sponsorship bidding. */\n showSponsorSolicitOption?: boolean;\n onOpenSponsorSolicit?: () => void;\n}\n\n/** Floor + last-sale stats — each hides itself when its data is absent\n * (no dangling \"—\" placeholders), and the whole row disappears when\n * neither is available. */\nfunction StatRow({ floorPriceRaw, lastSaleRaw }: { floorPriceRaw?: string | null; lastSaleRaw?: string | null }) {\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n const lastSale = lastSaleRaw ? parsePriceDisplay(lastSaleRaw) : null;\n if (!floor?.symbol && !lastSale?.symbol) return null;\n return (\n <div className=\"flex items-center gap-4 text-sm text-muted-foreground\">\n {floor?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Floor</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n {lastSale?.symbol && (\n <span className=\"flex items-center gap-1.5\">\n <span>Last sale</span>\n <CurrencyAmount amount={lastSale.numStr} symbol={lastSale.symbol} iconSize={12} amountClassName=\"text-foreground font-semibold\" />\n </span>\n )}\n </div>\n );\n}\n\nexport function AssetMarketplacePanel<T extends ApiOrderLike = ApiOrderLike>({\n cheapest,\n isOwner,\n isSignedIn,\n isProcessing,\n isERC1155,\n isMarketLoading = false,\n myListing,\n activeBids,\n walletAddress,\n remixEnabled = false,\n showDealOption = false,\n showSponsorOption = false,\n onOpenSponsorProposal,\n showSponsorSolicitOption = false,\n onOpenSponsorSolicit,\n floorPriceRaw,\n lastSaleRaw,\n renderAuthAction,\n renderHelp,\n onCancelClick,\n onAcceptBid,\n onOpenListing,\n onOpenTransfer,\n onOpenPurchase,\n onOpenOffer,\n onOpenRemix,\n onProposeDeal,\n}: AssetMarketplacePanelProps<T>) {\n const myBid = !isOwner && walletAddress\n ? activeBids.find((bid) => bid.offerer.toLowerCase() === walletAddress.toLowerCase()) ?? null\n : null;\n\n const canBuyMore =\n isERC1155 && isOwner && !!cheapest && !!walletAddress &&\n cheapest.offerer.toLowerCase() !== walletAddress.toLowerCase();\n\n if (isMarketLoading && !cheapest) {\n return (\n <div className=\"space-y-4\">\n <div className=\"h-9 w-32 rounded-md bg-muted animate-pulse\" />\n <div className=\"h-12 w-full rounded-2xl bg-muted animate-pulse\" />\n </div>\n );\n }\n\n return (\n <div className=\"relative\">\n\n <div className=\"relative space-y-4\">\n {cheapest ? (\n <div className=\"space-y-4\">\n <div className=\"flex flex-wrap items-baseline gap-x-5 gap-y-1.5\">\n <div className=\"flex items-baseline gap-2\">\n <CurrencyIcon symbol={cheapest.price.currency ?? \"\"} size={26} />\n <span className=\"text-4xl font-bold tracking-tight\">\n {formatDisplayPrice(cheapest.price.formatted)}\n </span>\n {renderHelp(\n `${isOwner && !canBuyMore ? \"Your listing\" : \"Current price\"} · Expires ${timeUntil(cheapest.endTime)}`\n )}\n </div>\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n </div>\n\n {isOwner ? (\n <div className=\"space-y-2\">\n <div className=\"grid grid-cols-2 gap-2\">\n {myListing ? (\n <ActionButton\n icon={isProcessing ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <X className=\"h-4 w-4\" />}\n onClick={() => onCancelClick(myListing)}\n disabled={isProcessing}\n tone=\"red\"\n renderHelp={renderHelp}\n >\n Cancel Listing\n </ActionButton>\n ) : null}\n {/* ERC-721 has exactly one possible listing — once myListing exists,\n \"List on Marketplace\" is redundant next to \"Cancel Listing\" and\n reads as a broken/confusing pair. An ERC-1155 owner can still hold\n un-listed editions while one listing is active, so it stays for them. */}\n {(!myListing || isERC1155) ? (\n <ActionButton tone=\"blue\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} renderHelp={renderHelp}>List on Marketplace</ActionButton>\n ) : null}\n <ActionButton tone=\"orange\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} renderHelp={renderHelp}>Transfer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n renderHelp={renderHelp}\n >\n Open for Sponsorship\n </ActionButton>\n ) : null}\n </div>\n\n {canBuyMore && (\n <>\n <div className=\"border-t border-border/40 pt-2 mt-1\" />\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton action=\"buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest!)} renderHelp={renderHelp}>Buy</ActionButton>\n <ActionButton action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n </div>\n </>\n )}\n </div>\n ) : isSignedIn ? (\n <>\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton action=\"buy\" icon={<ShoppingCart className=\"h-4 w-4\" />} onClick={() => onOpenPurchase(cheapest)} renderHelp={renderHelp}>Buy</ActionButton>\n <ActionButton action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Create your own attributed derivative of this work.\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showDealOption && onProposeDeal ? (\n <ActionButton\n action=\"license\"\n icon={<HandCoins className=\"h-4 w-4\" />}\n onClick={onProposeDeal}\n helpContent=\"Propose a license deal to the creator to use this work.\"\n renderHelp={renderHelp}\n >\n License\n </ActionButton>\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n renderHelp={renderHelp}\n >\n Sponsor this IP\n </ActionButton>\n ) : null}\n </div>\n {!remixEnabled && !showDealOption ? (\n <p className=\"text-xs text-muted-foreground mt-2 leading-relaxed\">\n The creator marked this asset as no-derivatives.\n </p>\n ) : null}\n </>\n ) : (\n renderAuthAction(\"Sign in to trade\")\n )}\n </div>\n ) : (\n <div className=\"space-y-3\">\n <StatRow floorPriceRaw={floorPriceRaw} lastSaleRaw={lastSaleRaw} />\n {isOwner ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton tone=\"blue\" icon={<Tag className=\"h-4 w-4\" />} onClick={onOpenListing} renderHelp={renderHelp}>List on Marketplace</ActionButton>\n <ActionButton tone=\"orange\" icon={<ArrowRightLeft className=\"h-4 w-4\" />} onClick={onOpenTransfer} renderHelp={renderHelp}>Transfer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorSolicitOption && onOpenSponsorSolicit ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorSolicit}\n helpContent=\"Let sponsors bid on a license for this asset.\"\n renderHelp={renderHelp}\n >\n Open for Sponsorship\n </ActionButton>\n ) : null}\n </div>\n ) : isSignedIn ? (\n <div className=\"grid grid-cols-2 gap-2\">\n <ActionButton action=\"offer\" icon={<HandCoins className=\"h-4 w-4\" />} onClick={onOpenOffer} renderHelp={renderHelp}>Make offer</ActionButton>\n {remixEnabled && onOpenRemix ? (\n <ActionButton\n action=\"remix\"\n icon={<GitBranch className=\"h-4 w-4\" />}\n onClick={onOpenRemix}\n helpContent=\"Build a licensed derivative of this digital asset — your remix is minted as a new onchain NFT linked to the original\"\n renderHelp={renderHelp}\n >\n Remix\n </ActionButton>\n ) : null}\n {showSponsorOption && onOpenSponsorProposal ? (\n <ActionButton\n tone=\"blue\"\n icon={<Handshake className=\"h-4 w-4\" />}\n onClick={onOpenSponsorProposal}\n helpContent=\"Propose to sponsor this creator's work — pay them directly for a license, no escrow.\"\n renderHelp={renderHelp}\n >\n Sponsor this IP\n </ActionButton>\n ) : null}\n </div>\n ) : (\n renderAuthAction(\"Sign in to make an offer\")\n )}\n </div>\n )}\n\n {myBid ? (\n <div className=\"rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3\">\n <div className=\"min-w-0 flex items-center gap-2.5\">\n <HandCoins className=\"h-4 w-4 text-amber-500 shrink-0\" />\n <div className=\"min-w-0\">\n <p className=\"text-xs font-semibold text-amber-500\">Your active offer</p>\n <p className=\"text-xs text-muted-foreground flex items-center gap-1.5 mt-0.5\">\n <span className=\"font-bold text-foreground inline-flex items-center gap-1\">\n {formatDisplayPrice(myBid.price.formatted)}\n <CurrencyIcon symbol={myBid.price.currency ?? \"\"} size={12} />\n </span>\n <span>·</span>\n <Clock className=\"h-3 w-3\" />\n {timeUntil(myBid.endTime)}\n </p>\n </div>\n </div>\n <button\n className=\"shrink-0 text-xs font-semibold text-red-400 hover:text-red-300 transition-colors flex items-center gap-1\"\n onClick={() => onCancelClick(myBid)}\n >\n <X className=\"h-3.5 w-3.5\" />\n Cancel\n </button>\n </div>\n ) : null}\n\n {isOwner && activeBids.length > 0 ? (\n <div className=\"rounded-xl bg-card/40 p-5 space-y-3\">\n <p className=\"text-xs font-semibold text-muted-foreground\">\n Incoming offers ({activeBids.length})\n </p>\n <div className=\"space-y-2\">\n {activeBids.map((bid) => (\n <div key={bid.orderHash} className=\"flex items-center justify-between gap-3 rounded-lg bg-muted/30 px-3 py-2\">\n <div className=\"min-w-0\">\n <p className=\"text-sm font-bold\">\n <span className=\"inline-flex items-center gap-1.5\">\n {formatDisplayPrice(bid.price.formatted)}\n <CurrencyIcon symbol={bid.price.currency ?? \"\"} size={14} />\n </span>\n </p>\n <div className=\"flex items-center gap-2 mt-0.5\">\n <AddressDisplay address={bid.offerer} chars={4} showCopy={false} className=\"text-xs text-muted-foreground\" />\n <span className=\"text-xs text-muted-foreground\">·</span>\n <div className=\"flex items-center gap-1 text-xs text-muted-foreground\">\n <Clock className=\"h-3 w-3\" />\n {timeUntil(bid.endTime)}\n </div>\n </div>\n </div>\n <button\n disabled={isProcessing}\n onClick={() => onAcceptBid(bid)}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-primary px-3 py-1.5 text-xs font-semibold text-primary-foreground disabled:opacity-50\"\n >\n <CheckCircle className=\"h-3.5 w-3.5\" />\n Accept\n </button>\n </div>\n ))}\n </div>\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";AAkEQ,SA+HU,UA9HR,KADF;AA/DR;AAAA,EACE;AAAA,EAAgB;AAAA,EAAa;AAAA,EAAO;AAAA,EAAW;AAAA,EAAW;AAAA,EAAW;AAAA,EACrE;AAAA,EAAc;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,WAAU,uCACb;AAAA,2BAAC,OAAE,WAAU,+CAA8C;AAAA;AAAA,QACvC,WAAW;AAAA,QAAO;AAAA,SACtC;AAAA,MACA,oBAAC,SAAI,WAAU,aACZ,qBAAW,IAAI,CAAC,QACf,qBAAC,SAAwB,WAAU,4EACjC;AAAA,6BAAC,SAAI,WAAU,WACb;AAAA,8BAAC,OAAE,WAAU,qBACX,+BAAC,UAAK,WAAU,oCACb;AAAA,+BAAmB,IAAI,MAAM,SAAS;AAAA,YACvC,oBAAC,gBAAa,QAAQ,IAAI,MAAM,YAAY,IAAI,MAAM,IAAI;AAAA,aAC5D,GACF;AAAA,UACA,qBAAC,SAAI,WAAU,kCACb;AAAA,gCAAC,kBAAe,SAAS,IAAI,SAAS,OAAO,GAAG,UAAU,OAAO,WAAU,iCAAgC;AAAA,YAC3G,oBAAC,UAAK,WAAU,iCAAgC,kBAAC;AAAA,YACjD,qBAAC,SAAI,WAAU,yDACb;AAAA,kCAAC,SAAM,WAAU,WAAU;AAAA,cAC1B,UAAU,IAAI,OAAO;AAAA,eACxB;AAAA,aACF;AAAA,WACF;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,UAAU;AAAA,YACV,SAAS,MAAM,YAAY,GAAG;AAAA,YAC9B,WAAU;AAAA,YAEV;AAAA,kCAAC,eAAY,WAAU,eAAc;AAAA,cAAE;AAAA;AAAA;AAAA,QAEzC;AAAA,WAxBQ,IAAI,SAyBd,CACD,GACH;AAAA,OACF,IACE;AAAA,KACN,GACF;AAEJ;","names":[]}
@@ -140,7 +140,7 @@ function AssetHeaderBlock({
140
140
  parentName: `Token #${parentTokenId}`
141
141
  }
142
142
  ) }) : null,
143
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-3xl lg:text-5xl font-bold break-words", children: name }),
143
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", { className: "text-2xl lg:text-4xl font-bold break-words", children: name }),
144
144
  description ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm text-muted-foreground leading-relaxed mt-1", children: description }) : null
145
145
  ] });
146
146
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-top-sections.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { motion } from \"framer-motion\";\nimport { useIntersectionActive } from \"../utils/use-intersection-active.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ParentAttributionBanner } from \"./parent-attribution-banner.js\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\nimport { Layers, Users } from \"lucide-react\";\n\ninterface AssetMediaColumnProps {\n shouldReduce: boolean;\n image: string | null;\n imageAlt: string;\n imgError: boolean;\n onImageError: () => void;\n fallback: React.ReactNode;\n /** Opens the full-screen lightbox. Omit for a non-interactive (still borderless, real-aspect-ratio) render. */\n onZoom?: () => void;\n /** Resolved animation_url — the live on-chain renderer, if any. */\n animationUrl?: string | null;\n /** Caller-computed eligibility for the living-render treatment. */\n live?: boolean;\n stats?: Array<{\n value: string;\n label: string;\n icon: React.ReactNode;\n }>;\n}\n\n/**\n * The platform's one asset media column — borderless, respects the work's\n * real aspect ratio (never forced 1:1), capped to the viewport so it always\n * fits on screen, optional click-to-zoom (foundations §III: image leads, no\n * border clutter).\n *\n * `live`-eligible tokens (a small partner allowlist, see\n * living-render-collections) swap the static image for a sandboxed iframe of\n * the token's own on-chain animation_url once the media scrolls into view —\n * see medialane-core/docs/specs/2026-07-28-gol-starknet-living-render-design.md.\n */\nexport function AssetMediaColumn({\n shouldReduce,\n image,\n imageAlt,\n imgError,\n onImageError,\n fallback,\n onZoom,\n animationUrl,\n live = false,\n stats,\n}: AssetMediaColumnProps) {\n const [ref, isVisible] = useIntersectionActive<HTMLDivElement>();\n const showLive = live && !!animationUrl && isVisible;\n\n return (\n <div ref={ref} className=\"w-full lg:sticky lg:top-16\">\n {showLive ? (\n <div className=\"w-full overflow-hidden rounded-3xl aspect-square\">\n <iframe\n src={animationUrl!}\n title={imageAlt}\n sandbox=\"allow-scripts\"\n loading=\"lazy\"\n className=\"w-full h-full border-0\"\n />\n </div>\n ) : !image || imgError ? (\n <div className=\"w-full overflow-hidden rounded-3xl\">{fallback}</div>\n ) : onZoom ? (\n <motion.button\n type=\"button\"\n onClick={onZoom}\n aria-label=\"View full image\"\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"group block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\"\n >\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onError={onImageError}\n className=\"w-full h-auto max-h-[80vh] object-contain\n transition duration-300 group-hover:opacity-95 group-active:scale-[0.99]\"\n />\n </motion.button>\n ) : (\n <motion.div\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"block w-full overflow-hidden rounded-3xl\"\n >\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onError={onImageError}\n className=\"w-full h-auto max-h-[80vh] object-contain\"\n />\n </motion.div>\n )}\n\n {stats && stats.length > 0 ? (\n <div className={`grid gap-3 mt-4 ${stats.length === 2 ? \"grid-cols-2\" : \"grid-cols-1\"}`}>\n {stats.map((stat) => (\n <div key={stat.label} className=\"rounded-xl border border-border bg-muted/20 p-4 text-center\">\n <p className=\"text-2xl font-black\">{stat.value}</p>\n <div className=\"flex items-center justify-center gap-1 text-xs text-muted-foreground mt-1\">\n {stat.icon}\n {stat.label}\n </div>\n </div>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n\ninterface AssetHeaderBlockProps {\n name: string;\n description?: string | null;\n ipType?: string | null;\n showMultiEditionBadge?: boolean;\n parentContract?: string | null;\n parentTokenId?: string | null;\n}\n\nexport function AssetHeaderBlock({\n name,\n description,\n ipType,\n showMultiEditionBadge = false,\n parentContract,\n parentTokenId,\n}: AssetHeaderBlockProps) {\n return (\n <div className=\"min-w-0 flex-1\">\n {ipType || showMultiEditionBadge ? (\n <div className=\"flex items-center gap-2 flex-wrap mb-2\">\n {ipType ? <IpTypeBadge ipType={ipType} size=\"md\" /> : null}\n {showMultiEditionBadge ? (\n <span className=\"inline-flex items-center gap-1 text-[11px] font-semibold px-2.5 py-1 rounded-full border border-violet-500/30 bg-violet-500/10 text-violet-500\">\n <Layers className=\"h-3 w-3\" />\n Multi-edition\n </span>\n ) : null}\n </div>\n ) : null}\n {parentContract && parentTokenId ? (\n <div className=\"mb-3\">\n <ParentAttributionBanner\n parentContract={parentContract}\n parentTokenId={parentTokenId}\n parentName={`Token #${parentTokenId}`}\n />\n </div>\n ) : null}\n <h1 className=\"text-3xl lg:text-5xl font-bold break-words\">{name}</h1>\n {description ? (\n <p className=\"text-sm text-muted-foreground leading-relaxed mt-1\">{description}</p>\n ) : null}\n </div>\n );\n}\n\nexport interface AssetOwnerRowProps {\n ownerAddress: string;\n ownerHref: string;\n}\n\n/** Single-owner identity (ERC-721) — its own sibling row, not nested inside\n * the collection bar (that reads as if ownership were a collection\n * attribute, 2026-07-05 feedback). ERC-1155 editions use `AssetOwnersPanel`\n * instead (multiple owners). */\nexport function AssetOwnerRow({ ownerAddress, ownerHref }: AssetOwnerRowProps) {\n return (\n <div className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>Owner</span>\n <Link href={ownerHref} className=\"hover:text-primary transition-colors font-medium\">\n <AddressDisplay address={ownerAddress} />\n </Link>\n </div>\n );\n}\n\nexport function buildEditionStats(totalEditions: number, uniqueOwners: number) {\n return [\n {\n value: totalEditions.toLocaleString(),\n label: \"editions minted\",\n icon: <Layers className=\"h-3 w-3\" />,\n },\n {\n value: uniqueOwners.toLocaleString(),\n label: \"unique owners\",\n icon: <Users className=\"h-3 w-3\" />,\n },\n ];\n}\n"],"mappings":";;;;;;;;;;;;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uB;AAC7E,SACE,6CAAC,SAAI,WAAU,2DACb;AAAA,gDAAC,UAAK,mBAAK;AAAA,IACX,4CAAC,YAAAA,SAAA,EAAK,MAAM,WAAW,WAAU,oDAC/B,sDAAC,yCAAe,SAAS,cAAc,GACzC;AAAA,KACF;AAEJ;AAEO,SAAS,kBAAkB,eAAuB,cAAsB;AAC7E,SAAO;AAAA,IACL;AAAA,MACE,OAAO,cAAc,eAAe;AAAA,MACpC,OAAO;AAAA,MACP,MAAM,4CAAC,8BAAO,WAAU,WAAU;AAAA,IACpC;AAAA,IACA;AAAA,MACE,OAAO,aAAa,eAAe;AAAA,MACnC,OAAO;AAAA,MACP,MAAM,4CAAC,6BAAM,WAAU,WAAU;AAAA,IACnC;AAAA,EACF;AACF;","names":["Link"]}
1
+ {"version":3,"sources":["../../src/components/asset-top-sections.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { motion } from \"framer-motion\";\nimport { useIntersectionActive } from \"../utils/use-intersection-active.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ParentAttributionBanner } from \"./parent-attribution-banner.js\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\nimport { Layers, Users } from \"lucide-react\";\n\ninterface AssetMediaColumnProps {\n shouldReduce: boolean;\n image: string | null;\n imageAlt: string;\n imgError: boolean;\n onImageError: () => void;\n fallback: React.ReactNode;\n /** Opens the full-screen lightbox. Omit for a non-interactive (still borderless, real-aspect-ratio) render. */\n onZoom?: () => void;\n /** Resolved animation_url — the live on-chain renderer, if any. */\n animationUrl?: string | null;\n /** Caller-computed eligibility for the living-render treatment. */\n live?: boolean;\n stats?: Array<{\n value: string;\n label: string;\n icon: React.ReactNode;\n }>;\n}\n\n/**\n * The platform's one asset media column — borderless, respects the work's\n * real aspect ratio (never forced 1:1), capped to the viewport so it always\n * fits on screen, optional click-to-zoom (foundations §III: image leads, no\n * border clutter).\n *\n * `live`-eligible tokens (a small partner allowlist, see\n * living-render-collections) swap the static image for a sandboxed iframe of\n * the token's own on-chain animation_url once the media scrolls into view —\n * see medialane-core/docs/specs/2026-07-28-gol-starknet-living-render-design.md.\n */\nexport function AssetMediaColumn({\n shouldReduce,\n image,\n imageAlt,\n imgError,\n onImageError,\n fallback,\n onZoom,\n animationUrl,\n live = false,\n stats,\n}: AssetMediaColumnProps) {\n const [ref, isVisible] = useIntersectionActive<HTMLDivElement>();\n const showLive = live && !!animationUrl && isVisible;\n\n return (\n <div ref={ref} className=\"w-full lg:sticky lg:top-16\">\n {showLive ? (\n <div className=\"w-full overflow-hidden rounded-3xl aspect-square\">\n <iframe\n src={animationUrl!}\n title={imageAlt}\n sandbox=\"allow-scripts\"\n loading=\"lazy\"\n className=\"w-full h-full border-0\"\n />\n </div>\n ) : !image || imgError ? (\n <div className=\"w-full overflow-hidden rounded-3xl\">{fallback}</div>\n ) : onZoom ? (\n <motion.button\n type=\"button\"\n onClick={onZoom}\n aria-label=\"View full image\"\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"group block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\"\n >\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onError={onImageError}\n className=\"w-full h-auto max-h-[80vh] object-contain\n transition duration-300 group-hover:opacity-95 group-active:scale-[0.99]\"\n />\n </motion.button>\n ) : (\n <motion.div\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"block w-full overflow-hidden rounded-3xl\"\n >\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onError={onImageError}\n className=\"w-full h-auto max-h-[80vh] object-contain\"\n />\n </motion.div>\n )}\n\n {stats && stats.length > 0 ? (\n <div className={`grid gap-3 mt-4 ${stats.length === 2 ? \"grid-cols-2\" : \"grid-cols-1\"}`}>\n {stats.map((stat) => (\n <div key={stat.label} className=\"rounded-xl border border-border bg-muted/20 p-4 text-center\">\n <p className=\"text-2xl font-black\">{stat.value}</p>\n <div className=\"flex items-center justify-center gap-1 text-xs text-muted-foreground mt-1\">\n {stat.icon}\n {stat.label}\n </div>\n </div>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n\ninterface AssetHeaderBlockProps {\n name: string;\n description?: string | null;\n ipType?: string | null;\n showMultiEditionBadge?: boolean;\n parentContract?: string | null;\n parentTokenId?: string | null;\n}\n\nexport function AssetHeaderBlock({\n name,\n description,\n ipType,\n showMultiEditionBadge = false,\n parentContract,\n parentTokenId,\n}: AssetHeaderBlockProps) {\n return (\n <div className=\"min-w-0 flex-1\">\n {ipType || showMultiEditionBadge ? (\n <div className=\"flex items-center gap-2 flex-wrap mb-2\">\n {ipType ? <IpTypeBadge ipType={ipType} size=\"md\" /> : null}\n {showMultiEditionBadge ? (\n <span className=\"inline-flex items-center gap-1 text-[11px] font-semibold px-2.5 py-1 rounded-full border border-violet-500/30 bg-violet-500/10 text-violet-500\">\n <Layers className=\"h-3 w-3\" />\n Multi-edition\n </span>\n ) : null}\n </div>\n ) : null}\n {parentContract && parentTokenId ? (\n <div className=\"mb-3\">\n <ParentAttributionBanner\n parentContract={parentContract}\n parentTokenId={parentTokenId}\n parentName={`Token #${parentTokenId}`}\n />\n </div>\n ) : null}\n <h1 className=\"text-2xl lg:text-4xl font-bold break-words\">{name}</h1>\n {description ? (\n <p className=\"text-sm text-muted-foreground leading-relaxed mt-1\">{description}</p>\n ) : null}\n </div>\n );\n}\n\nexport interface AssetOwnerRowProps {\n ownerAddress: string;\n ownerHref: string;\n}\n\n/** Single-owner identity (ERC-721) — its own sibling row, not nested inside\n * the collection bar (that reads as if ownership were a collection\n * attribute, 2026-07-05 feedback). ERC-1155 editions use `AssetOwnersPanel`\n * instead (multiple owners). */\nexport function AssetOwnerRow({ ownerAddress, ownerHref }: AssetOwnerRowProps) {\n return (\n <div className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>Owner</span>\n <Link href={ownerHref} className=\"hover:text-primary transition-colors font-medium\">\n <AddressDisplay address={ownerAddress} />\n </Link>\n </div>\n );\n}\n\nexport function buildEditionStats(totalEditions: number, uniqueOwners: number) {\n return [\n {\n value: totalEditions.toLocaleString(),\n label: \"editions minted\",\n icon: <Layers className=\"h-3 w-3\" />,\n },\n {\n value: uniqueOwners.toLocaleString(),\n label: \"unique owners\",\n icon: <Users className=\"h-3 w-3\" />,\n },\n ];\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4DU;AA1DV,kBAAiB;AACjB,2BAAuB;AACvB,qCAAsC;AACtC,6BAA+B;AAC/B,uCAAwC;AACxC,2BAA4B;AAC5B,0BAA8B;AAiCvB,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AACF,GAA0B;AACxB,QAAM,CAAC,KAAK,SAAS,QAAI,sDAAsC;AAC/D,QAAM,WAAW,QAAQ,CAAC,CAAC,gBAAgB;AAE3C,SACE,6CAAC,SAAI,KAAU,WAAU,8BACtB;AAAA,eACC,4CAAC,SAAI,WAAU,oDACb;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,OAAO;AAAA,QACP,SAAQ;AAAA,QACR,SAAQ;AAAA,QACR,WAAU;AAAA;AAAA,IACZ,GACF,IACE,CAAC,SAAS,WACZ,4CAAC,SAAI,WAAU,sCAAsC,oBAAS,IAC5D,SACF;AAAA,MAAC,4BAAO;AAAA,MAAP;AAAA,QACC,MAAK;AAAA,QACL,SAAS;AAAA,QACT,cAAW;AAAA,QACX,SAAS,eAAe,QAAQ,EAAE,SAAS,GAAG,OAA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U,kJACd;AAAA,oDAAC,8BAAO,WAAU,WAAU;AAAA,QAAE;AAAA,SAEhC,IACE;AAAA,OACN,IACE;AAAA,IACH,kBAAkB,gBACjB,4CAAC,SAAI,WAAU,QACb;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,YAAY,UAAU,aAAa;AAAA;AAAA,IACrC,GACF,IACE;AAAA,IACJ,4CAAC,QAAG,WAAU,8CAA8C,gBAAK;AAAA,IAChE,cACC,4CAAC,OAAE,WAAU,sDAAsD,uBAAY,IAC7E;AAAA,KACN;AAEJ;AAWO,SAAS,cAAc,EAAE,cAAc,UAAU,GAAuB;AAC7E,SACE,6CAAC,SAAI,WAAU,2DACb;AAAA,gDAAC,UAAK,mBAAK;AAAA,IACX,4CAAC,YAAAA,SAAA,EAAK,MAAM,WAAW,WAAU,oDAC/B,sDAAC,yCAAe,SAAS,cAAc,GACzC;AAAA,KACF;AAEJ;AAEO,SAAS,kBAAkB,eAAuB,cAAsB;AAC7E,SAAO;AAAA,IACL;AAAA,MACE,OAAO,cAAc,eAAe;AAAA,MACpC,OAAO;AAAA,MACP,MAAM,4CAAC,8BAAO,WAAU,WAAU;AAAA,IACpC;AAAA,IACA;AAAA,MACE,OAAO,aAAa,eAAe;AAAA,MACnC,OAAO;AAAA,MACP,MAAM,4CAAC,6BAAM,WAAU,WAAU;AAAA,IACnC;AAAA,EACF;AACF;","names":["Link"]}
@@ -104,7 +104,7 @@ function AssetHeaderBlock({
104
104
  parentName: `Token #${parentTokenId}`
105
105
  }
106
106
  ) }) : null,
107
- /* @__PURE__ */ jsx("h1", { className: "text-3xl lg:text-5xl font-bold break-words", children: name }),
107
+ /* @__PURE__ */ jsx("h1", { className: "text-2xl lg:text-4xl font-bold break-words", children: name }),
108
108
  description ? /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground leading-relaxed mt-1", children: description }) : null
109
109
  ] });
110
110
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-top-sections.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { motion } from \"framer-motion\";\nimport { useIntersectionActive } from \"../utils/use-intersection-active.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ParentAttributionBanner } from \"./parent-attribution-banner.js\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\nimport { Layers, Users } from \"lucide-react\";\n\ninterface AssetMediaColumnProps {\n shouldReduce: boolean;\n image: string | null;\n imageAlt: string;\n imgError: boolean;\n onImageError: () => void;\n fallback: React.ReactNode;\n /** Opens the full-screen lightbox. Omit for a non-interactive (still borderless, real-aspect-ratio) render. */\n onZoom?: () => void;\n /** Resolved animation_url — the live on-chain renderer, if any. */\n animationUrl?: string | null;\n /** Caller-computed eligibility for the living-render treatment. */\n live?: boolean;\n stats?: Array<{\n value: string;\n label: string;\n icon: React.ReactNode;\n }>;\n}\n\n/**\n * The platform's one asset media column — borderless, respects the work's\n * real aspect ratio (never forced 1:1), capped to the viewport so it always\n * fits on screen, optional click-to-zoom (foundations §III: image leads, no\n * border clutter).\n *\n * `live`-eligible tokens (a small partner allowlist, see\n * living-render-collections) swap the static image for a sandboxed iframe of\n * the token's own on-chain animation_url once the media scrolls into view —\n * see medialane-core/docs/specs/2026-07-28-gol-starknet-living-render-design.md.\n */\nexport function AssetMediaColumn({\n shouldReduce,\n image,\n imageAlt,\n imgError,\n onImageError,\n fallback,\n onZoom,\n animationUrl,\n live = false,\n stats,\n}: AssetMediaColumnProps) {\n const [ref, isVisible] = useIntersectionActive<HTMLDivElement>();\n const showLive = live && !!animationUrl && isVisible;\n\n return (\n <div ref={ref} className=\"w-full lg:sticky lg:top-16\">\n {showLive ? (\n <div className=\"w-full overflow-hidden rounded-3xl aspect-square\">\n <iframe\n src={animationUrl!}\n title={imageAlt}\n sandbox=\"allow-scripts\"\n loading=\"lazy\"\n className=\"w-full h-full border-0\"\n />\n </div>\n ) : !image || imgError ? (\n <div className=\"w-full overflow-hidden rounded-3xl\">{fallback}</div>\n ) : onZoom ? (\n <motion.button\n type=\"button\"\n onClick={onZoom}\n aria-label=\"View full image\"\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"group block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\"\n >\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onError={onImageError}\n className=\"w-full h-auto max-h-[80vh] object-contain\n transition duration-300 group-hover:opacity-95 group-active:scale-[0.99]\"\n />\n </motion.button>\n ) : (\n <motion.div\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"block w-full overflow-hidden rounded-3xl\"\n >\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onError={onImageError}\n className=\"w-full h-auto max-h-[80vh] object-contain\"\n />\n </motion.div>\n )}\n\n {stats && stats.length > 0 ? (\n <div className={`grid gap-3 mt-4 ${stats.length === 2 ? \"grid-cols-2\" : \"grid-cols-1\"}`}>\n {stats.map((stat) => (\n <div key={stat.label} className=\"rounded-xl border border-border bg-muted/20 p-4 text-center\">\n <p className=\"text-2xl font-black\">{stat.value}</p>\n <div className=\"flex items-center justify-center gap-1 text-xs text-muted-foreground mt-1\">\n {stat.icon}\n {stat.label}\n </div>\n </div>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n\ninterface AssetHeaderBlockProps {\n name: string;\n description?: string | null;\n ipType?: string | null;\n showMultiEditionBadge?: boolean;\n parentContract?: string | null;\n parentTokenId?: string | null;\n}\n\nexport function AssetHeaderBlock({\n name,\n description,\n ipType,\n showMultiEditionBadge = false,\n parentContract,\n parentTokenId,\n}: AssetHeaderBlockProps) {\n return (\n <div className=\"min-w-0 flex-1\">\n {ipType || showMultiEditionBadge ? (\n <div className=\"flex items-center gap-2 flex-wrap mb-2\">\n {ipType ? <IpTypeBadge ipType={ipType} size=\"md\" /> : null}\n {showMultiEditionBadge ? (\n <span className=\"inline-flex items-center gap-1 text-[11px] font-semibold px-2.5 py-1 rounded-full border border-violet-500/30 bg-violet-500/10 text-violet-500\">\n <Layers className=\"h-3 w-3\" />\n Multi-edition\n </span>\n ) : null}\n </div>\n ) : null}\n {parentContract && parentTokenId ? (\n <div className=\"mb-3\">\n <ParentAttributionBanner\n parentContract={parentContract}\n parentTokenId={parentTokenId}\n parentName={`Token #${parentTokenId}`}\n />\n </div>\n ) : null}\n <h1 className=\"text-3xl lg:text-5xl font-bold break-words\">{name}</h1>\n {description ? (\n <p className=\"text-sm text-muted-foreground leading-relaxed mt-1\">{description}</p>\n ) : null}\n </div>\n );\n}\n\nexport interface AssetOwnerRowProps {\n ownerAddress: string;\n ownerHref: string;\n}\n\n/** Single-owner identity (ERC-721) — its own sibling row, not nested inside\n * the collection bar (that reads as if ownership were a collection\n * attribute, 2026-07-05 feedback). ERC-1155 editions use `AssetOwnersPanel`\n * instead (multiple owners). */\nexport function AssetOwnerRow({ ownerAddress, ownerHref }: AssetOwnerRowProps) {\n return (\n <div className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>Owner</span>\n <Link href={ownerHref} className=\"hover:text-primary transition-colors font-medium\">\n <AddressDisplay address={ownerAddress} />\n </Link>\n </div>\n );\n}\n\nexport function buildEditionStats(totalEditions: number, uniqueOwners: number) {\n return [\n {\n value: totalEditions.toLocaleString(),\n label: \"editions minted\",\n icon: <Layers className=\"h-3 w-3\" />,\n },\n {\n value: uniqueOwners.toLocaleString(),\n label: \"unique owners\",\n icon: <Users className=\"h-3 w-3\" />,\n },\n ];\n}\n"],"mappings":";AA4DU,cAqDI,YArDJ;AA1DV,OAAO,UAAU;AACjB,SAAS,cAAc;AACvB,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAC/B,SAAS,+BAA+B;AACxC,SAAS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;AAAA,KACF;AAEJ;AAEO,SAAS,kBAAkB,eAAuB,cAAsB;AAC7E,SAAO;AAAA,IACL;AAAA,MACE,OAAO,cAAc,eAAe;AAAA,MACpC,OAAO;AAAA,MACP,MAAM,oBAAC,UAAO,WAAU,WAAU;AAAA,IACpC;AAAA,IACA;AAAA,MACE,OAAO,aAAa,eAAe;AAAA,MACnC,OAAO;AAAA,MACP,MAAM,oBAAC,SAAM,WAAU,WAAU;AAAA,IACnC;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-top-sections.tsx"],"sourcesContent":["\"use client\";\n\nimport Link from \"next/link\";\nimport { motion } from \"framer-motion\";\nimport { useIntersectionActive } from \"../utils/use-intersection-active.js\";\nimport { AddressDisplay } from \"./address-display.js\";\nimport { ParentAttributionBanner } from \"./parent-attribution-banner.js\";\nimport { IpTypeBadge } from \"./ip-type-badge.js\";\nimport { Layers, Users } from \"lucide-react\";\n\ninterface AssetMediaColumnProps {\n shouldReduce: boolean;\n image: string | null;\n imageAlt: string;\n imgError: boolean;\n onImageError: () => void;\n fallback: React.ReactNode;\n /** Opens the full-screen lightbox. Omit for a non-interactive (still borderless, real-aspect-ratio) render. */\n onZoom?: () => void;\n /** Resolved animation_url — the live on-chain renderer, if any. */\n animationUrl?: string | null;\n /** Caller-computed eligibility for the living-render treatment. */\n live?: boolean;\n stats?: Array<{\n value: string;\n label: string;\n icon: React.ReactNode;\n }>;\n}\n\n/**\n * The platform's one asset media column — borderless, respects the work's\n * real aspect ratio (never forced 1:1), capped to the viewport so it always\n * fits on screen, optional click-to-zoom (foundations §III: image leads, no\n * border clutter).\n *\n * `live`-eligible tokens (a small partner allowlist, see\n * living-render-collections) swap the static image for a sandboxed iframe of\n * the token's own on-chain animation_url once the media scrolls into view —\n * see medialane-core/docs/specs/2026-07-28-gol-starknet-living-render-design.md.\n */\nexport function AssetMediaColumn({\n shouldReduce,\n image,\n imageAlt,\n imgError,\n onImageError,\n fallback,\n onZoom,\n animationUrl,\n live = false,\n stats,\n}: AssetMediaColumnProps) {\n const [ref, isVisible] = useIntersectionActive<HTMLDivElement>();\n const showLive = live && !!animationUrl && isVisible;\n\n return (\n <div ref={ref} className=\"w-full lg:sticky lg:top-16\">\n {showLive ? (\n <div className=\"w-full overflow-hidden rounded-3xl aspect-square\">\n <iframe\n src={animationUrl!}\n title={imageAlt}\n sandbox=\"allow-scripts\"\n loading=\"lazy\"\n className=\"w-full h-full border-0\"\n />\n </div>\n ) : !image || imgError ? (\n <div className=\"w-full overflow-hidden rounded-3xl\">{fallback}</div>\n ) : onZoom ? (\n <motion.button\n type=\"button\"\n onClick={onZoom}\n aria-label=\"View full image\"\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"group block w-full overflow-hidden rounded-3xl cursor-zoom-in focus:outline-none\"\n >\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onError={onImageError}\n className=\"w-full h-auto max-h-[80vh] object-contain\n transition duration-300 group-hover:opacity-95 group-active:scale-[0.99]\"\n />\n </motion.button>\n ) : (\n <motion.div\n initial={shouldReduce ? false : { opacity: 0, scale: 0.98 }}\n animate={{ opacity: 1, scale: 1 }}\n transition={{ duration: 0.5 }}\n className=\"block w-full overflow-hidden rounded-3xl\"\n >\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <img\n src={image}\n alt={imageAlt}\n crossOrigin=\"anonymous\"\n onError={onImageError}\n className=\"w-full h-auto max-h-[80vh] object-contain\"\n />\n </motion.div>\n )}\n\n {stats && stats.length > 0 ? (\n <div className={`grid gap-3 mt-4 ${stats.length === 2 ? \"grid-cols-2\" : \"grid-cols-1\"}`}>\n {stats.map((stat) => (\n <div key={stat.label} className=\"rounded-xl border border-border bg-muted/20 p-4 text-center\">\n <p className=\"text-2xl font-black\">{stat.value}</p>\n <div className=\"flex items-center justify-center gap-1 text-xs text-muted-foreground mt-1\">\n {stat.icon}\n {stat.label}\n </div>\n </div>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n\ninterface AssetHeaderBlockProps {\n name: string;\n description?: string | null;\n ipType?: string | null;\n showMultiEditionBadge?: boolean;\n parentContract?: string | null;\n parentTokenId?: string | null;\n}\n\nexport function AssetHeaderBlock({\n name,\n description,\n ipType,\n showMultiEditionBadge = false,\n parentContract,\n parentTokenId,\n}: AssetHeaderBlockProps) {\n return (\n <div className=\"min-w-0 flex-1\">\n {ipType || showMultiEditionBadge ? (\n <div className=\"flex items-center gap-2 flex-wrap mb-2\">\n {ipType ? <IpTypeBadge ipType={ipType} size=\"md\" /> : null}\n {showMultiEditionBadge ? (\n <span className=\"inline-flex items-center gap-1 text-[11px] font-semibold px-2.5 py-1 rounded-full border border-violet-500/30 bg-violet-500/10 text-violet-500\">\n <Layers className=\"h-3 w-3\" />\n Multi-edition\n </span>\n ) : null}\n </div>\n ) : null}\n {parentContract && parentTokenId ? (\n <div className=\"mb-3\">\n <ParentAttributionBanner\n parentContract={parentContract}\n parentTokenId={parentTokenId}\n parentName={`Token #${parentTokenId}`}\n />\n </div>\n ) : null}\n <h1 className=\"text-2xl lg:text-4xl font-bold break-words\">{name}</h1>\n {description ? (\n <p className=\"text-sm text-muted-foreground leading-relaxed mt-1\">{description}</p>\n ) : null}\n </div>\n );\n}\n\nexport interface AssetOwnerRowProps {\n ownerAddress: string;\n ownerHref: string;\n}\n\n/** Single-owner identity (ERC-721) — its own sibling row, not nested inside\n * the collection bar (that reads as if ownership were a collection\n * attribute, 2026-07-05 feedback). ERC-1155 editions use `AssetOwnersPanel`\n * instead (multiple owners). */\nexport function AssetOwnerRow({ ownerAddress, ownerHref }: AssetOwnerRowProps) {\n return (\n <div className=\"flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>Owner</span>\n <Link href={ownerHref} className=\"hover:text-primary transition-colors font-medium\">\n <AddressDisplay address={ownerAddress} />\n </Link>\n </div>\n );\n}\n\nexport function buildEditionStats(totalEditions: number, uniqueOwners: number) {\n return [\n {\n value: totalEditions.toLocaleString(),\n label: \"editions minted\",\n icon: <Layers className=\"h-3 w-3\" />,\n },\n {\n value: uniqueOwners.toLocaleString(),\n label: \"unique owners\",\n icon: <Users className=\"h-3 w-3\" />,\n },\n ];\n}\n"],"mappings":";AA4DU,cAqDI,YArDJ;AA1DV,OAAO,UAAU;AACjB,SAAS,cAAc;AACvB,SAAS,6BAA6B;AACtC,SAAS,sBAAsB;AAC/B,SAAS,+BAA+B;AACxC,SAAS,mBAAmB;AAC5B,SAAS,QAAQ,aAAa;AAiCvB,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AACF,GAA0B;AACxB,QAAM,CAAC,KAAK,SAAS,IAAI,sBAAsC;AAC/D,QAAM,WAAW,QAAQ,CAAC,CAAC,gBAAgB;AAE3C,SACE,qBAAC,SAAI,KAAU,WAAU,8BACtB;AAAA,eACC,oBAAC,SAAI,WAAU,oDACb;AAAA,MAAC;AAAA;AAAA,QACC,KAAK;AAAA,QACL,OAAO;AAAA,QACP,SAAQ;AAAA,QACR,SAAQ;AAAA,QACR,WAAU;AAAA;AAAA,IACZ,GACF,IACE,CAAC,SAAS,WACZ,oBAAC,SAAI,WAAU,sCAAsC,oBAAS,IAC5D,SACF;AAAA,MAAC,OAAO;AAAA,MAAP;AAAA,QACC,MAAK;AAAA,QACL,SAAS;AAAA,QACT,cAAW;AAAA,QACX,SAAS,eAAe,QAAQ,EAAE,SAAS,GAAG,OAAO,KAAK;AAAA,QAC1D,SAAS,EAAE,SAAS,GAAG,OAAO,EAAE;AAAA,QAChC,YAAY,EAAE,UAAU,IAAI;AAAA,QAC5B,WAAU;AAAA,QAGV;AAAA,UAAC;AAAA;AAAA,YACC,KAAK;AAAA,YACL,KAAK;AAAA,YACL,aAAY;A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,aAAa;AAAA;AAAA,IACrC,GACF,IACE;AAAA,IACJ,oBAAC,QAAG,WAAU,8CAA8C,gBAAK;AAAA,IAChE,cACC,oBAAC,OAAE,WAAU,sDAAsD,uBAAY,IAC7E;AAAA,KACN;AAEJ;AAWO,SAAS,cAAc,EAAE,cAAc,UAAU,GAAuB;AAC7E,SACE,qBAAC,SAAI,WAAU,2DACb;AAAA,wBAAC,UAAK,mBAAK;AAAA,IACX,oBAAC,QAAK,MAAM,WAAW,WAAU,oDAC/B,8BAAC,kBAAe,SAAS,cAAc,GACzC;AAAA,KACF;AAEJ;AAEO,SAAS,kBAAkB,eAAuB,cAAsB;AAC7E,SAAO;AAAA,IACL;AAAA,MACE,OAAO,cAAc,eAAe;AAAA,MACpC,OAAO;AAAA,MACP,MAAM,oBAAC,UAAO,WAAU,WAAU;AAAA,IACpC;AAAA,IACA;AAAA,MACE,OAAO,aAAa,eAAe;AAAA,MACnC,OAAO;AAAA,MACP,MAAM,oBAAC,SAAM,WAAU,WAAU;AAAA,IACnC;AAAA,EACF;AACF;","names":[]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/gradient-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nexport interface GradientButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Tall 54px variant for hero contexts (onboarding, primary page CTAs). */\n big?: boolean;\n /** Outer wrapper class (the `.btn-border-animated` ring) — rarely needed. */\n wrapperClassName?: string;\n}\n\n/**\n * The full-spectrum animated-gradient CTA — `.btn-border-animated` as a 1px\n * wrapper around a transparent-fill button, so the ring reads as a solid,\n * continuously shifting brand-gradient fill (blue → purple → rose → orange).\n * This is the primary-action treatment used across medialane.io/starknet.medialane.io\n * (e.g. \"Connect wallet\", \"Buy now\") — previously hand-copied per call site;\n * this component is the single source.\n *\n * For the secondary animated-border treatment (a neutral `bg-card` fill with\n * only the border animated), use `ActionButton` instead.\n */\nexport function GradientButton({ big, children, className, wrapperClassName, ...rest }: GradientButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[15px] text-[15px]\"\n : \"h-12 px-5 rounded-[11px] text-sm\";\n\n return (\n <div className={cn(\"btn-border-animated w-full p-[1px]\", big ? \"rounded-2xl\" : \"rounded-xl\", wrapperClassName)}>\n <button\n {...rest}\n className={cn(\n \"inline-flex w-full items-center justify-center gap-2 whitespace-nowrap font-semibold text-white\",\n \"border-none bg-transparent transition-all hover:brightness-110 active:scale-[0.98]\",\n sizeClass,\n className,\n )}\n >\n {children}\n </button>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BM;AA3BN,gBAAmB;AAoBZ,SAAS,eAAe,EAAE,KAAK,UAAU,WAAW,kBAAkB,GAAG,KAAK,GAAwB;AAC3G,QAAM,YAAY,MACd,6CACA;AAEJ,SACE,4CAAC,SAAI,eAAW,cAAG,sCAAsC,MAAM,gBAAgB,cAAc,gBAAgB,GAC3G;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/gradient-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nexport interface GradientButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Tall 54px variant for hero contexts (onboarding, primary page CTAs). */\n big?: boolean;\n /** Outer wrapper class (the `.btn-border-animated` ring) — rarely needed. */\n wrapperClassName?: string;\n}\n\n/**\n * The full-spectrum animated-gradient CTA — `.btn-border-animated` as a 1px\n * wrapper around a transparent-fill button, so the ring reads as a solid,\n * continuously shifting brand-gradient fill (blue → purple → rose → orange).\n * This is the primary-action treatment used across medialane.io/starknet.medialane.io\n * (e.g. \"Connect wallet\", \"Buy now\") — previously hand-copied per call site;\n * this component is the single source.\n *\n * For the secondary animated-border treatment (transparent fill, only the\n * per-action gradient border and colored icon/text), use `ActionButton` instead.\n */\nexport function GradientButton({ big, children, className, wrapperClassName, ...rest }: GradientButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[15px] text-[15px]\"\n : \"h-12 px-5 rounded-[11px] text-sm\";\n\n return (\n <div className={cn(\"btn-border-animated w-full p-[1px]\", big ? \"rounded-2xl\" : \"rounded-xl\", wrapperClassName)}>\n <button\n {...rest}\n className={cn(\n \"inline-flex w-full items-center justify-center gap-2 whitespace-nowrap font-semibold text-white\",\n \"border-none bg-transparent transition-all hover:brightness-110 active:scale-[0.98]\",\n sizeClass,\n className,\n )}\n >\n {children}\n </button>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA6BM;AA3BN,gBAAmB;AAoBZ,SAAS,eAAe,EAAE,KAAK,UAAU,WAAW,kBAAkB,GAAG,KAAK,GAAwB;AAC3G,QAAM,YAAY,MACd,6CACA;AAEJ,SACE,4CAAC,SAAI,eAAW,cAAG,sCAAsC,MAAM,gBAAgB,cAAc,gBAAgB,GAC3G;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH,GACF;AAEJ;","names":[]}
@@ -14,8 +14,8 @@ interface GradientButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
14
14
  * (e.g. "Connect wallet", "Buy now") — previously hand-copied per call site;
15
15
  * this component is the single source.
16
16
  *
17
- * For the secondary animated-border treatment (a neutral `bg-card` fill with
18
- * only the border animated), use `ActionButton` instead.
17
+ * For the secondary animated-border treatment (transparent fill, only the
18
+ * per-action gradient border and colored icon/text), use `ActionButton` instead.
19
19
  */
20
20
  declare function GradientButton({ big, children, className, wrapperClassName, ...rest }: GradientButtonProps): react_jsx_runtime.JSX.Element;
21
21
 
@@ -14,8 +14,8 @@ interface GradientButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEleme
14
14
  * (e.g. "Connect wallet", "Buy now") — previously hand-copied per call site;
15
15
  * this component is the single source.
16
16
  *
17
- * For the secondary animated-border treatment (a neutral `bg-card` fill with
18
- * only the border animated), use `ActionButton` instead.
17
+ * For the secondary animated-border treatment (transparent fill, only the
18
+ * per-action gradient border and colored icon/text), use `ActionButton` instead.
19
19
  */
20
20
  declare function GradientButton({ big, children, className, wrapperClassName, ...rest }: GradientButtonProps): react_jsx_runtime.JSX.Element;
21
21
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/gradient-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nexport interface GradientButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Tall 54px variant for hero contexts (onboarding, primary page CTAs). */\n big?: boolean;\n /** Outer wrapper class (the `.btn-border-animated` ring) — rarely needed. */\n wrapperClassName?: string;\n}\n\n/**\n * The full-spectrum animated-gradient CTA — `.btn-border-animated` as a 1px\n * wrapper around a transparent-fill button, so the ring reads as a solid,\n * continuously shifting brand-gradient fill (blue → purple → rose → orange).\n * This is the primary-action treatment used across medialane.io/starknet.medialane.io\n * (e.g. \"Connect wallet\", \"Buy now\") — previously hand-copied per call site;\n * this component is the single source.\n *\n * For the secondary animated-border treatment (a neutral `bg-card` fill with\n * only the border animated), use `ActionButton` instead.\n */\nexport function GradientButton({ big, children, className, wrapperClassName, ...rest }: GradientButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[15px] text-[15px]\"\n : \"h-12 px-5 rounded-[11px] text-sm\";\n\n return (\n <div className={cn(\"btn-border-animated w-full p-[1px]\", big ? \"rounded-2xl\" : \"rounded-xl\", wrapperClassName)}>\n <button\n {...rest}\n className={cn(\n \"inline-flex w-full items-center justify-center gap-2 whitespace-nowrap font-semibold text-white\",\n \"border-none bg-transparent transition-all hover:brightness-110 active:scale-[0.98]\",\n sizeClass,\n className,\n )}\n >\n {children}\n </button>\n </div>\n );\n}\n"],"mappings":";AA6BM;AA3BN,SAAS,UAAU;AAoBZ,SAAS,eAAe,EAAE,KAAK,UAAU,WAAW,kBAAkB,GAAG,KAAK,GAAwB;AAC3G,QAAM,YAAY,MACd,6CACA;AAEJ,SACE,oBAAC,SAAI,WAAW,GAAG,sCAAsC,MAAM,gBAAgB,cAAc,gBAAgB,GAC3G;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH,GACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/gradient-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\n\nexport interface GradientButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Tall 54px variant for hero contexts (onboarding, primary page CTAs). */\n big?: boolean;\n /** Outer wrapper class (the `.btn-border-animated` ring) — rarely needed. */\n wrapperClassName?: string;\n}\n\n/**\n * The full-spectrum animated-gradient CTA — `.btn-border-animated` as a 1px\n * wrapper around a transparent-fill button, so the ring reads as a solid,\n * continuously shifting brand-gradient fill (blue → purple → rose → orange).\n * This is the primary-action treatment used across medialane.io/starknet.medialane.io\n * (e.g. \"Connect wallet\", \"Buy now\") — previously hand-copied per call site;\n * this component is the single source.\n *\n * For the secondary animated-border treatment (transparent fill, only the\n * per-action gradient border and colored icon/text), use `ActionButton` instead.\n */\nexport function GradientButton({ big, children, className, wrapperClassName, ...rest }: GradientButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[15px] text-[15px]\"\n : \"h-12 px-5 rounded-[11px] text-sm\";\n\n return (\n <div className={cn(\"btn-border-animated w-full p-[1px]\", big ? \"rounded-2xl\" : \"rounded-xl\", wrapperClassName)}>\n <button\n {...rest}\n className={cn(\n \"inline-flex w-full items-center justify-center gap-2 whitespace-nowrap font-semibold text-white\",\n \"border-none bg-transparent transition-all hover:brightness-110 active:scale-[0.98]\",\n sizeClass,\n className,\n )}\n >\n {children}\n </button>\n </div>\n );\n}\n"],"mappings":";AA6BM;AA3BN,SAAS,UAAU;AAoBZ,SAAS,eAAe,EAAE,KAAK,UAAU,WAAW,kBAAkB,GAAG,KAAK,GAAwB;AAC3G,QAAM,YAAY,MACd,6CACA;AAEJ,SACE,oBAAC,SAAI,WAAW,GAAG,sCAAsC,MAAM,gBAAgB,cAAc,gBAAgB,GAC3G;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MAEC;AAAA;AAAA,EACH,GACF;AAEJ;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medialane/ui",
3
- "version": "0.94.4",
3
+ "version": "0.94.7",
4
4
  "description": "Shared UI components for Medialane apps",
5
5
  "type": "module",
6
6
  "sideEffects": false,