@medialane/ui 0.260.0 → 0.261.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/components/action-button.cjs +7 -2
  2. package/dist/components/action-button.cjs.map +1 -1
  3. package/dist/components/action-button.d.cts +2 -1
  4. package/dist/components/action-button.d.ts +2 -1
  5. package/dist/components/action-button.js +7 -2
  6. package/dist/components/action-button.js.map +1 -1
  7. package/dist/components/asset-access-cards.cjs +21 -33
  8. package/dist/components/asset-access-cards.cjs.map +1 -1
  9. package/dist/components/asset-access-cards.d.cts +3 -3
  10. package/dist/components/asset-access-cards.d.ts +3 -3
  11. package/dist/components/asset-access-cards.js +20 -32
  12. package/dist/components/asset-access-cards.js.map +1 -1
  13. package/dist/components/asset-marketplace-panel.cjs +44 -41
  14. package/dist/components/asset-marketplace-panel.cjs.map +1 -1
  15. package/dist/components/asset-marketplace-panel.js +45 -42
  16. package/dist/components/asset-marketplace-panel.js.map +1 -1
  17. package/dist/components/asset-overview-content.cjs +12 -1
  18. package/dist/components/asset-overview-content.cjs.map +1 -1
  19. package/dist/components/asset-overview-content.d.cts +3 -1
  20. package/dist/components/asset-overview-content.d.ts +3 -1
  21. package/dist/components/asset-overview-content.js +13 -2
  22. package/dist/components/asset-overview-content.js.map +1 -1
  23. package/dist/components/asset-page.cjs +8 -6
  24. package/dist/components/asset-page.cjs.map +1 -1
  25. package/dist/components/asset-page.js +8 -6
  26. package/dist/components/asset-page.js.map +1 -1
  27. package/dist/components/asset-top-sections.cjs +1 -9
  28. package/dist/components/asset-top-sections.cjs.map +1 -1
  29. package/dist/components/asset-top-sections.d.cts +1 -2
  30. package/dist/components/asset-top-sections.d.ts +1 -2
  31. package/dist/components/asset-top-sections.js +1 -9
  32. package/dist/components/asset-top-sections.js.map +1 -1
  33. package/dist/components/button.d.cts +1 -1
  34. package/dist/components/button.d.ts +1 -1
  35. package/dist/components/fast-mint/fast-mint.d.cts +2 -2
  36. package/dist/components/fast-mint/fast-mint.d.ts +2 -2
  37. package/dist/components/markdown-text.cjs +53 -0
  38. package/dist/components/markdown-text.cjs.map +1 -0
  39. package/dist/components/markdown-text.d.cts +7 -0
  40. package/dist/components/markdown-text.d.ts +7 -0
  41. package/dist/components/markdown-text.js +19 -0
  42. package/dist/components/markdown-text.js.map +1 -0
  43. package/dist/components/sheet.d.cts +1 -1
  44. package/dist/components/sheet.d.ts +1 -1
  45. package/package.json +3 -1
@@ -59,6 +59,7 @@ function ActionButton({
59
59
  icon,
60
60
  big,
61
61
  ghost,
62
+ href,
62
63
  helpContent,
63
64
  disabled,
64
65
  children,
@@ -66,12 +67,15 @@ function ActionButton({
66
67
  style,
67
68
  ...rest
68
69
  }) {
70
+ const Tag = href ? "a" : "button";
71
+ const linkProps = href ? { href, target: "_blank", rel: "noopener noreferrer" } : {};
69
72
  const sizeClass = big ? "h-[54px] px-5 rounded-[13px] text-base" : "h-[46px] px-5 rounded-[13px] text-sm";
70
73
  if (ghost) {
71
74
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
72
- "button",
75
+ Tag,
73
76
  {
74
77
  ...rest,
78
+ ...linkProps,
75
79
  disabled,
76
80
  className: (0, import_cn.cn)(
77
81
  "inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
@@ -92,9 +96,10 @@ function ActionButton({
92
96
  const fg = action ? ACTION_FOREGROUNDS[action] : tone ? TONE_FOREGROUNDS[tone] : ACTION_FOREGROUNDS.buy;
93
97
  const grad = `linear-gradient(115deg, ${gradColors.join(",")})`;
94
98
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
95
- "button",
99
+ Tag,
96
100
  {
97
101
  ...rest,
102
+ ...linkProps,
98
103
  disabled,
99
104
  className: (0, import_cn.cn)(
100
105
  "ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/action-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\nimport { HelpIcon } from \"./help-icon.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 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 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\n action?: ActionKey;\n\n tone?: ToneKey;\n icon?: React.ReactNode;\n\n big?: boolean;\n\n ghost?: boolean;\n\n helpContent?: string;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n ghost,\n helpContent,\n disabled,\n children,\n className,\n style,\n ...rest\n}: ActionButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[13px] text-base\"\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 ? <HelpIcon content={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 ? <HelpIcon content={helpContent} /> : null}\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyEM;AAvEN,gBAAmB;AACnB,uBAAyB;AAEzB,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,EACx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A,QAClE;AAAA,QACA,cAAc,4CAAC,6BAAS,SAAS,aAAa,IAAK;AAAA;AAAA;AAAA,EACtD;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/action-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\nimport { HelpIcon } from \"./help-icon.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 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 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\n href?: string;\n\n action?: ActionKey;\n\n tone?: ToneKey;\n icon?: React.ReactNode;\n\n big?: boolean;\n\n ghost?: boolean;\n\n helpContent?: string;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n ghost,\n href,\n helpContent,\n disabled,\n children,\n className,\n style,\n ...rest\n}: ActionButtonProps) {\n const Tag = (href ? \"a\" : \"button\") as React.ElementType;\n const linkProps = href ? { href, target: \"_blank\", rel: \"noopener noreferrer\" } : {};\n\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[13px] text-base\"\n : \"h-[46px] px-5 rounded-[13px] text-sm\";\n\n if (ghost) {\n return (\n <Tag\n {...rest}\n {...linkProps}\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 ? <HelpIcon content={helpContent} /> : null}\n </Tag>\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 <Tag\n {...rest}\n {...linkProps}\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 ? <HelpIcon content={helpContent} /> : null}\n </Tag>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+EM;AA7EN,gBAAmB;AACnB,uBAAyB;AAEzB,MAAM,mBAA6D;AAAA,EACjE,KAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,QAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACzC,OAAS,CAAC,WAAW,WAAW,SAAS;AAA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AAiB;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,MACH,GAAG;AAAA,MACJ;AAAA,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,cAAc,4CAAC,6BAAS,SAAS,aAAa,IAAK;AAAA;AAAA;AAAA,EACtD;AAEJ;","names":[]}
@@ -5,6 +5,7 @@ declare const TONE_GRADIENTS: Record<string, [string, string, string]>;
5
5
  type ActionKey = keyof typeof ACTION_GRADIENTS;
6
6
  type ToneKey = keyof typeof TONE_GRADIENTS;
7
7
  interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
8
+ href?: string;
8
9
  action?: ActionKey;
9
10
  tone?: ToneKey;
10
11
  icon?: React.ReactNode;
@@ -12,6 +13,6 @@ interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement
12
13
  ghost?: boolean;
13
14
  helpContent?: string;
14
15
  }
15
- declare function ActionButton({ action, tone, icon, big, ghost, helpContent, disabled, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
16
+ declare function ActionButton({ action, tone, icon, big, ghost, href, helpContent, disabled, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
16
17
 
17
18
  export { ActionButton, type ActionButtonProps, type ActionKey, type ToneKey };
@@ -5,6 +5,7 @@ declare const TONE_GRADIENTS: Record<string, [string, string, string]>;
5
5
  type ActionKey = keyof typeof ACTION_GRADIENTS;
6
6
  type ToneKey = keyof typeof TONE_GRADIENTS;
7
7
  interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
8
+ href?: string;
8
9
  action?: ActionKey;
9
10
  tone?: ToneKey;
10
11
  icon?: React.ReactNode;
@@ -12,6 +13,6 @@ interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement
12
13
  ghost?: boolean;
13
14
  helpContent?: string;
14
15
  }
15
- declare function ActionButton({ action, tone, icon, big, ghost, helpContent, disabled, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
16
+ declare function ActionButton({ action, tone, icon, big, ghost, href, helpContent, disabled, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
16
17
 
17
18
  export { ActionButton, type ActionButtonProps, type ActionKey, type ToneKey };
@@ -36,6 +36,7 @@ function ActionButton({
36
36
  icon,
37
37
  big,
38
38
  ghost,
39
+ href,
39
40
  helpContent,
40
41
  disabled,
41
42
  children,
@@ -43,12 +44,15 @@ function ActionButton({
43
44
  style,
44
45
  ...rest
45
46
  }) {
47
+ const Tag = href ? "a" : "button";
48
+ const linkProps = href ? { href, target: "_blank", rel: "noopener noreferrer" } : {};
46
49
  const sizeClass = big ? "h-[54px] px-5 rounded-[13px] text-base" : "h-[46px] px-5 rounded-[13px] text-sm";
47
50
  if (ghost) {
48
51
  return /* @__PURE__ */ jsxs(
49
- "button",
52
+ Tag,
50
53
  {
51
54
  ...rest,
55
+ ...linkProps,
52
56
  disabled,
53
57
  className: cn(
54
58
  "inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
@@ -69,9 +73,10 @@ function ActionButton({
69
73
  const fg = action ? ACTION_FOREGROUNDS[action] : tone ? TONE_FOREGROUNDS[tone] : ACTION_FOREGROUNDS.buy;
70
74
  const grad = `linear-gradient(115deg, ${gradColors.join(",")})`;
71
75
  return /* @__PURE__ */ jsxs(
72
- "button",
76
+ Tag,
73
77
  {
74
78
  ...rest,
79
+ ...linkProps,
75
80
  disabled,
76
81
  className: cn(
77
82
  "ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/action-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\nimport { HelpIcon } from \"./help-icon.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 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 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\n action?: ActionKey;\n\n tone?: ToneKey;\n icon?: React.ReactNode;\n\n big?: boolean;\n\n ghost?: boolean;\n\n helpContent?: string;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n ghost,\n helpContent,\n disabled,\n children,\n className,\n style,\n ...rest\n}: ActionButtonProps) {\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[13px] text-base\"\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 ? <HelpIcon content={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 ? <HelpIcon content={helpContent} /> : null}\n </button>\n );\n}\n"],"mappings":";AAyEM,SAYiB,KAZjB;AAvEN,SAAS,UAAU;AACnB,SAAS,gBAAgB;AAEzB,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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,GAAG,MAAM;AAAA,MAEpC;AAAA,gBAAQ,oBAAC,UAAK,WAAU,eAAc,OAAO,EAAE,OAAO,GAAG,GAAI,gBAAK;AAAA,QAClE;AAAA,QACA,cAAc,oBAAC,YAAS,SAAS,aAAa,IAAK;AAAA;AAAA;AAAA,EACtD;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/action-button.tsx"],"sourcesContent":["\"use client\";\n\nimport { cn } from \"../utils/cn.js\";\nimport { HelpIcon } from \"./help-icon.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 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 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\n href?: string;\n\n action?: ActionKey;\n\n tone?: ToneKey;\n icon?: React.ReactNode;\n\n big?: boolean;\n\n ghost?: boolean;\n\n helpContent?: string;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n ghost,\n href,\n helpContent,\n disabled,\n children,\n className,\n style,\n ...rest\n}: ActionButtonProps) {\n const Tag = (href ? \"a\" : \"button\") as React.ElementType;\n const linkProps = href ? { href, target: \"_blank\", rel: \"noopener noreferrer\" } : {};\n\n const sizeClass = big\n ? \"h-[54px] px-5 rounded-[13px] text-base\"\n : \"h-[46px] px-5 rounded-[13px] text-sm\";\n\n if (ghost) {\n return (\n <Tag\n {...rest}\n {...linkProps}\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 ? <HelpIcon content={helpContent} /> : null}\n </Tag>\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 <Tag\n {...rest}\n {...linkProps}\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 ? <HelpIcon content={helpContent} /> : null}\n </Tag>\n );\n}\n"],"mappings":";AA+EM,SAaiB,KAbjB;AA7EN,SAAS,UAAU;AACnB,SAAS,gBAAgB;AAEzB,MAAM,mBAA6D;AAAA,EACjE,KAAS,CAAC,WAAW,WAAW,SAAS;AAAA,EACz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EJ;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,MACH,GAAG;AAAA,MACJ;AAAA,MACA,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,QACA,cAAc,oBAAC,YAAS,SAAS,aAAa,IAAK;AAAA;AAAA;AAAA,EACtD;AAEJ;","names":[]}
@@ -19,57 +19,45 @@ var __copyProps = (to, from, except, desc) => {
19
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
20
  var asset_access_cards_exports = {};
21
21
  __export(asset_access_cards_exports, {
22
- AssetAccessCards: () => AssetAccessCards,
23
- CompanionAppCard: () => CompanionAppCard
22
+ AssetAccessButtons: () => AssetAccessButtons,
23
+ CompanionAppButton: () => CompanionAppButton
24
24
  });
25
25
  module.exports = __toCommonJS(asset_access_cards_exports);
26
26
  var import_jsx_runtime = require("react/jsx-runtime");
27
- var import_lucide_react = require("lucide-react");
28
27
  var import_sdk = require("@medialane/sdk");
28
+ var import_lucide_react = require("lucide-react");
29
29
  var import_medialane_app = require("./medialane-app.js");
30
+ var import_action_button = require("./action-button.js");
30
31
  var import_cn = require("../utils/cn.js");
31
- const CARD = "group flex h-full w-full items-start gap-3 rounded-2xl border border-transparent p-4 text-left transition-colors";
32
- function CardBody({ icon: Icon, iconClassName, title, description }) {
33
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
34
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br text-white", iconClassName), children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-[18px] w-[18px]" }) }),
35
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex-1", children: [
36
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-bold leading-snug", children: title }),
37
- description ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "mt-0.5 text-xs leading-relaxed text-muted-foreground", children: description }) : null
38
- ] })
39
- ] });
40
- }
41
- function CompanionAppCard({ asset }) {
32
+ function CompanionAppButton({ asset }) {
42
33
  const { companion } = (0, import_medialane_app.useMedialaneApp)();
43
34
  if (!companion) return null;
35
+ const Icon = companion.icon;
44
36
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
45
- "a",
37
+ import_action_button.ActionButton,
46
38
  {
39
+ action: "offer",
40
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-4 w-4" }),
47
41
  href: `${companion.origin}${(0, import_sdk.assetHref)(asset.chain.toUpperCase(), asset.contractAddress, asset.tokenId)}`,
48
- target: "_blank",
49
- rel: "noopener noreferrer",
50
- className: (0, import_cn.cn)(CARD, "bg-gradient-to-br from-brand-rose/15 via-brand-orange/10 to-transparent hover:border-brand-orange/30"),
51
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardBody, { icon: companion.icon, iconClassName: "from-brand-rose to-brand-orange", title: companion.title, description: companion.description })
42
+ title: companion.description,
43
+ className: "w-full",
44
+ children: companion.title
52
45
  }
53
46
  );
54
47
  }
55
- function AssetAccessCards({ asset, stacked = false }) {
48
+ function AssetAccessButtons({ asset, stacked = false }) {
56
49
  const { onRequireWallet, connectLabel = "Sign in", connectDescription, companion } = (0, import_medialane_app.useMedialaneApp)();
57
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("grid grid-cols-1 gap-3 items-stretch", companion && !stacked && "sm:grid-cols-2"), children: [
58
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
59
- "button",
60
- {
61
- type: "button",
62
- onClick: onRequireWallet,
63
- className: (0, import_cn.cn)(CARD, "bg-gradient-to-br from-brand-blue/15 via-brand-purple/10 to-transparent hover:border-brand-purple/30"),
64
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CardBody, { icon: import_lucide_react.Wallet, iconClassName: "from-brand-blue to-brand-purple", title: connectLabel, description: connectDescription })
65
- }
66
- ),
67
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CompanionAppCard, { asset })
50
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
51
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_cn.cn)("grid grid-cols-1 gap-2", companion && !stacked && "sm:grid-cols-2"), children: [
52
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { action: "buy", icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Wallet, { className: "h-4 w-4" }), onClick: onRequireWallet, className: "w-full", children: connectLabel }),
53
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CompanionAppButton, { asset })
54
+ ] }),
55
+ connectDescription ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-muted-foreground", children: connectDescription }) : null
68
56
  ] });
69
57
  }
70
58
  // Annotate the CommonJS export names for ESM import in node:
71
59
  0 && (module.exports = {
72
- AssetAccessCards,
73
- CompanionAppCard
60
+ AssetAccessButtons,
61
+ CompanionAppButton
74
62
  });
75
63
  //# sourceMappingURL=asset-access-cards.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-access-cards.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType } from \"react\";\nimport { Wallet } from \"lucide-react\";\nimport { assetHref, type Chain } from \"@medialane/sdk\";\nimport { useMedialaneApp, type AssetRef } from \"./medialane-app.js\";\nimport { cn } from \"../utils/cn.js\";\n\nconst CARD = \"group flex h-full w-full items-start gap-3 rounded-2xl border border-transparent p-4 text-left transition-colors\";\n\nfunction CardBody({ icon: Icon, iconClassName, title, description }: { icon: ElementType; iconClassName: string; title: string; description?: string }) {\n return (\n <>\n <div className={cn(\"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br text-white\", iconClassName)}>\n <Icon className=\"h-[18px] w-[18px]\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-bold leading-snug\">{title}</p>\n {description ? <p className=\"mt-0.5 text-xs leading-relaxed text-muted-foreground\">{description}</p> : null}\n </div>\n </>\n );\n}\n\nexport function CompanionAppCard({ asset }: { asset: AssetRef }) {\n const { companion } = useMedialaneApp();\n if (!companion) return null;\n return (\n <a\n href={`${companion.origin}${assetHref(asset.chain.toUpperCase() as Chain, asset.contractAddress, asset.tokenId)}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(CARD, \"bg-gradient-to-br from-brand-rose/15 via-brand-orange/10 to-transparent hover:border-brand-orange/30\")}\n >\n <CardBody icon={companion.icon} iconClassName=\"from-brand-rose to-brand-orange\" title={companion.title} description={companion.description} />\n </a>\n );\n}\n\nexport function AssetAccessCards({ asset, stacked = false }: { asset: AssetRef; stacked?: boolean }) {\n const { onRequireWallet, connectLabel = \"Sign in\", connectDescription, companion } = useMedialaneApp();\n return (\n <div className={cn(\"grid grid-cols-1 gap-3 items-stretch\", companion && !stacked && \"sm:grid-cols-2\")}>\n <button\n type=\"button\"\n onClick={onRequireWallet}\n className={cn(CARD, \"bg-gradient-to-br from-brand-blue/15 via-brand-purple/10 to-transparent hover:border-brand-purple/30\")}\n >\n <CardBody icon={Wallet} iconClassName=\"from-brand-blue to-brand-purple\" title={connectLabel} description={connectDescription} />\n </button>\n <CompanionAppCard asset={asset} />\n </div>\n );\n}\n\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYI;AATJ,0BAAuB;AACvB,iBAAsC;AACtC,2BAA+C;AAC/C,gBAAmB;AAEnB,MAAM,OAAO;AAEb,SAAS,SAAS,EAAE,MAAM,MAAM,eAAe,OAAO,YAAY,GAAsF;AACtJ,SACE,4EACE;AAAA,gDAAC,SAAI,eAAW,cAAG,oGAAoG,aAAa,GAClI,sDAAC,QAAK,WAAU,qBAAoB,GACtC;AAAA,IACA,6CAAC,SAAI,WAAU,kBACb;AAAA,kDAAC,OAAE,WAAU,kCAAkC,iBAAM;AAAA,MACpD,cAAc,4CAAC,OAAE,WAAU,wDAAwD,uBAAY,IAAO;AAAA,OACzG;AAAA,KACF;AAEJ;AAEO,SAAS,iBAAiB,EAAE,MAAM,GAAwB;AAC/D,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,MAAI,CAAC,UAAW,QAAO;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,GAAG,UAAU,MAAM,OAAG,sBAAU,MAAM,MAAM,YAAY,GAAY,MAAM,iBAAiB,MAAM,OAAO,CAAC;AAAA,MAC/G,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,eAAW,cAAG,MAAM,sGAAsG;AAAA,MAE1H,sDAAC,YAAS,MAAM,UAAU,MAAM,eAAc,mCAAkC,OAAO,UAAU,OAAO,aAAa,UAAU,aAAa;AAAA;AAAA,EAC9I;AAEJ;AAEO,SAAS,iBAAiB,EAAE,OAAO,UAAU,MAAM,GAA2C;AACnG,QAAM,EAAE,iBAAiB,eAAe,WAAW,oBAAoB,UAAU,QAAI,sCAAgB;AACrG,SACE,6CAAC,SAAI,eAAW,cAAG,wCAAwC,aAAa,CAAC,WAAW,gBAAgB,GAClG;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAS;AAAA,QACT,eAAW,cAAG,MAAM,sGAAsG;AAAA,QAE1H,sDAAC,YAAS,MAAM,4BAAQ,eAAc,mCAAkC,OAAO,cAAc,aAAa,oBAAoB;AAAA;AAAA,IAChI;AAAA,IACA,4CAAC,oBAAiB,OAAc;AAAA,KAClC;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-access-cards.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, type Chain } from \"@medialane/sdk\";\nimport { Wallet } from \"lucide-react\";\nimport { useMedialaneApp, type AssetRef } from \"./medialane-app.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { cn } from \"../utils/cn.js\";\n\nexport function CompanionAppButton({ asset }: { asset: AssetRef }) {\n const { companion } = useMedialaneApp();\n if (!companion) return null;\n const Icon = companion.icon;\n return (\n <ActionButton\n action=\"offer\"\n icon={<Icon className=\"h-4 w-4\" />}\n href={`${companion.origin}${assetHref(asset.chain.toUpperCase() as Chain, asset.contractAddress, asset.tokenId)}`}\n title={companion.description}\n className=\"w-full\"\n >\n {companion.title}\n </ActionButton>\n );\n}\n\nexport function AssetAccessButtons({ asset, stacked = false }: { asset: AssetRef; stacked?: boolean }) {\n const { onRequireWallet, connectLabel = \"Sign in\", connectDescription, companion } = useMedialaneApp();\n return (\n <div className=\"space-y-2\">\n <div className={cn(\"grid grid-cols-1 gap-2\", companion && !stacked && \"sm:grid-cols-2\")}>\n <ActionButton action=\"buy\" icon={<Wallet className=\"h-4 w-4\" />} onClick={onRequireWallet} className=\"w-full\">\n {connectLabel}\n </ActionButton>\n <CompanionAppButton asset={asset} />\n </div>\n {connectDescription ? <p className=\"text-xs text-muted-foreground\">{connectDescription}</p> : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeY;AAbZ,iBAAsC;AACtC,0BAAuB;AACvB,2BAA+C;AAC/C,2BAA6B;AAC7B,gBAAmB;AAEZ,SAAS,mBAAmB,EAAE,MAAM,GAAwB;AACjE,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,MAAI,CAAC,UAAW,QAAO;AACvB,QAAM,OAAO,UAAU;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAO;AAAA,MACP,MAAM,4CAAC,QAAK,WAAU,WAAU;AAAA,MAChC,MAAM,GAAG,UAAU,MAAM,OAAG,sBAAU,MAAM,MAAM,YAAY,GAAY,MAAM,iBAAiB,MAAM,OAAO,CAAC;AAAA,MAC/G,OAAO,UAAU;AAAA,MACjB,WAAU;AAAA,MAET,oBAAU;AAAA;AAAA,EACb;AAEJ;AAEO,SAAS,mBAAmB,EAAE,OAAO,UAAU,MAAM,GAA2C;AACrG,QAAM,EAAE,iBAAiB,eAAe,WAAW,oBAAoB,UAAU,QAAI,sCAAgB;AACrG,SACE,6CAAC,SAAI,WAAU,aACb;AAAA,iDAAC,SAAI,eAAW,cAAG,0BAA0B,aAAa,CAAC,WAAW,gBAAgB,GACpF;AAAA,kDAAC,qCAAa,QAAO,OAAM,MAAM,4CAAC,8BAAO,WAAU,WAAU,GAAI,SAAS,iBAAiB,WAAU,UAClG,wBACH;AAAA,MACA,4CAAC,sBAAmB,OAAc;AAAA,OACpC;AAAA,IACC,qBAAqB,4CAAC,OAAE,WAAU,iCAAiC,8BAAmB,IAAO;AAAA,KAChG;AAEJ;","names":[]}
@@ -7,12 +7,12 @@ import 'starknet';
7
7
  import '@medialane/sdk';
8
8
  import '../utils/ipfs.cjs';
9
9
 
10
- declare function CompanionAppCard({ asset }: {
10
+ declare function CompanionAppButton({ asset }: {
11
11
  asset: AssetRef;
12
12
  }): react_jsx_runtime.JSX.Element | null;
13
- declare function AssetAccessCards({ asset, stacked }: {
13
+ declare function AssetAccessButtons({ asset, stacked }: {
14
14
  asset: AssetRef;
15
15
  stacked?: boolean;
16
16
  }): react_jsx_runtime.JSX.Element;
17
17
 
18
- export { AssetAccessCards, CompanionAppCard };
18
+ export { AssetAccessButtons, CompanionAppButton };
@@ -7,12 +7,12 @@ import 'starknet';
7
7
  import '@medialane/sdk';
8
8
  import '../utils/ipfs.js';
9
9
 
10
- declare function CompanionAppCard({ asset }: {
10
+ declare function CompanionAppButton({ asset }: {
11
11
  asset: AssetRef;
12
12
  }): react_jsx_runtime.JSX.Element | null;
13
- declare function AssetAccessCards({ asset, stacked }: {
13
+ declare function AssetAccessButtons({ asset, stacked }: {
14
14
  asset: AssetRef;
15
15
  stacked?: boolean;
16
16
  }): react_jsx_runtime.JSX.Element;
17
17
 
18
- export { AssetAccessCards, CompanionAppCard };
18
+ export { AssetAccessButtons, CompanionAppButton };
@@ -1,50 +1,38 @@
1
1
  "use client";
2
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
- import { Wallet } from "lucide-react";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
4
3
  import { assetHref } from "@medialane/sdk";
4
+ import { Wallet } from "lucide-react";
5
5
  import { useMedialaneApp } from "./medialane-app.js";
6
+ import { ActionButton } from "./action-button.js";
6
7
  import { cn } from "../utils/cn.js";
7
- const CARD = "group flex h-full w-full items-start gap-3 rounded-2xl border border-transparent p-4 text-left transition-colors";
8
- function CardBody({ icon: Icon, iconClassName, title, description }) {
9
- return /* @__PURE__ */ jsxs(Fragment, { children: [
10
- /* @__PURE__ */ jsx("div", { className: cn("mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br text-white", iconClassName), children: /* @__PURE__ */ jsx(Icon, { className: "h-[18px] w-[18px]" }) }),
11
- /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
12
- /* @__PURE__ */ jsx("p", { className: "text-sm font-bold leading-snug", children: title }),
13
- description ? /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-xs leading-relaxed text-muted-foreground", children: description }) : null
14
- ] })
15
- ] });
16
- }
17
- function CompanionAppCard({ asset }) {
8
+ function CompanionAppButton({ asset }) {
18
9
  const { companion } = useMedialaneApp();
19
10
  if (!companion) return null;
11
+ const Icon = companion.icon;
20
12
  return /* @__PURE__ */ jsx(
21
- "a",
13
+ ActionButton,
22
14
  {
15
+ action: "offer",
16
+ icon: /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }),
23
17
  href: `${companion.origin}${assetHref(asset.chain.toUpperCase(), asset.contractAddress, asset.tokenId)}`,
24
- target: "_blank",
25
- rel: "noopener noreferrer",
26
- className: cn(CARD, "bg-gradient-to-br from-brand-rose/15 via-brand-orange/10 to-transparent hover:border-brand-orange/30"),
27
- children: /* @__PURE__ */ jsx(CardBody, { icon: companion.icon, iconClassName: "from-brand-rose to-brand-orange", title: companion.title, description: companion.description })
18
+ title: companion.description,
19
+ className: "w-full",
20
+ children: companion.title
28
21
  }
29
22
  );
30
23
  }
31
- function AssetAccessCards({ asset, stacked = false }) {
24
+ function AssetAccessButtons({ asset, stacked = false }) {
32
25
  const { onRequireWallet, connectLabel = "Sign in", connectDescription, companion } = useMedialaneApp();
33
- return /* @__PURE__ */ jsxs("div", { className: cn("grid grid-cols-1 gap-3 items-stretch", companion && !stacked && "sm:grid-cols-2"), children: [
34
- /* @__PURE__ */ jsx(
35
- "button",
36
- {
37
- type: "button",
38
- onClick: onRequireWallet,
39
- className: cn(CARD, "bg-gradient-to-br from-brand-blue/15 via-brand-purple/10 to-transparent hover:border-brand-purple/30"),
40
- children: /* @__PURE__ */ jsx(CardBody, { icon: Wallet, iconClassName: "from-brand-blue to-brand-purple", title: connectLabel, description: connectDescription })
41
- }
42
- ),
43
- /* @__PURE__ */ jsx(CompanionAppCard, { asset })
26
+ return /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
27
+ /* @__PURE__ */ jsxs("div", { className: cn("grid grid-cols-1 gap-2", companion && !stacked && "sm:grid-cols-2"), children: [
28
+ /* @__PURE__ */ jsx(ActionButton, { action: "buy", icon: /* @__PURE__ */ jsx(Wallet, { className: "h-4 w-4" }), onClick: onRequireWallet, className: "w-full", children: connectLabel }),
29
+ /* @__PURE__ */ jsx(CompanionAppButton, { asset })
30
+ ] }),
31
+ connectDescription ? /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: connectDescription }) : null
44
32
  ] });
45
33
  }
46
34
  export {
47
- AssetAccessCards,
48
- CompanionAppCard
35
+ AssetAccessButtons,
36
+ CompanionAppButton
49
37
  };
50
38
  //# sourceMappingURL=asset-access-cards.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-access-cards.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ElementType } from \"react\";\nimport { Wallet } from \"lucide-react\";\nimport { assetHref, type Chain } from \"@medialane/sdk\";\nimport { useMedialaneApp, type AssetRef } from \"./medialane-app.js\";\nimport { cn } from \"../utils/cn.js\";\n\nconst CARD = \"group flex h-full w-full items-start gap-3 rounded-2xl border border-transparent p-4 text-left transition-colors\";\n\nfunction CardBody({ icon: Icon, iconClassName, title, description }: { icon: ElementType; iconClassName: string; title: string; description?: string }) {\n return (\n <>\n <div className={cn(\"mt-0.5 flex h-9 w-9 shrink-0 items-center justify-center rounded-xl bg-gradient-to-br text-white\", iconClassName)}>\n <Icon className=\"h-[18px] w-[18px]\" />\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-sm font-bold leading-snug\">{title}</p>\n {description ? <p className=\"mt-0.5 text-xs leading-relaxed text-muted-foreground\">{description}</p> : null}\n </div>\n </>\n );\n}\n\nexport function CompanionAppCard({ asset }: { asset: AssetRef }) {\n const { companion } = useMedialaneApp();\n if (!companion) return null;\n return (\n <a\n href={`${companion.origin}${assetHref(asset.chain.toUpperCase() as Chain, asset.contractAddress, asset.tokenId)}`}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(CARD, \"bg-gradient-to-br from-brand-rose/15 via-brand-orange/10 to-transparent hover:border-brand-orange/30\")}\n >\n <CardBody icon={companion.icon} iconClassName=\"from-brand-rose to-brand-orange\" title={companion.title} description={companion.description} />\n </a>\n );\n}\n\nexport function AssetAccessCards({ asset, stacked = false }: { asset: AssetRef; stacked?: boolean }) {\n const { onRequireWallet, connectLabel = \"Sign in\", connectDescription, companion } = useMedialaneApp();\n return (\n <div className={cn(\"grid grid-cols-1 gap-3 items-stretch\", companion && !stacked && \"sm:grid-cols-2\")}>\n <button\n type=\"button\"\n onClick={onRequireWallet}\n className={cn(CARD, \"bg-gradient-to-br from-brand-blue/15 via-brand-purple/10 to-transparent hover:border-brand-purple/30\")}\n >\n <CardBody icon={Wallet} iconClassName=\"from-brand-blue to-brand-purple\" title={connectLabel} description={connectDescription} />\n </button>\n <CompanionAppCard asset={asset} />\n </div>\n );\n}\n\n"],"mappings":";AAYI,mBAEI,KAEF,YAJF;AATJ,SAAS,cAAc;AACvB,SAAS,iBAA6B;AACtC,SAAS,uBAAsC;AAC/C,SAAS,UAAU;AAEnB,MAAM,OAAO;AAEb,SAAS,SAAS,EAAE,MAAM,MAAM,eAAe,OAAO,YAAY,GAAsF;AACtJ,SACE,iCACE;AAAA,wBAAC,SAAI,WAAW,GAAG,oGAAoG,aAAa,GAClI,8BAAC,QAAK,WAAU,qBAAoB,GACtC;AAAA,IACA,qBAAC,SAAI,WAAU,kBACb;AAAA,0BAAC,OAAE,WAAU,kCAAkC,iBAAM;AAAA,MACpD,cAAc,oBAAC,OAAE,WAAU,wDAAwD,uBAAY,IAAO;AAAA,OACzG;AAAA,KACF;AAEJ;AAEO,SAAS,iBAAiB,EAAE,MAAM,GAAwB;AAC/D,QAAM,EAAE,UAAU,IAAI,gBAAgB;AACtC,MAAI,CAAC,UAAW,QAAO;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM,GAAG,UAAU,MAAM,GAAG,UAAU,MAAM,MAAM,YAAY,GAAY,MAAM,iBAAiB,MAAM,OAAO,CAAC;AAAA,MAC/G,QAAO;AAAA,MACP,KAAI;AAAA,MACJ,WAAW,GAAG,MAAM,sGAAsG;AAAA,MAE1H,8BAAC,YAAS,MAAM,UAAU,MAAM,eAAc,mCAAkC,OAAO,UAAU,OAAO,aAAa,UAAU,aAAa;AAAA;AAAA,EAC9I;AAEJ;AAEO,SAAS,iBAAiB,EAAE,OAAO,UAAU,MAAM,GAA2C;AACnG,QAAM,EAAE,iBAAiB,eAAe,WAAW,oBAAoB,UAAU,IAAI,gBAAgB;AACrG,SACE,qBAAC,SAAI,WAAW,GAAG,wCAAwC,aAAa,CAAC,WAAW,gBAAgB,GAClG;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,MAAK;AAAA,QACL,SAAS;AAAA,QACT,WAAW,GAAG,MAAM,sGAAsG;AAAA,QAE1H,8BAAC,YAAS,MAAM,QAAQ,eAAc,mCAAkC,OAAO,cAAc,aAAa,oBAAoB;AAAA;AAAA,IAChI;AAAA,IACA,oBAAC,oBAAiB,OAAc;AAAA,KAClC;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-access-cards.tsx"],"sourcesContent":["\"use client\";\n\nimport { assetHref, type Chain } from \"@medialane/sdk\";\nimport { Wallet } from \"lucide-react\";\nimport { useMedialaneApp, type AssetRef } from \"./medialane-app.js\";\nimport { ActionButton } from \"./action-button.js\";\nimport { cn } from \"../utils/cn.js\";\n\nexport function CompanionAppButton({ asset }: { asset: AssetRef }) {\n const { companion } = useMedialaneApp();\n if (!companion) return null;\n const Icon = companion.icon;\n return (\n <ActionButton\n action=\"offer\"\n icon={<Icon className=\"h-4 w-4\" />}\n href={`${companion.origin}${assetHref(asset.chain.toUpperCase() as Chain, asset.contractAddress, asset.tokenId)}`}\n title={companion.description}\n className=\"w-full\"\n >\n {companion.title}\n </ActionButton>\n );\n}\n\nexport function AssetAccessButtons({ asset, stacked = false }: { asset: AssetRef; stacked?: boolean }) {\n const { onRequireWallet, connectLabel = \"Sign in\", connectDescription, companion } = useMedialaneApp();\n return (\n <div className=\"space-y-2\">\n <div className={cn(\"grid grid-cols-1 gap-2\", companion && !stacked && \"sm:grid-cols-2\")}>\n <ActionButton action=\"buy\" icon={<Wallet className=\"h-4 w-4\" />} onClick={onRequireWallet} className=\"w-full\">\n {connectLabel}\n </ActionButton>\n <CompanionAppButton asset={asset} />\n </div>\n {connectDescription ? <p className=\"text-xs text-muted-foreground\">{connectDescription}</p> : null}\n </div>\n );\n}\n"],"mappings":";AAeY,cAcN,YAdM;AAbZ,SAAS,iBAA6B;AACtC,SAAS,cAAc;AACvB,SAAS,uBAAsC;AAC/C,SAAS,oBAAoB;AAC7B,SAAS,UAAU;AAEZ,SAAS,mBAAmB,EAAE,MAAM,GAAwB;AACjE,QAAM,EAAE,UAAU,IAAI,gBAAgB;AACtC,MAAI,CAAC,UAAW,QAAO;AACvB,QAAM,OAAO,UAAU;AACvB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,QAAO;AAAA,MACP,MAAM,oBAAC,QAAK,WAAU,WAAU;AAAA,MAChC,MAAM,GAAG,UAAU,MAAM,GAAG,UAAU,MAAM,MAAM,YAAY,GAAY,MAAM,iBAAiB,MAAM,OAAO,CAAC;AAAA,MAC/G,OAAO,UAAU;AAAA,MACjB,WAAU;AAAA,MAET,oBAAU;AAAA;AAAA,EACb;AAEJ;AAEO,SAAS,mBAAmB,EAAE,OAAO,UAAU,MAAM,GAA2C;AACrG,QAAM,EAAE,iBAAiB,eAAe,WAAW,oBAAoB,UAAU,IAAI,gBAAgB;AACrG,SACE,qBAAC,SAAI,WAAU,aACb;AAAA,yBAAC,SAAI,WAAW,GAAG,0BAA0B,aAAa,CAAC,WAAW,gBAAgB,GACpF;AAAA,0BAAC,gBAAa,QAAO,OAAM,MAAM,oBAAC,UAAO,WAAU,WAAU,GAAI,SAAS,iBAAiB,WAAU,UAClG,wBACH;AAAA,MACA,oBAAC,sBAAmB,OAAc;AAAA,OACpC;AAAA,IACC,qBAAqB,oBAAC,OAAE,WAAU,iCAAiC,8BAAmB,IAAO;AAAA,KAChG;AAEJ;","names":[]}
@@ -34,21 +34,22 @@ var import_same_address = require("../utils/same-address.js");
34
34
  var import_cn = require("../utils/cn.js");
35
35
  var import_asset_access_cards = require("./asset-access-cards.js");
36
36
  var import_medialane_app = require("./medialane-app.js");
37
- var import_help_icon = require("./help-icon.js");
38
37
  function ActionRow({ children }) {
39
38
  const odd = import_react.Children.toArray(children).length % 2 === 1;
40
39
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_cn.cn)("grid grid-cols-2 gap-2", odd && "[&>*:first-child]:col-span-2"), children });
41
40
  }
42
- function PriceLine({ label, order, usdValue }) {
43
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground", children: [
44
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: label }),
45
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyAmount, { amount: (0, import_format.formatDisplayPrice)(order.price.formatted), symbol: order.price.currency ?? "", iconSize: 14, amountClassName: "text-base font-bold text-foreground tabular-nums" }),
46
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "font-semibold text-foreground", children: order.price.currency }),
47
- usdValue ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "tabular-nums", children: [
48
- "\xB7 ",
49
- usdValue
50
- ] }) : null,
51
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_help_icon.HelpIcon, { content: `Expires ${(0, import_time.timeUntil)(order.endTime)}` })
41
+ function PriceBlock({ order, usdValue }) {
42
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-1", children: [
43
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs font-medium uppercase tracking-wide text-muted-foreground", children: "Buy for" }),
44
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-wrap items-baseline gap-x-2 gap-y-1", children: [
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyAmount, { amount: (0, import_format.formatDisplayPrice)(order.price.formatted), symbol: order.price.currency ?? "", iconSize: 26, amountClassName: "text-3xl font-bold text-foreground tabular-nums" }),
46
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-lg font-semibold text-foreground", children: order.price.currency }),
47
+ usdValue ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm tabular-nums text-muted-foreground", children: usdValue }) : null
48
+ ] }),
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "text-xs text-muted-foreground", children: [
50
+ "Expires ",
51
+ (0, import_time.timeUntil)(order.endTime)
52
+ ] })
52
53
  ] });
53
54
  }
54
55
  function AssetMarketplacePanel({
@@ -102,17 +103,16 @@ function AssetMarketplacePanel({
102
103
  }
103
104
  ) : null;
104
105
  const offerButton = /* @__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, children: "Make offer" });
105
- const buyButton = liveCheapest && (!isOwner || canBuyMore) ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_action_button.ActionButton, { action: "buy", onClick: () => onOpenPurchase(liveCheapest), children: [
106
+ const buyButton = liveCheapest && (!isOwner || canBuyMore) ? isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_action_button.ActionButton, { action: "buy", onClick: () => onOpenPurchase(liveCheapest), children: [
106
107
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "Buy" }),
107
108
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyAmount, { amount: (0, import_format.formatDisplayPrice)(liveCheapest.price.formatted), symbol: liveCheapest.price.currency ?? "", iconSize: 14, amountClassName: "tabular-nums" }),
108
109
  usdValue ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "font-normal text-muted-foreground tabular-nums", children: [
109
110
  "\xB7 ",
110
111
  usdValue
111
112
  ] }) : null
112
- ] }) : null;
113
- const listedPrice = !isOwner && !isSignedIn && liveCheapest ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PriceLine, { label: "Price", order: liveCheapest, usdValue }) : null;
113
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_action_button.ActionButton, { action: "buy", onClick: () => onOpenPurchase(liveCheapest), children: "Buy now" }) : null;
114
+ const listedPrice = !isOwner && liveCheapest ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PriceBlock, { order: liveCheapest, usdValue }) : null;
114
115
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "relative space-y-4", children: [
115
- listedPrice,
116
116
  isOwner ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-3", children: [
117
117
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ActionRow, { children: [
118
118
  liveMyListing ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
@@ -148,31 +148,34 @@ function AssetMarketplacePanel({
148
148
  ) : null
149
149
  ] }),
150
150
  buyButton ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ActionRow, { children: buyButton }) : null
151
- ] }) : isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "space-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ActionRow, { children: [
152
- buyButton,
153
- offerButton,
154
- remixButton,
155
- showDealOption && onProposeDeal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
156
- import_action_button.ActionButton,
157
- {
158
- action: "license",
159
- icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }),
160
- onClick: onProposeDeal,
161
- helpContent: "Propose a license deal to the creator to use this work.",
162
- children: "License"
163
- }
164
- ) : null,
165
- showSponsorOption && onOpenSponsorProposal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
166
- import_action_button.ActionButton,
167
- {
168
- tone: "blue",
169
- icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Handshake, { className: "h-4 w-4" }),
170
- onClick: onOpenSponsorProposal,
171
- helpContent: "Propose to sponsor this creator's work \u2014 pay them directly for a license, no escrow.",
172
- children: "Sponsor"
173
- }
174
- ) : null
175
- ] }) }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_asset_access_cards.AssetAccessCards, { asset, stacked: compact }),
151
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4", children: [
152
+ listedPrice,
153
+ isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(ActionRow, { children: [
154
+ buyButton,
155
+ offerButton,
156
+ remixButton,
157
+ showDealOption && onProposeDeal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
158
+ import_action_button.ActionButton,
159
+ {
160
+ action: "license",
161
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4" }),
162
+ onClick: onProposeDeal,
163
+ helpContent: "Propose a license deal to the creator to use this work.",
164
+ children: "License"
165
+ }
166
+ ) : null,
167
+ showSponsorOption && onOpenSponsorProposal ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
168
+ import_action_button.ActionButton,
169
+ {
170
+ tone: "blue",
171
+ icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Handshake, { className: "h-4 w-4" }),
172
+ onClick: onOpenSponsorProposal,
173
+ helpContent: "Propose to sponsor this creator's work \u2014 pay them directly for a license, no escrow.",
174
+ children: "Sponsor"
175
+ }
176
+ ) : null
177
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_asset_access_cards.AssetAccessButtons, { asset, stacked: compact })
178
+ ] }),
176
179
  myBid ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-xl bg-amber-500/8 px-4 py-3 flex items-center justify-between gap-3", children: [
177
180
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex items-center gap-2.5", children: [
178
181
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.HandCoins, { className: "h-4 w-4 text-amber-500 shrink-0" }),
@@ -236,7 +239,7 @@ function AssetMarketplacePanel({
236
239
  )
237
240
  ] }, bid.orderHash)) })
238
241
  ] }) : null,
239
- isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_asset_access_cards.CompanionAppCard, { asset }) : null
242
+ isSignedIn ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_asset_access_cards.CompanionAppButton, { asset }) : null
240
243
  ] }) });
241
244
  }
242
245
  // Annotate the CommonJS export names for ESM import in node: