@medialane/ui 0.374.2 → 0.376.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 (97) hide show
  1. package/dist/components/account/input-otp.d.cts +2 -2
  2. package/dist/components/account/input-otp.d.ts +2 -2
  3. package/dist/components/action-button.cjs +6 -6
  4. package/dist/components/action-button.cjs.map +1 -1
  5. package/dist/components/action-button.d.cts +6 -4
  6. package/dist/components/action-button.d.ts +6 -4
  7. package/dist/components/action-button.js +7 -7
  8. package/dist/components/action-button.js.map +1 -1
  9. package/dist/components/archived-asset-notice.cjs +2 -1
  10. package/dist/components/archived-asset-notice.cjs.map +1 -1
  11. package/dist/components/archived-asset-notice.js +2 -1
  12. package/dist/components/archived-asset-notice.js.map +1 -1
  13. package/dist/components/asset-access-cards.cjs +2 -1
  14. package/dist/components/asset-access-cards.cjs.map +1 -1
  15. package/dist/components/asset-access-cards.js +2 -1
  16. package/dist/components/asset-access-cards.js.map +1 -1
  17. package/dist/components/asset-collection-bar.cjs +3 -2
  18. package/dist/components/asset-collection-bar.cjs.map +1 -1
  19. package/dist/components/asset-collection-bar.js +3 -2
  20. package/dist/components/asset-collection-bar.js.map +1 -1
  21. package/dist/components/asset-license-summary.cjs +4 -10
  22. package/dist/components/asset-license-summary.cjs.map +1 -1
  23. package/dist/components/asset-license-summary.js +4 -10
  24. package/dist/components/asset-license-summary.js.map +1 -1
  25. package/dist/components/asset-marketplace-panel.cjs +6 -16
  26. package/dist/components/asset-marketplace-panel.cjs.map +1 -1
  27. package/dist/components/asset-marketplace-panel.js +6 -16
  28. package/dist/components/asset-marketplace-panel.js.map +1 -1
  29. package/dist/components/asset-markets-tab.cjs +6 -23
  30. package/dist/components/asset-markets-tab.cjs.map +1 -1
  31. package/dist/components/asset-markets-tab.js +6 -23
  32. package/dist/components/asset-markets-tab.js.map +1 -1
  33. package/dist/components/asset-overview-content.cjs +27 -36
  34. package/dist/components/asset-overview-content.cjs.map +1 -1
  35. package/dist/components/asset-overview-content.js +27 -36
  36. package/dist/components/asset-overview-content.js.map +1 -1
  37. package/dist/components/asset-owners-panel.cjs +2 -1
  38. package/dist/components/asset-owners-panel.cjs.map +1 -1
  39. package/dist/components/asset-owners-panel.js +2 -1
  40. package/dist/components/asset-owners-panel.js.map +1 -1
  41. package/dist/components/asset-provenance-tab.cjs +15 -12
  42. package/dist/components/asset-provenance-tab.cjs.map +1 -1
  43. package/dist/components/asset-provenance-tab.js +15 -12
  44. package/dist/components/asset-provenance-tab.js.map +1 -1
  45. package/dist/components/asset-publication.cjs +2 -1
  46. package/dist/components/asset-publication.cjs.map +1 -1
  47. package/dist/components/asset-publication.js +2 -1
  48. package/dist/components/asset-publication.js.map +1 -1
  49. package/dist/components/asset-type-panels.cjs +4 -5
  50. package/dist/components/asset-type-panels.cjs.map +1 -1
  51. package/dist/components/asset-type-panels.js +4 -5
  52. package/dist/components/asset-type-panels.js.map +1 -1
  53. package/dist/components/button.d.cts +1 -1
  54. package/dist/components/button.d.ts +1 -1
  55. package/dist/components/fast-mint/fast-mint.d.cts +2 -2
  56. package/dist/components/fast-mint/fast-mint.d.ts +2 -2
  57. package/dist/components/hidden-content-banner.cjs +4 -3
  58. package/dist/components/hidden-content-banner.cjs.map +1 -1
  59. package/dist/components/hidden-content-banner.js +4 -3
  60. package/dist/components/hidden-content-banner.js.map +1 -1
  61. package/dist/components/ip-type-display.cjs +5 -2
  62. package/dist/components/ip-type-display.cjs.map +1 -1
  63. package/dist/components/ip-type-display.js +5 -2
  64. package/dist/components/ip-type-display.js.map +1 -1
  65. package/dist/components/launchpad/edition-mint-schema.d.cts +4 -4
  66. package/dist/components/launchpad/edition-mint-schema.d.ts +4 -4
  67. package/dist/components/panel.cjs +81 -0
  68. package/dist/components/panel.cjs.map +1 -0
  69. package/dist/components/panel.d.cts +22 -0
  70. package/dist/components/panel.d.ts +22 -0
  71. package/dist/components/panel.js +44 -0
  72. package/dist/components/panel.js.map +1 -0
  73. package/dist/components/sheet.d.cts +1 -1
  74. package/dist/components/sheet.d.ts +1 -1
  75. package/dist/components/soulbound-card.cjs +2 -1
  76. package/dist/components/soulbound-card.cjs.map +1 -1
  77. package/dist/components/soulbound-card.js +2 -1
  78. package/dist/components/soulbound-card.js.map +1 -1
  79. package/dist/data/brand.cjs +37 -25
  80. package/dist/data/brand.cjs.map +1 -1
  81. package/dist/data/brand.d.cts +31 -14
  82. package/dist/data/brand.d.ts +31 -14
  83. package/dist/data/brand.js +33 -24
  84. package/dist/data/brand.js.map +1 -1
  85. package/dist/data/ip-types.cjs +11 -9
  86. package/dist/data/ip-types.cjs.map +1 -1
  87. package/dist/data/ip-types.js +11 -9
  88. package/dist/data/ip-types.js.map +1 -1
  89. package/dist/index.cjs +9 -0
  90. package/dist/index.cjs.map +1 -1
  91. package/dist/index.d.cts +1 -0
  92. package/dist/index.d.ts +1 -0
  93. package/dist/index.js +5 -0
  94. package/dist/index.js.map +1 -1
  95. package/dist/utils/media-wallet/use-erc20-balance.d.cts +1 -1
  96. package/dist/utils/media-wallet/use-erc20-balance.d.ts +1 -1
  97. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import * as input_otp from 'input-otp';
2
2
  import * as React from 'react';
3
3
 
4
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "maxLength" | "value" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
5
5
  value?: string;
6
6
  onChange?: (newValue: string) => unknown;
7
7
  maxLength: number;
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
14
14
  } & {
15
15
  render: (props: input_otp.RenderProps) => React.ReactNode;
16
16
  children?: never;
17
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "maxLength" | "value" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
18
18
  value?: string;
19
19
  onChange?: (newValue: string) => unknown;
20
20
  maxLength: number;
@@ -1,7 +1,7 @@
1
1
  import * as input_otp from 'input-otp';
2
2
  import * as React from 'react';
3
3
 
4
- declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "maxLength" | "value" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
4
+ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
5
5
  value?: string;
6
6
  onChange?: (newValue: string) => unknown;
7
7
  maxLength: number;
@@ -14,7 +14,7 @@ declare const InputOTP: React.ForwardRefExoticComponent<(Omit<Omit<React.InputHT
14
14
  } & {
15
15
  render: (props: input_otp.RenderProps) => React.ReactNode;
16
16
  children?: never;
17
- } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "maxLength" | "value" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
17
+ } & React.RefAttributes<HTMLInputElement>, "ref"> | Omit<Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "value" | "maxLength" | "textAlign" | "onComplete" | "pushPasswordManagerStrategy" | "pasteTransformer" | "containerClassName" | "noScriptCSSFallback"> & {
18
18
  value?: string;
19
19
  onChange?: (newValue: string) => unknown;
20
20
  maxLength: number;
@@ -31,6 +31,7 @@ function ActionButton({
31
31
  tone,
32
32
  icon,
33
33
  big,
34
+ small,
34
35
  ghost,
35
36
  helpContent,
36
37
  disabled,
@@ -39,7 +40,7 @@ function ActionButton({
39
40
  style,
40
41
  ...rest
41
42
  }) {
42
- const sizeClass = big ? "h-[54px] px-5 rounded-[13px] text-base" : "h-[46px] px-5 rounded-[13px] text-sm";
43
+ const sizeClass = big ? "h-[54px] px-5 rounded-[13px] text-base" : small ? "h-9 px-3 rounded-xl text-xs" : "h-[46px] px-5 rounded-[13px] text-sm";
43
44
  if (ghost) {
44
45
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
45
46
  "button",
@@ -61,21 +62,20 @@ function ActionButton({
61
62
  }
62
63
  );
63
64
  }
64
- const gradColors = action ? import_brand.ACTION_GRADIENTS[action] : tone ? import_brand.TONE_GRADIENTS[tone] : import_brand.ACTION_GRADIENTS.buy;
65
+ const [from, to] = action ? import_brand.ACTION_PAIRS[action] : tone ? import_brand.TONE_PAIRS[tone] : import_brand.ACTION_PAIRS.buy;
65
66
  const fg = action ? import_brand.ACTION_FOREGROUNDS[action] : tone ? import_brand.TONE_FOREGROUNDS[tone] : import_brand.ACTION_FOREGROUNDS.buy;
66
- const grad = `linear-gradient(115deg, ${gradColors.join(",")})`;
67
67
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
68
68
  "button",
69
69
  {
70
70
  ...rest,
71
71
  disabled,
72
72
  className: (0, import_cn.cn)(
73
- "ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
74
- "bg-transparent text-foreground border-none relative disabled:opacity-40 disabled:pointer-events-none",
73
+ "inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
74
+ "text-foreground border-none transition-[filter] hover:brightness-125 disabled:opacity-40 disabled:pointer-events-none",
75
75
  sizeClass,
76
76
  className
77
77
  ),
78
- style: { "--ml-grad": grad, ...style },
78
+ style: { backgroundImage: `linear-gradient(115deg, ${(0, import_brand.brandTint)(from, 0.28)}, ${(0, import_brand.brandTint)(to, 0.16)})`, ...style },
79
79
  children: [
80
80
  icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "inline-flex", style: { color: fg }, children: icon }),
81
81
  children,
@@ -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\";\nimport { ACTION_FOREGROUNDS, ACTION_GRADIENTS, TONE_FOREGROUNDS, TONE_GRADIENTS } from \"../data/brand.js\";\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;AA0CM;AAxCN,gBAAmB;AACnB,uBAAyB;AACzB,mBAAuF;AAmBhF,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,YAAY,MACd,2CACA;AAEJ,MAAI,OAAO;AACT,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,UAAM;AAAA,UACN,cAAc,4CAAC,6BAAS,SAAS,aAAa,IAAK;AAAA;AAAA;AAAA,IACtD;AAAA,EAEJ;AAEA,QAAM,aACJ,SAAS,8BAAiB,MAAM,IAChC,OAAS,4BAAe,IAAI,IAC5B,8BAAiB;AAEnB,QAAM,KACJ,SAAS,gCAAmB,MAAM,IAClC,OAAS,8BAAiB,IAAI,IAC9B,gCAAmB;AAErB,QAAM,OAAO,2BAA2B,WAAW,KAAK,GAAG,CAAC;AAE5D,SACE;AAAA,IAAC;AAAA;AAAA,MACE,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":[]}
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\";\nimport { ACTION_FOREGROUNDS, ACTION_PAIRS, TONE_FOREGROUNDS, TONE_PAIRS, brandTint } from \"../data/brand.js\";\n\nexport type ActionKey = keyof typeof ACTION_PAIRS;\nexport type ToneKey = keyof typeof TONE_PAIRS;\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 /** Compact size for actions inside list rows. */\n small?: boolean;\n\n ghost?: boolean;\n\n helpContent?: string;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n small,\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 : small\n ? \"h-9 px-3 rounded-xl text-xs\"\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 [from, to] =\n action ? ACTION_PAIRS[action] :\n tone ? TONE_PAIRS[tone] :\n ACTION_PAIRS.buy;\n\n const fg =\n action ? ACTION_FOREGROUNDS[action] :\n tone ? TONE_FOREGROUNDS[tone] :\n ACTION_FOREGROUNDS.buy;\n\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 \"text-foreground border-none transition-[filter] hover:brightness-125 disabled:opacity-40 disabled:pointer-events-none\",\n sizeClass,\n className,\n )}\n style={{ backgroundImage: `linear-gradient(115deg, ${brandTint(from, 0.28)}, ${brandTint(to, 0.16)})`, ...style }}\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;AAgDM;AA9CN,gBAAmB;AACnB,uBAAyB;AACzB,mBAA0F;AAsBnF,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,YAAY,MACd,2CACA,QACA,gCACA;AAEJ,MAAI,OAAO;AACT,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,UAAM;AAAA,UACN,cAAc,4CAAC,6BAAS,SAAS,aAAa,IAAK;AAAA;AAAA;AAAA,IACtD;AAAA,EAEJ;AAEA,QAAM,CAAC,MAAM,EAAE,IACb,SAAS,0BAAa,MAAM,IAC5B,OAAS,wBAAW,IAAI,IACxB,0BAAa;AAEf,QAAM,KACJ,SAAS,gCAAmB,MAAM,IAClC,OAAS,8BAAiB,IAAI,IAC9B,gCAAmB;AAErB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,OAAO,EAAE,iBAAiB,+BAA2B,wBAAU,MAAM,IAAI,CAAC,SAAK,wBAAU,IAAI,IAAI,CAAC,KAAK,GAAG,MAAM;AAAA,MAE/G;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":[]}
@@ -1,16 +1,18 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ACTION_GRADIENTS, TONE_GRADIENTS } from '../data/brand.cjs';
2
+ import { ACTION_PAIRS, TONE_PAIRS } from '../data/brand.cjs';
3
3
 
4
- type ActionKey = keyof typeof ACTION_GRADIENTS;
5
- type ToneKey = keyof typeof TONE_GRADIENTS;
4
+ type ActionKey = keyof typeof ACTION_PAIRS;
5
+ type ToneKey = keyof typeof TONE_PAIRS;
6
6
  interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
7
7
  action?: ActionKey;
8
8
  tone?: ToneKey;
9
9
  icon?: React.ReactNode;
10
10
  big?: boolean;
11
+ /** Compact size for actions inside list rows. */
12
+ small?: boolean;
11
13
  ghost?: boolean;
12
14
  helpContent?: string;
13
15
  }
14
- 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, small, ghost, helpContent, disabled, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
15
17
 
16
18
  export { ActionButton, type ActionButtonProps, type ActionKey, type ToneKey };
@@ -1,16 +1,18 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ACTION_GRADIENTS, TONE_GRADIENTS } from '../data/brand.js';
2
+ import { ACTION_PAIRS, TONE_PAIRS } from '../data/brand.js';
3
3
 
4
- type ActionKey = keyof typeof ACTION_GRADIENTS;
5
- type ToneKey = keyof typeof TONE_GRADIENTS;
4
+ type ActionKey = keyof typeof ACTION_PAIRS;
5
+ type ToneKey = keyof typeof TONE_PAIRS;
6
6
  interface ActionButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
7
7
  action?: ActionKey;
8
8
  tone?: ToneKey;
9
9
  icon?: React.ReactNode;
10
10
  big?: boolean;
11
+ /** Compact size for actions inside list rows. */
12
+ small?: boolean;
11
13
  ghost?: boolean;
12
14
  helpContent?: string;
13
15
  }
14
- 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, small, ghost, helpContent, disabled, children, className, style, ...rest }: ActionButtonProps): react_jsx_runtime.JSX.Element;
15
17
 
16
18
  export { ActionButton, type ActionButtonProps, type ActionKey, type ToneKey };
@@ -2,12 +2,13 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { cn } from "../utils/cn.js";
4
4
  import { HelpIcon } from "./help-icon.js";
5
- import { ACTION_FOREGROUNDS, ACTION_GRADIENTS, TONE_FOREGROUNDS, TONE_GRADIENTS } from "../data/brand.js";
5
+ import { ACTION_FOREGROUNDS, ACTION_PAIRS, TONE_FOREGROUNDS, TONE_PAIRS, brandTint } from "../data/brand.js";
6
6
  function ActionButton({
7
7
  action,
8
8
  tone,
9
9
  icon,
10
10
  big,
11
+ small,
11
12
  ghost,
12
13
  helpContent,
13
14
  disabled,
@@ -16,7 +17,7 @@ function ActionButton({
16
17
  style,
17
18
  ...rest
18
19
  }) {
19
- const sizeClass = big ? "h-[54px] px-5 rounded-[13px] text-base" : "h-[46px] px-5 rounded-[13px] text-sm";
20
+ const sizeClass = big ? "h-[54px] px-5 rounded-[13px] text-base" : small ? "h-9 px-3 rounded-xl text-xs" : "h-[46px] px-5 rounded-[13px] text-sm";
20
21
  if (ghost) {
21
22
  return /* @__PURE__ */ jsxs(
22
23
  "button",
@@ -38,21 +39,20 @@ function ActionButton({
38
39
  }
39
40
  );
40
41
  }
41
- const gradColors = action ? ACTION_GRADIENTS[action] : tone ? TONE_GRADIENTS[tone] : ACTION_GRADIENTS.buy;
42
+ const [from, to] = action ? ACTION_PAIRS[action] : tone ? TONE_PAIRS[tone] : ACTION_PAIRS.buy;
42
43
  const fg = action ? ACTION_FOREGROUNDS[action] : tone ? TONE_FOREGROUNDS[tone] : ACTION_FOREGROUNDS.buy;
43
- const grad = `linear-gradient(115deg, ${gradColors.join(",")})`;
44
44
  return /* @__PURE__ */ jsxs(
45
45
  "button",
46
46
  {
47
47
  ...rest,
48
48
  disabled,
49
49
  className: cn(
50
- "ml-gbtn inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
51
- "bg-transparent text-foreground border-none relative disabled:opacity-40 disabled:pointer-events-none",
50
+ "inline-flex items-center justify-center gap-2 font-semibold cursor-pointer whitespace-nowrap",
51
+ "text-foreground border-none transition-[filter] hover:brightness-125 disabled:opacity-40 disabled:pointer-events-none",
52
52
  sizeClass,
53
53
  className
54
54
  ),
55
- style: { "--ml-grad": grad, ...style },
55
+ style: { backgroundImage: `linear-gradient(115deg, ${brandTint(from, 0.28)}, ${brandTint(to, 0.16)})`, ...style },
56
56
  children: [
57
57
  icon && /* @__PURE__ */ jsx("span", { className: "inline-flex", style: { color: fg }, children: icon }),
58
58
  children,
@@ -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\";\nimport { ACTION_FOREGROUNDS, ACTION_GRADIENTS, TONE_FOREGROUNDS, TONE_GRADIENTS } from \"../data/brand.js\";\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":";AA0CM,SAYiB,KAZjB;AAxCN,SAAS,UAAU;AACnB,SAAS,gBAAgB;AACzB,SAAS,oBAAoB,kBAAkB,kBAAkB,sBAAsB;AAmBhF,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,YAAY,MACd,2CACA;AAEJ,MAAI,OAAO;AACT,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,UAAM;AAAA,UACN,cAAc,oBAAC,YAAS,SAAS,aAAa,IAAK;AAAA;AAAA;AAAA,IACtD;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;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":[]}
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\";\nimport { ACTION_FOREGROUNDS, ACTION_PAIRS, TONE_FOREGROUNDS, TONE_PAIRS, brandTint } from \"../data/brand.js\";\n\nexport type ActionKey = keyof typeof ACTION_PAIRS;\nexport type ToneKey = keyof typeof TONE_PAIRS;\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 /** Compact size for actions inside list rows. */\n small?: boolean;\n\n ghost?: boolean;\n\n helpContent?: string;\n}\n\nexport function ActionButton({\n action,\n tone,\n icon,\n big,\n small,\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 : small\n ? \"h-9 px-3 rounded-xl text-xs\"\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 [from, to] =\n action ? ACTION_PAIRS[action] :\n tone ? TONE_PAIRS[tone] :\n ACTION_PAIRS.buy;\n\n const fg =\n action ? ACTION_FOREGROUNDS[action] :\n tone ? TONE_FOREGROUNDS[tone] :\n ACTION_FOREGROUNDS.buy;\n\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 \"text-foreground border-none transition-[filter] hover:brightness-125 disabled:opacity-40 disabled:pointer-events-none\",\n sizeClass,\n className,\n )}\n style={{ backgroundImage: `linear-gradient(115deg, ${brandTint(from, 0.28)}, ${brandTint(to, 0.16)})`, ...style }}\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":";AAgDM,SAYiB,KAZjB;AA9CN,SAAS,UAAU;AACnB,SAAS,gBAAgB;AACzB,SAAS,oBAAoB,cAAc,kBAAkB,YAAY,iBAAiB;AAsBnF,SAAS,aAAa;AAAA,EAC3B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAsB;AACpB,QAAM,YAAY,MACd,2CACA,QACA,gCACA;AAEJ,MAAI,OAAO;AACT,WACE;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACJ;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA;AAAA,QAEC;AAAA;AAAA,UAAM;AAAA,UACN,cAAc,oBAAC,YAAS,SAAS,aAAa,IAAK;AAAA;AAAA;AAAA,IACtD;AAAA,EAEJ;AAEA,QAAM,CAAC,MAAM,EAAE,IACb,SAAS,aAAa,MAAM,IAC5B,OAAS,WAAW,IAAI,IACxB,aAAa;AAEf,QAAM,KACJ,SAAS,mBAAmB,MAAM,IAClC,OAAS,iBAAiB,IAAI,IAC9B,mBAAmB;AAErB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,MACA,OAAO,EAAE,iBAAiB,2BAA2B,UAAU,MAAM,IAAI,CAAC,KAAK,UAAU,IAAI,IAAI,CAAC,KAAK,GAAG,MAAM;AAAA,MAE/G;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":[]}
@@ -25,9 +25,10 @@ module.exports = __toCommonJS(archived_asset_notice_exports);
25
25
  var import_jsx_runtime = require("react/jsx-runtime");
26
26
  var import_lucide_react = require("lucide-react");
27
27
  var import_provider = require("../i18n/provider.js");
28
+ var import_panel = require("./panel.js");
28
29
  function ArchivedAssetNotice() {
29
30
  const t = (0, import_provider.useT)();
30
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-start gap-3 rounded-xl border border-border bg-muted/30 px-4 py-3", children: [
31
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_panel.Panel, { className: "flex items-start gap-3 px-4 py-3", children: [
31
32
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_lucide_react.Archive, { className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
32
33
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-0.5", children: [
33
34
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold", children: t("Permanently archived") }),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/archived-asset-notice.tsx"],"sourcesContent":["\"use client\";\n\nimport { Archive } from \"lucide-react\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport function ArchivedAssetNotice() {\n const t = useT();\n return (\n <div className=\"flex items-start gap-3 rounded-xl border border-border bg-muted/30 px-4 py-3\">\n <Archive className=\"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground\" aria-hidden />\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-semibold\">{t(\"Permanently archived\")}</p>\n <p className=\"text-xs text-muted-foreground\">\n {t(\"This asset's record stays onchain with its owner, creator and history. It can no longer be transferred or sold.\")}\n </p>\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AASM;AAPN,0BAAwB;AACxB,sBAAqB;AAEd,SAAS,sBAAsB;AACpC,QAAM,QAAI,sBAAK;AACf,SACE,6CAAC,SAAI,WAAU,gFACb;AAAA,gDAAC,+BAAQ,WAAU,iDAAgD,eAAW,MAAC;AAAA,IAC/E,6CAAC,SAAI,WAAU,eACb;AAAA,kDAAC,OAAE,WAAU,yBAAyB,YAAE,sBAAsB,GAAE;AAAA,MAChE,4CAAC,OAAE,WAAU,iCACV,YAAE,iHAAiH,GACtH;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/archived-asset-notice.tsx"],"sourcesContent":["\"use client\";\n\nimport { Archive } from \"lucide-react\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Panel } from \"./panel.js\";\n\nexport function ArchivedAssetNotice() {\n const t = useT();\n return (\n <Panel className=\"flex items-start gap-3 px-4 py-3\">\n <Archive className=\"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground\" aria-hidden />\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-semibold\">{t(\"Permanently archived\")}</p>\n <p className=\"text-xs text-muted-foreground\">\n {t(\"This asset's record stays onchain with its owner, creator and history. It can no longer be transferred or sold.\")}\n </p>\n </div>\n </Panel>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUM;AARN,0BAAwB;AACxB,sBAAqB;AACrB,mBAAsB;AAEf,SAAS,sBAAsB;AACpC,QAAM,QAAI,sBAAK;AACf,SACE,6CAAC,sBAAM,WAAU,oCACf;AAAA,gDAAC,+BAAQ,WAAU,iDAAgD,eAAW,MAAC;AAAA,IAC/E,6CAAC,SAAI,WAAU,eACb;AAAA,kDAAC,OAAE,WAAU,yBAAyB,YAAE,sBAAsB,GAAE;AAAA,MAChE,4CAAC,OAAE,WAAU,iCACV,YAAE,iHAAiH,GACtH;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
@@ -2,9 +2,10 @@
2
2
  import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Archive } from "lucide-react";
4
4
  import { useT } from "../i18n/provider.js";
5
+ import { Panel } from "./panel.js";
5
6
  function ArchivedAssetNotice() {
6
7
  const t = useT();
7
- return /* @__PURE__ */ jsxs("div", { className: "flex items-start gap-3 rounded-xl border border-border bg-muted/30 px-4 py-3", children: [
8
+ return /* @__PURE__ */ jsxs(Panel, { className: "flex items-start gap-3 px-4 py-3", children: [
8
9
  /* @__PURE__ */ jsx(Archive, { className: "mt-0.5 h-4 w-4 shrink-0 text-muted-foreground", "aria-hidden": true }),
9
10
  /* @__PURE__ */ jsxs("div", { className: "space-y-0.5", children: [
10
11
  /* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: t("Permanently archived") }),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/archived-asset-notice.tsx"],"sourcesContent":["\"use client\";\n\nimport { Archive } from \"lucide-react\";\nimport { useT } from \"../i18n/provider.js\";\n\nexport function ArchivedAssetNotice() {\n const t = useT();\n return (\n <div className=\"flex items-start gap-3 rounded-xl border border-border bg-muted/30 px-4 py-3\">\n <Archive className=\"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground\" aria-hidden />\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-semibold\">{t(\"Permanently archived\")}</p>\n <p className=\"text-xs text-muted-foreground\">\n {t(\"This asset's record stays onchain with its owner, creator and history. It can no longer be transferred or sold.\")}\n </p>\n </div>\n </div>\n );\n}\n"],"mappings":";AASM,cACA,YADA;AAPN,SAAS,eAAe;AACxB,SAAS,YAAY;AAEd,SAAS,sBAAsB;AACpC,QAAM,IAAI,KAAK;AACf,SACE,qBAAC,SAAI,WAAU,gFACb;AAAA,wBAAC,WAAQ,WAAU,iDAAgD,eAAW,MAAC;AAAA,IAC/E,qBAAC,SAAI,WAAU,eACb;AAAA,0BAAC,OAAE,WAAU,yBAAyB,YAAE,sBAAsB,GAAE;AAAA,MAChE,oBAAC,OAAE,WAAU,iCACV,YAAE,iHAAiH,GACtH;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/archived-asset-notice.tsx"],"sourcesContent":["\"use client\";\n\nimport { Archive } from \"lucide-react\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Panel } from \"./panel.js\";\n\nexport function ArchivedAssetNotice() {\n const t = useT();\n return (\n <Panel className=\"flex items-start gap-3 px-4 py-3\">\n <Archive className=\"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground\" aria-hidden />\n <div className=\"space-y-0.5\">\n <p className=\"text-sm font-semibold\">{t(\"Permanently archived\")}</p>\n <p className=\"text-xs text-muted-foreground\">\n {t(\"This asset's record stays onchain with its owner, creator and history. It can no longer be transferred or sold.\")}\n </p>\n </div>\n </Panel>\n );\n}\n"],"mappings":";AAUM,cACA,YADA;AARN,SAAS,eAAe;AACxB,SAAS,YAAY;AACrB,SAAS,aAAa;AAEf,SAAS,sBAAsB;AACpC,QAAM,IAAI,KAAK;AACf,SACE,qBAAC,SAAM,WAAU,oCACf;AAAA,wBAAC,WAAQ,WAAU,iDAAgD,eAAW,MAAC;AAAA,IAC/E,qBAAC,SAAI,WAAU,eACb;AAAA,0BAAC,OAAE,WAAU,yBAAyB,YAAE,sBAAsB,GAAE;AAAA,MAChE,oBAAC,OAAE,WAAU,iCACV,YAAE,iHAAiH,GACtH;AAAA,OACF;AAAA,KACF;AAEJ;","names":[]}
@@ -31,6 +31,7 @@ var import_medialane_app = require("./medialane-app.js");
31
31
  var import_action_button = require("./action-button.js");
32
32
  var import_button = require("./button.js");
33
33
  var import_cn = require("../utils/cn.js");
34
+ var import_panel = require("./panel.js");
34
35
  function CompanionAppButton({ asset, variant = "button" }) {
35
36
  const { companion } = (0, import_medialane_app.useMedialaneApp)();
36
37
  if (!companion) return null;
@@ -52,7 +53,7 @@ function CompanionAppButton({ asset, variant = "button" }) {
52
53
  }
53
54
  );
54
55
  }
55
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { asChild: true, variant: "outline", className: "h-[46px] w-full rounded-[13px] bg-transparent font-semibold sm:w-auto sm:min-w-36", children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href, target: "_blank", rel: "noopener noreferrer", title: companion.description, children: [
56
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_button.Button, { asChild: true, variant: "ghost", className: (0, import_cn.cn)("h-[46px] w-full rounded-[13px] font-semibold sm:w-auto sm:min-w-36", import_panel.PANEL_INSET), children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("a", { href, target: "_blank", rel: "noopener noreferrer", title: companion.description, children: [
56
57
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Icon, { className: "h-4 w-4" }),
57
58
  companion.title
58
59
  ] }) });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-access-cards.tsx"],"sourcesContent":["\"use client\";\n\nimport { useT } from \"../i18n/provider.js\";\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 { Button } from \"./button.js\";\nimport { cn } from \"../utils/cn.js\";\n\nexport function CompanionAppButton({ asset, variant = \"button\" }: { asset: AssetRef; variant?: \"button\" | \"link\" }) {\n const { companion } = useMedialaneApp();\n if (!companion) return null;\n const Icon = companion.icon;\n const href = `${companion.origin}${assetHref(asset.chain.toUpperCase() as Chain, asset.contractAddress, asset.tokenId)}`;\n if (variant === \"link\") {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title={companion.description}\n className=\"inline-flex items-center gap-2 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground\"\n >\n <Icon className=\"h-4 w-4\" />\n {companion.title}\n </a>\n );\n }\n return (\n <Button asChild variant=\"outline\" className=\"h-[46px] w-full rounded-[13px] bg-transparent font-semibold sm:w-auto sm:min-w-36\">\n <a href={href} target=\"_blank\" rel=\"noopener noreferrer\" title={companion.description}>\n <Icon className=\"h-4 w-4\" />\n {companion.title}\n </a>\n </Button>\n );\n}\n\nexport function AssetAccessButtons({ asset, stacked = false }: { asset: AssetRef; stacked?: boolean }) {\n const t = useT();\n const { onRequireWallet, connectLabel = \"Sign in\" } = useMedialaneApp();\n return (\n <div className={cn(\"grid grid-cols-1 gap-2\", !stacked && \"sm:flex sm:flex-wrap\")}>\n <ActionButton action=\"buy\" icon={<Wallet className=\"h-4 w-4\" />} onClick={onRequireWallet} className={cn(\"w-full\", !stacked && \"sm:w-auto sm:min-w-36\")}>\n {t(connectLabel)}\n </ActionButton>\n <CompanionAppButton asset={asset} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBM;AAfN,sBAAqB;AACrB,iBAAsC;AACtC,0BAAuB;AACvB,2BAA+C;AAC/C,2BAA6B;AAC7B,oBAAuB;AACvB,gBAAmB;AAEZ,SAAS,mBAAmB,EAAE,OAAO,UAAU,SAAS,GAAqD;AAClH,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,MAAI,CAAC,UAAW,QAAO;AACvB,QAAM,OAAO,UAAU;AACvB,QAAM,OAAO,GAAG,UAAU,MAAM,OAAG,sBAAU,MAAM,MAAM,YAAY,GAAY,MAAM,iBAAiB,MAAM,OAAO,CAAC;AACtH,MAAI,YAAY,QAAQ;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,QAAO;AAAA,QACP,KAAI;AAAA,QACJ,OAAO,UAAU;AAAA,QACjB,WAAU;AAAA,QAEV;AAAA,sDAAC,QAAK,WAAU,WAAU;AAAA,UACzB,UAAU;AAAA;AAAA;AAAA,IACb;AAAA,EAEJ;AACA,SACE,4CAAC,wBAAO,SAAO,MAAC,SAAQ,WAAU,WAAU,qFAC1C,uDAAC,OAAE,MAAY,QAAO,UAAS,KAAI,uBAAsB,OAAO,UAAU,aACxE;AAAA,gDAAC,QAAK,WAAU,WAAU;AAAA,IACzB,UAAU;AAAA,KACb,GACF;AAEJ;AAEO,SAAS,mBAAmB,EAAE,OAAO,UAAU,MAAM,GAA2C;AACrG,QAAM,QAAI,sBAAK;AACf,QAAM,EAAE,iBAAiB,eAAe,UAAU,QAAI,sCAAgB;AACtE,SACE,6CAAC,SAAI,eAAW,cAAG,0BAA0B,CAAC,WAAW,sBAAsB,GAC7E;AAAA,gDAAC,qCAAa,QAAO,OAAM,MAAM,4CAAC,8BAAO,WAAU,WAAU,GAAI,SAAS,iBAAiB,eAAW,cAAG,UAAU,CAAC,WAAW,uBAAuB,GACnJ,YAAE,YAAY,GACjB;AAAA,IACA,4CAAC,sBAAmB,OAAc;AAAA,KACpC;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-access-cards.tsx"],"sourcesContent":["\"use client\";\n\nimport { useT } from \"../i18n/provider.js\";\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 { Button } from \"./button.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { PANEL_INSET } from \"./panel.js\";\n\nexport function CompanionAppButton({ asset, variant = \"button\" }: { asset: AssetRef; variant?: \"button\" | \"link\" }) {\n const { companion } = useMedialaneApp();\n if (!companion) return null;\n const Icon = companion.icon;\n const href = `${companion.origin}${assetHref(asset.chain.toUpperCase() as Chain, asset.contractAddress, asset.tokenId)}`;\n if (variant === \"link\") {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title={companion.description}\n className=\"inline-flex items-center gap-2 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground\"\n >\n <Icon className=\"h-4 w-4\" />\n {companion.title}\n </a>\n );\n }\n return (\n <Button asChild variant=\"ghost\" className={cn(\"h-[46px] w-full rounded-[13px] font-semibold sm:w-auto sm:min-w-36\", PANEL_INSET)}>\n <a href={href} target=\"_blank\" rel=\"noopener noreferrer\" title={companion.description}>\n <Icon className=\"h-4 w-4\" />\n {companion.title}\n </a>\n </Button>\n );\n}\n\nexport function AssetAccessButtons({ asset, stacked = false }: { asset: AssetRef; stacked?: boolean }) {\n const t = useT();\n const { onRequireWallet, connectLabel = \"Sign in\" } = useMedialaneApp();\n return (\n <div className={cn(\"grid grid-cols-1 gap-2\", !stacked && \"sm:flex sm:flex-wrap\")}>\n <ActionButton action=\"buy\" icon={<Wallet className=\"h-4 w-4\" />} onClick={onRequireWallet} className={cn(\"w-full\", !stacked && \"sm:w-auto sm:min-w-36\")}>\n {t(connectLabel)}\n </ActionButton>\n <CompanionAppButton asset={asset} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBM;AAhBN,sBAAqB;AACrB,iBAAsC;AACtC,0BAAuB;AACvB,2BAA+C;AAC/C,2BAA6B;AAC7B,oBAAuB;AACvB,gBAAmB;AACnB,mBAA4B;AAErB,SAAS,mBAAmB,EAAE,OAAO,UAAU,SAAS,GAAqD;AAClH,QAAM,EAAE,UAAU,QAAI,sCAAgB;AACtC,MAAI,CAAC,UAAW,QAAO;AACvB,QAAM,OAAO,UAAU;AACvB,QAAM,OAAO,GAAG,UAAU,MAAM,OAAG,sBAAU,MAAM,MAAM,YAAY,GAAY,MAAM,iBAAiB,MAAM,OAAO,CAAC;AACtH,MAAI,YAAY,QAAQ;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,QAAO;AAAA,QACP,KAAI;AAAA,QACJ,OAAO,UAAU;AAAA,QACjB,WAAU;AAAA,QAEV;AAAA,sDAAC,QAAK,WAAU,WAAU;AAAA,UACzB,UAAU;AAAA;AAAA;AAAA,IACb;AAAA,EAEJ;AACA,SACE,4CAAC,wBAAO,SAAO,MAAC,SAAQ,SAAQ,eAAW,cAAG,sEAAsE,wBAAW,GAC7H,uDAAC,OAAE,MAAY,QAAO,UAAS,KAAI,uBAAsB,OAAO,UAAU,aACxE;AAAA,gDAAC,QAAK,WAAU,WAAU;AAAA,IACzB,UAAU;AAAA,KACb,GACF;AAEJ;AAEO,SAAS,mBAAmB,EAAE,OAAO,UAAU,MAAM,GAA2C;AACrG,QAAM,QAAI,sBAAK;AACf,QAAM,EAAE,iBAAiB,eAAe,UAAU,QAAI,sCAAgB;AACtE,SACE,6CAAC,SAAI,eAAW,cAAG,0BAA0B,CAAC,WAAW,sBAAsB,GAC7E;AAAA,gDAAC,qCAAa,QAAO,OAAM,MAAM,4CAAC,8BAAO,WAAU,WAAU,GAAI,SAAS,iBAAiB,eAAW,cAAG,UAAU,CAAC,WAAW,uBAAuB,GACnJ,YAAE,YAAY,GACjB;AAAA,IACA,4CAAC,sBAAmB,OAAc;AAAA,KACpC;AAEJ;","names":[]}
@@ -7,6 +7,7 @@ import { useMedialaneApp } from "./medialane-app.js";
7
7
  import { ActionButton } from "./action-button.js";
8
8
  import { Button } from "./button.js";
9
9
  import { cn } from "../utils/cn.js";
10
+ import { PANEL_INSET } from "./panel.js";
10
11
  function CompanionAppButton({ asset, variant = "button" }) {
11
12
  const { companion } = useMedialaneApp();
12
13
  if (!companion) return null;
@@ -28,7 +29,7 @@ function CompanionAppButton({ asset, variant = "button" }) {
28
29
  }
29
30
  );
30
31
  }
31
- return /* @__PURE__ */ jsx(Button, { asChild: true, variant: "outline", className: "h-[46px] w-full rounded-[13px] bg-transparent font-semibold sm:w-auto sm:min-w-36", children: /* @__PURE__ */ jsxs("a", { href, target: "_blank", rel: "noopener noreferrer", title: companion.description, children: [
32
+ return /* @__PURE__ */ jsx(Button, { asChild: true, variant: "ghost", className: cn("h-[46px] w-full rounded-[13px] font-semibold sm:w-auto sm:min-w-36", PANEL_INSET), children: /* @__PURE__ */ jsxs("a", { href, target: "_blank", rel: "noopener noreferrer", title: companion.description, children: [
32
33
  /* @__PURE__ */ jsx(Icon, { className: "h-4 w-4" }),
33
34
  companion.title
34
35
  ] }) });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-access-cards.tsx"],"sourcesContent":["\"use client\";\n\nimport { useT } from \"../i18n/provider.js\";\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 { Button } from \"./button.js\";\nimport { cn } from \"../utils/cn.js\";\n\nexport function CompanionAppButton({ asset, variant = \"button\" }: { asset: AssetRef; variant?: \"button\" | \"link\" }) {\n const { companion } = useMedialaneApp();\n if (!companion) return null;\n const Icon = companion.icon;\n const href = `${companion.origin}${assetHref(asset.chain.toUpperCase() as Chain, asset.contractAddress, asset.tokenId)}`;\n if (variant === \"link\") {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title={companion.description}\n className=\"inline-flex items-center gap-2 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground\"\n >\n <Icon className=\"h-4 w-4\" />\n {companion.title}\n </a>\n );\n }\n return (\n <Button asChild variant=\"outline\" className=\"h-[46px] w-full rounded-[13px] bg-transparent font-semibold sm:w-auto sm:min-w-36\">\n <a href={href} target=\"_blank\" rel=\"noopener noreferrer\" title={companion.description}>\n <Icon className=\"h-4 w-4\" />\n {companion.title}\n </a>\n </Button>\n );\n}\n\nexport function AssetAccessButtons({ asset, stacked = false }: { asset: AssetRef; stacked?: boolean }) {\n const t = useT();\n const { onRequireWallet, connectLabel = \"Sign in\" } = useMedialaneApp();\n return (\n <div className={cn(\"grid grid-cols-1 gap-2\", !stacked && \"sm:flex sm:flex-wrap\")}>\n <ActionButton action=\"buy\" icon={<Wallet className=\"h-4 w-4\" />} onClick={onRequireWallet} className={cn(\"w-full\", !stacked && \"sm:w-auto sm:min-w-36\")}>\n {t(connectLabel)}\n </ActionButton>\n <CompanionAppButton asset={asset} />\n </div>\n );\n}\n"],"mappings":";AAiBM,SAOE,KAPF;AAfN,SAAS,YAAY;AACrB,SAAS,iBAA6B;AACtC,SAAS,cAAc;AACvB,SAAS,uBAAsC;AAC/C,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AACvB,SAAS,UAAU;AAEZ,SAAS,mBAAmB,EAAE,OAAO,UAAU,SAAS,GAAqD;AAClH,QAAM,EAAE,UAAU,IAAI,gBAAgB;AACtC,MAAI,CAAC,UAAW,QAAO;AACvB,QAAM,OAAO,UAAU;AACvB,QAAM,OAAO,GAAG,UAAU,MAAM,GAAG,UAAU,MAAM,MAAM,YAAY,GAAY,MAAM,iBAAiB,MAAM,OAAO,CAAC;AACtH,MAAI,YAAY,QAAQ;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,QAAO;AAAA,QACP,KAAI;AAAA,QACJ,OAAO,UAAU;AAAA,QACjB,WAAU;AAAA,QAEV;AAAA,8BAAC,QAAK,WAAU,WAAU;AAAA,UACzB,UAAU;AAAA;AAAA;AAAA,IACb;AAAA,EAEJ;AACA,SACE,oBAAC,UAAO,SAAO,MAAC,SAAQ,WAAU,WAAU,qFAC1C,+BAAC,OAAE,MAAY,QAAO,UAAS,KAAI,uBAAsB,OAAO,UAAU,aACxE;AAAA,wBAAC,QAAK,WAAU,WAAU;AAAA,IACzB,UAAU;AAAA,KACb,GACF;AAEJ;AAEO,SAAS,mBAAmB,EAAE,OAAO,UAAU,MAAM,GAA2C;AACrG,QAAM,IAAI,KAAK;AACf,QAAM,EAAE,iBAAiB,eAAe,UAAU,IAAI,gBAAgB;AACtE,SACE,qBAAC,SAAI,WAAW,GAAG,0BAA0B,CAAC,WAAW,sBAAsB,GAC7E;AAAA,wBAAC,gBAAa,QAAO,OAAM,MAAM,oBAAC,UAAO,WAAU,WAAU,GAAI,SAAS,iBAAiB,WAAW,GAAG,UAAU,CAAC,WAAW,uBAAuB,GACnJ,YAAE,YAAY,GACjB;AAAA,IACA,oBAAC,sBAAmB,OAAc;AAAA,KACpC;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-access-cards.tsx"],"sourcesContent":["\"use client\";\n\nimport { useT } from \"../i18n/provider.js\";\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 { Button } from \"./button.js\";\nimport { cn } from \"../utils/cn.js\";\nimport { PANEL_INSET } from \"./panel.js\";\n\nexport function CompanionAppButton({ asset, variant = \"button\" }: { asset: AssetRef; variant?: \"button\" | \"link\" }) {\n const { companion } = useMedialaneApp();\n if (!companion) return null;\n const Icon = companion.icon;\n const href = `${companion.origin}${assetHref(asset.chain.toUpperCase() as Chain, asset.contractAddress, asset.tokenId)}`;\n if (variant === \"link\") {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n title={companion.description}\n className=\"inline-flex items-center gap-2 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground\"\n >\n <Icon className=\"h-4 w-4\" />\n {companion.title}\n </a>\n );\n }\n return (\n <Button asChild variant=\"ghost\" className={cn(\"h-[46px] w-full rounded-[13px] font-semibold sm:w-auto sm:min-w-36\", PANEL_INSET)}>\n <a href={href} target=\"_blank\" rel=\"noopener noreferrer\" title={companion.description}>\n <Icon className=\"h-4 w-4\" />\n {companion.title}\n </a>\n </Button>\n );\n}\n\nexport function AssetAccessButtons({ asset, stacked = false }: { asset: AssetRef; stacked?: boolean }) {\n const t = useT();\n const { onRequireWallet, connectLabel = \"Sign in\" } = useMedialaneApp();\n return (\n <div className={cn(\"grid grid-cols-1 gap-2\", !stacked && \"sm:flex sm:flex-wrap\")}>\n <ActionButton action=\"buy\" icon={<Wallet className=\"h-4 w-4\" />} onClick={onRequireWallet} className={cn(\"w-full\", !stacked && \"sm:w-auto sm:min-w-36\")}>\n {t(connectLabel)}\n </ActionButton>\n <CompanionAppButton asset={asset} />\n </div>\n );\n}\n"],"mappings":";AAkBM,SAOE,KAPF;AAhBN,SAAS,YAAY;AACrB,SAAS,iBAA6B;AACtC,SAAS,cAAc;AACvB,SAAS,uBAAsC;AAC/C,SAAS,oBAAoB;AAC7B,SAAS,cAAc;AACvB,SAAS,UAAU;AACnB,SAAS,mBAAmB;AAErB,SAAS,mBAAmB,EAAE,OAAO,UAAU,SAAS,GAAqD;AAClH,QAAM,EAAE,UAAU,IAAI,gBAAgB;AACtC,MAAI,CAAC,UAAW,QAAO;AACvB,QAAM,OAAO,UAAU;AACvB,QAAM,OAAO,GAAG,UAAU,MAAM,GAAG,UAAU,MAAM,MAAM,YAAY,GAAY,MAAM,iBAAiB,MAAM,OAAO,CAAC;AACtH,MAAI,YAAY,QAAQ;AACtB,WACE;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA,QAAO;AAAA,QACP,KAAI;AAAA,QACJ,OAAO,UAAU;AAAA,QACjB,WAAU;AAAA,QAEV;AAAA,8BAAC,QAAK,WAAU,WAAU;AAAA,UACzB,UAAU;AAAA;AAAA;AAAA,IACb;AAAA,EAEJ;AACA,SACE,oBAAC,UAAO,SAAO,MAAC,SAAQ,SAAQ,WAAW,GAAG,sEAAsE,WAAW,GAC7H,+BAAC,OAAE,MAAY,QAAO,UAAS,KAAI,uBAAsB,OAAO,UAAU,aACxE;AAAA,wBAAC,QAAK,WAAU,WAAU;AAAA,IACzB,UAAU;AAAA,KACb,GACF;AAEJ;AAEO,SAAS,mBAAmB,EAAE,OAAO,UAAU,MAAM,GAA2C;AACrG,QAAM,IAAI,KAAK;AACf,QAAM,EAAE,iBAAiB,eAAe,UAAU,IAAI,gBAAgB;AACtE,SACE,qBAAC,SAAI,WAAW,GAAG,0BAA0B,CAAC,WAAW,sBAAsB,GAC7E;AAAA,wBAAC,gBAAa,QAAO,OAAM,MAAM,oBAAC,UAAO,WAAU,WAAU,GAAI,SAAS,iBAAiB,WAAW,GAAG,UAAU,CAAC,WAAW,uBAAuB,GACnJ,YAAE,YAAY,GACjB;AAAA,IACA,oBAAC,sBAAmB,OAAc;AAAA,KACpC;AAEJ;","names":[]}
@@ -39,6 +39,7 @@ var import_lucide_react = require("lucide-react");
39
39
  var import_currency_icon = require("./currency-icon.js");
40
40
  var import_format = require("../utils/format.js");
41
41
  var import_provider = require("../i18n/provider.js");
42
+ var import_panel = require("./panel.js");
42
43
  function AssetCollectionBar({
43
44
  collectionName,
44
45
  collectionImage,
@@ -54,9 +55,9 @@ function AssetCollectionBar({
54
55
  (t2) => String(t2.tokenId) !== String(currentTokenId)
55
56
  );
56
57
  const preview = others.slice(0, 4);
57
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "rounded-2xl bg-gradient-to-br from-muted/40 to-transparent overflow-hidden p-4 space-y-3", children: [
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_panel.Panel, { className: "overflow-hidden p-4 space-y-3", children: [
58
59
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_link.default, { href: collectionHref, className: "flex items-center gap-3 group min-w-0", children: [
59
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-11 w-11 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-brand-blue/20 to-brand-purple/20 ring-1 ring-border/30 group-hover:ring-border/60 transition-all", children: collectionImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: collectionImage, alt: "", fill: true, className: "object-cover", unoptimized: true }) : null }),
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative h-11 w-11 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-brand-blue/20 to-brand-purple/20", children: collectionImage ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_image.default, { src: collectionImage, alt: "", fill: true, className: "object-cover", unoptimized: true }) : null }),
60
61
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "min-w-0 flex-1", children: [
61
62
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-base font-bold leading-tight truncate group-hover:text-primary transition-colors", children: collectionName }),
62
63
  floor?.symbol ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", { className: "mt-0.5 flex items-center gap-1.5 text-xs text-muted-foreground", children: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-collection-bar.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { useT } from \"../i18n/provider.js\";\nexport interface AssetCollectionBarSibling {\n tokenId: string;\n\n image: string | null;\n}\n\nexport interface AssetCollectionBarProps {\n collectionName: string;\n collectionImage?: string | null;\n collectionHref: string;\n currentTokenId: string;\n siblingTokens: AssetCollectionBarSibling[];\n onNavigate: (tokenId: string) => void;\n floorPriceRaw?: string | null;\n}\n\nexport function AssetCollectionBar({\n collectionName,\n collectionImage,\n collectionHref,\n currentTokenId,\n siblingTokens,\n onNavigate,\n floorPriceRaw,\n}: AssetCollectionBarProps) {\n const t = useT();\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n\n const others = siblingTokens.filter(\n (t) => String(t.tokenId) !== String(currentTokenId)\n );\n const preview = others.slice(0, 4);\n\n return (\n <div className=\"rounded-2xl bg-gradient-to-br from-muted/40 to-transparent overflow-hidden p-4 space-y-3\">\n\n <Link href={collectionHref} className=\"flex items-center gap-3 group min-w-0\">\n <div className=\"relative h-11 w-11 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-brand-blue/20 to-brand-purple/20 ring-1 ring-border/30 group-hover:ring-border/60 transition-all\">\n {collectionImage ? (\n <Image src={collectionImage} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : null}\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-base font-bold leading-tight truncate group-hover:text-primary transition-colors\">\n {collectionName}\n </p>\n {floor?.symbol ? (\n <p className=\"mt-0.5 flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>{t(\"Floor\")}</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={11} amountClassName=\"font-semibold text-foreground\" />\n </p>\n ) : null}\n </div>\n <div className=\"shrink-0 h-8 w-8 rounded-xl bg-background/40 flex items-center justify-center text-muted-foreground group-hover:bg-background/70 group-hover:text-foreground transition-all\">\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </div>\n </Link>\n\n {preview.length > 0 && (\n <div className=\"grid grid-cols-4 gap-1.5\">\n {Array.from({ length: 4 }).map((_, i) => {\n const sibling = preview[i];\n if (!sibling) {\n return <div key={`empty-${i}`} className=\"aspect-square rounded-xl bg-muted/20\" />;\n }\n return (\n <button\n key={sibling.tokenId}\n type=\"button\"\n onClick={() => onNavigate(sibling.tokenId)}\n className=\"group relative aspect-square rounded-xl overflow-hidden transition-all duration-200 hover:scale-[1.02] active:scale-95\"\n >\n {sibling.image ? (\n <Image\n src={sibling.image}\n alt=\"\"\n fill\n className=\"object-cover transition-transform duration-300 group-hover:scale-105\"\n unoptimized\n />\n ) : (\n <div className=\"h-full w-full bg-muted\" />\n )}\n </button>\n );\n })}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA+CY;AA7CZ,mBAAkB;AAClB,kBAAiB;AACjB,0BAA2B;AAC3B,2BAA+B;AAC/B,oBAAkC;AAClC,sBAAqB;AAiBd,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA4B;AAC1B,QAAM,QAAI,sBAAK;AACf,QAAM,QAAQ,oBAAgB,iCAAkB,aAAa,IAAI;AAEjE,QAAM,SAAS,cAAc;AAAA,IAC3B,CAACA,OAAM,OAAOA,GAAE,OAAO,MAAM,OAAO,cAAc;AAAA,EACpD;AACA,QAAM,UAAU,OAAO,MAAM,GAAG,CAAC;AAEjC,SACE,6CAAC,SAAI,WAAU,4FAEb;AAAA,iDAAC,YAAAC,SAAA,EAAK,MAAM,gBAAgB,WAAU,yCACpC;AAAA,kDAAC,SAAI,WAAU,kLACZ,4BACC,4CAAC,aAAAC,SAAA,EAAM,KAAK,iBAAiB,KAAI,IAAG,MAAI,MAAC,WAAU,gBAAe,aAAW,MAAC,IAC5E,MACN;AAAA,MACA,6CAAC,SAAI,WAAU,kBACb;AAAA,oDAAC,OAAE,WAAU,yFACV,0BACH;AAAA,QACC,OAAO,SACN,6CAAC,OAAE,WAAU,kEACX;AAAA,sDAAC,UAAM,YAAE,OAAO,GAAE;AAAA,UAClB,4CAAC,uCAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,QAAQ,UAAU,IAAI,iBAAgB,iCAAgC;AAAA,WAC5H,IACE;AAAA,SACN;AAAA,MACA,4CAAC,SAAI,WAAU,+KACb,sDAAC,kCAAW,WAAU,eAAc,GACtC;AAAA,OACF;AAAA,IAEC,QAAQ,SAAS,KAChB,4CAAC,SAAI,WAAU,4BACZ,gBAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM;AACvC,YAAM,UAAU,QAAQ,CAAC;AACzB,UAAI,CAAC,SAAS;AACZ,eAAO,4CAAC,SAAuB,WAAU,0CAAxB,SAAS,CAAC,EAAqD;AAAA,MAClF;AACA,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,SAAS,MAAM,WAAW,QAAQ,OAAO;AAAA,UACzC,WAAU;AAAA,UAET,kBAAQ,QACP;AAAA,YAAC,aAAAA;AAAA,YAAA;AAAA,cACC,KAAK,QAAQ;AAAA,cACb,KAAI;AAAA,cACJ,MAAI;AAAA,cACJ,WAAU;AAAA,cACV,aAAW;AAAA;AAAA,UACb,IAEA,4CAAC,SAAI,WAAU,0BAAyB;AAAA;AAAA,QAdrC,QAAQ;AAAA,MAgBf;AAAA,IAEJ,CAAC,GACH;AAAA,KAEJ;AAEJ;","names":["t","Link","Image"]}
1
+ {"version":3,"sources":["../../src/components/asset-collection-bar.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Panel } from \"./panel.js\";\nexport interface AssetCollectionBarSibling {\n tokenId: string;\n\n image: string | null;\n}\n\nexport interface AssetCollectionBarProps {\n collectionName: string;\n collectionImage?: string | null;\n collectionHref: string;\n currentTokenId: string;\n siblingTokens: AssetCollectionBarSibling[];\n onNavigate: (tokenId: string) => void;\n floorPriceRaw?: string | null;\n}\n\nexport function AssetCollectionBar({\n collectionName,\n collectionImage,\n collectionHref,\n currentTokenId,\n siblingTokens,\n onNavigate,\n floorPriceRaw,\n}: AssetCollectionBarProps) {\n const t = useT();\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n\n const others = siblingTokens.filter(\n (t) => String(t.tokenId) !== String(currentTokenId)\n );\n const preview = others.slice(0, 4);\n\n return (\n <Panel className=\"overflow-hidden p-4 space-y-3\">\n\n <Link href={collectionHref} className=\"flex items-center gap-3 group min-w-0\">\n <div className=\"relative h-11 w-11 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-brand-blue/20 to-brand-purple/20\">\n {collectionImage ? (\n <Image src={collectionImage} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : null}\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-base font-bold leading-tight truncate group-hover:text-primary transition-colors\">\n {collectionName}\n </p>\n {floor?.symbol ? (\n <p className=\"mt-0.5 flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>{t(\"Floor\")}</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={11} amountClassName=\"font-semibold text-foreground\" />\n </p>\n ) : null}\n </div>\n <div className=\"shrink-0 h-8 w-8 rounded-xl bg-background/40 flex items-center justify-center text-muted-foreground group-hover:bg-background/70 group-hover:text-foreground transition-all\">\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </div>\n </Link>\n\n {preview.length > 0 && (\n <div className=\"grid grid-cols-4 gap-1.5\">\n {Array.from({ length: 4 }).map((_, i) => {\n const sibling = preview[i];\n if (!sibling) {\n return <div key={`empty-${i}`} className=\"aspect-square rounded-xl bg-muted/20\" />;\n }\n return (\n <button\n key={sibling.tokenId}\n type=\"button\"\n onClick={() => onNavigate(sibling.tokenId)}\n className=\"group relative aspect-square rounded-xl overflow-hidden transition-all duration-200 hover:scale-[1.02] active:scale-95\"\n >\n {sibling.image ? (\n <Image\n src={sibling.image}\n alt=\"\"\n fill\n className=\"object-cover transition-transform duration-300 group-hover:scale-105\"\n unoptimized\n />\n ) : (\n <div className=\"h-full w-full bg-muted\" />\n )}\n </button>\n );\n })}\n </div>\n )}\n </Panel>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgDY;AA9CZ,mBAAkB;AAClB,kBAAiB;AACjB,0BAA2B;AAC3B,2BAA+B;AAC/B,oBAAkC;AAClC,sBAAqB;AACrB,mBAAsB;AAiBf,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA4B;AAC1B,QAAM,QAAI,sBAAK;AACf,QAAM,QAAQ,oBAAgB,iCAAkB,aAAa,IAAI;AAEjE,QAAM,SAAS,cAAc;AAAA,IAC3B,CAACA,OAAM,OAAOA,GAAE,OAAO,MAAM,OAAO,cAAc;AAAA,EACpD;AACA,QAAM,UAAU,OAAO,MAAM,GAAG,CAAC;AAEjC,SACE,6CAAC,sBAAM,WAAU,iCAEf;AAAA,iDAAC,YAAAC,SAAA,EAAK,MAAM,gBAAgB,WAAU,yCACpC;AAAA,kDAAC,SAAI,WAAU,kHACZ,4BACC,4CAAC,aAAAC,SAAA,EAAM,KAAK,iBAAiB,KAAI,IAAG,MAAI,MAAC,WAAU,gBAAe,aAAW,MAAC,IAC5E,MACN;AAAA,MACA,6CAAC,SAAI,WAAU,kBACb;AAAA,oDAAC,OAAE,WAAU,yFACV,0BACH;AAAA,QACC,OAAO,SACN,6CAAC,OAAE,WAAU,kEACX;AAAA,sDAAC,UAAM,YAAE,OAAO,GAAE;AAAA,UAClB,4CAAC,uCAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,QAAQ,UAAU,IAAI,iBAAgB,iCAAgC;AAAA,WAC5H,IACE;AAAA,SACN;AAAA,MACA,4CAAC,SAAI,WAAU,+KACb,sDAAC,kCAAW,WAAU,eAAc,GACtC;AAAA,OACF;AAAA,IAEC,QAAQ,SAAS,KAChB,4CAAC,SAAI,WAAU,4BACZ,gBAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM;AACvC,YAAM,UAAU,QAAQ,CAAC;AACzB,UAAI,CAAC,SAAS;AACZ,eAAO,4CAAC,SAAuB,WAAU,0CAAxB,SAAS,CAAC,EAAqD;AAAA,MAClF;AACA,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,SAAS,MAAM,WAAW,QAAQ,OAAO;AAAA,UACzC,WAAU;AAAA,UAET,kBAAQ,QACP;AAAA,YAAC,aAAAA;AAAA,YAAA;AAAA,cACC,KAAK,QAAQ;AAAA,cACb,KAAI;AAAA,cACJ,MAAI;AAAA,cACJ,WAAU;AAAA,cACV,aAAW;AAAA;AAAA,UACb,IAEA,4CAAC,SAAI,WAAU,0BAAyB;AAAA;AAAA,QAdrC,QAAQ;AAAA,MAgBf;AAAA,IAEJ,CAAC,GACH;AAAA,KAEJ;AAEJ;","names":["t","Link","Image"]}
@@ -6,6 +6,7 @@ import { ArrowRight } from "lucide-react";
6
6
  import { CurrencyAmount } from "./currency-icon.js";
7
7
  import { parsePriceDisplay } from "../utils/format.js";
8
8
  import { useT } from "../i18n/provider.js";
9
+ import { Panel } from "./panel.js";
9
10
  function AssetCollectionBar({
10
11
  collectionName,
11
12
  collectionImage,
@@ -21,9 +22,9 @@ function AssetCollectionBar({
21
22
  (t2) => String(t2.tokenId) !== String(currentTokenId)
22
23
  );
23
24
  const preview = others.slice(0, 4);
24
- return /* @__PURE__ */ jsxs("div", { className: "rounded-2xl bg-gradient-to-br from-muted/40 to-transparent overflow-hidden p-4 space-y-3", children: [
25
+ return /* @__PURE__ */ jsxs(Panel, { className: "overflow-hidden p-4 space-y-3", children: [
25
26
  /* @__PURE__ */ jsxs(Link, { href: collectionHref, className: "flex items-center gap-3 group min-w-0", children: [
26
- /* @__PURE__ */ jsx("div", { className: "relative h-11 w-11 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-brand-blue/20 to-brand-purple/20 ring-1 ring-border/30 group-hover:ring-border/60 transition-all", children: collectionImage ? /* @__PURE__ */ jsx(Image, { src: collectionImage, alt: "", fill: true, className: "object-cover", unoptimized: true }) : null }),
27
+ /* @__PURE__ */ jsx("div", { className: "relative h-11 w-11 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-brand-blue/20 to-brand-purple/20", children: collectionImage ? /* @__PURE__ */ jsx(Image, { src: collectionImage, alt: "", fill: true, className: "object-cover", unoptimized: true }) : null }),
27
28
  /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
28
29
  /* @__PURE__ */ jsx("p", { className: "text-base font-bold leading-tight truncate group-hover:text-primary transition-colors", children: collectionName }),
29
30
  floor?.symbol ? /* @__PURE__ */ jsxs("p", { className: "mt-0.5 flex items-center gap-1.5 text-xs text-muted-foreground", children: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-collection-bar.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { useT } from \"../i18n/provider.js\";\nexport interface AssetCollectionBarSibling {\n tokenId: string;\n\n image: string | null;\n}\n\nexport interface AssetCollectionBarProps {\n collectionName: string;\n collectionImage?: string | null;\n collectionHref: string;\n currentTokenId: string;\n siblingTokens: AssetCollectionBarSibling[];\n onNavigate: (tokenId: string) => void;\n floorPriceRaw?: string | null;\n}\n\nexport function AssetCollectionBar({\n collectionName,\n collectionImage,\n collectionHref,\n currentTokenId,\n siblingTokens,\n onNavigate,\n floorPriceRaw,\n}: AssetCollectionBarProps) {\n const t = useT();\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n\n const others = siblingTokens.filter(\n (t) => String(t.tokenId) !== String(currentTokenId)\n );\n const preview = others.slice(0, 4);\n\n return (\n <div className=\"rounded-2xl bg-gradient-to-br from-muted/40 to-transparent overflow-hidden p-4 space-y-3\">\n\n <Link href={collectionHref} className=\"flex items-center gap-3 group min-w-0\">\n <div className=\"relative h-11 w-11 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-brand-blue/20 to-brand-purple/20 ring-1 ring-border/30 group-hover:ring-border/60 transition-all\">\n {collectionImage ? (\n <Image src={collectionImage} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : null}\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-base font-bold leading-tight truncate group-hover:text-primary transition-colors\">\n {collectionName}\n </p>\n {floor?.symbol ? (\n <p className=\"mt-0.5 flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>{t(\"Floor\")}</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={11} amountClassName=\"font-semibold text-foreground\" />\n </p>\n ) : null}\n </div>\n <div className=\"shrink-0 h-8 w-8 rounded-xl bg-background/40 flex items-center justify-center text-muted-foreground group-hover:bg-background/70 group-hover:text-foreground transition-all\">\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </div>\n </Link>\n\n {preview.length > 0 && (\n <div className=\"grid grid-cols-4 gap-1.5\">\n {Array.from({ length: 4 }).map((_, i) => {\n const sibling = preview[i];\n if (!sibling) {\n return <div key={`empty-${i}`} className=\"aspect-square rounded-xl bg-muted/20\" />;\n }\n return (\n <button\n key={sibling.tokenId}\n type=\"button\"\n onClick={() => onNavigate(sibling.tokenId)}\n className=\"group relative aspect-square rounded-xl overflow-hidden transition-all duration-200 hover:scale-[1.02] active:scale-95\"\n >\n {sibling.image ? (\n <Image\n src={sibling.image}\n alt=\"\"\n fill\n className=\"object-cover transition-transform duration-300 group-hover:scale-105\"\n unoptimized\n />\n ) : (\n <div className=\"h-full w-full bg-muted\" />\n )}\n </button>\n );\n })}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";AA+CY,cAQA,YARA;AA7CZ,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,SAAS,YAAY;AAiBd,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA4B;AAC1B,QAAM,IAAI,KAAK;AACf,QAAM,QAAQ,gBAAgB,kBAAkB,aAAa,IAAI;AAEjE,QAAM,SAAS,cAAc;AAAA,IAC3B,CAACA,OAAM,OAAOA,GAAE,OAAO,MAAM,OAAO,cAAc;AAAA,EACpD;AACA,QAAM,UAAU,OAAO,MAAM,GAAG,CAAC;AAEjC,SACE,qBAAC,SAAI,WAAU,4FAEb;AAAA,yBAAC,QAAK,MAAM,gBAAgB,WAAU,yCACpC;AAAA,0BAAC,SAAI,WAAU,kLACZ,4BACC,oBAAC,SAAM,KAAK,iBAAiB,KAAI,IAAG,MAAI,MAAC,WAAU,gBAAe,aAAW,MAAC,IAC5E,MACN;AAAA,MACA,qBAAC,SAAI,WAAU,kBACb;AAAA,4BAAC,OAAE,WAAU,yFACV,0BACH;AAAA,QACC,OAAO,SACN,qBAAC,OAAE,WAAU,kEACX;AAAA,8BAAC,UAAM,YAAE,OAAO,GAAE;AAAA,UAClB,oBAAC,kBAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,QAAQ,UAAU,IAAI,iBAAgB,iCAAgC;AAAA,WAC5H,IACE;AAAA,SACN;AAAA,MACA,oBAAC,SAAI,WAAU,+KACb,8BAAC,cAAW,WAAU,eAAc,GACtC;AAAA,OACF;AAAA,IAEC,QAAQ,SAAS,KAChB,oBAAC,SAAI,WAAU,4BACZ,gBAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM;AACvC,YAAM,UAAU,QAAQ,CAAC;AACzB,UAAI,CAAC,SAAS;AACZ,eAAO,oBAAC,SAAuB,WAAU,0CAAxB,SAAS,CAAC,EAAqD;AAAA,MAClF;AACA,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,SAAS,MAAM,WAAW,QAAQ,OAAO;AAAA,UACzC,WAAU;AAAA,UAET,kBAAQ,QACP;AAAA,YAAC;AAAA;AAAA,cACC,KAAK,QAAQ;AAAA,cACb,KAAI;AAAA,cACJ,MAAI;AAAA,cACJ,WAAU;AAAA,cACV,aAAW;AAAA;AAAA,UACb,IAEA,oBAAC,SAAI,WAAU,0BAAyB;AAAA;AAAA,QAdrC,QAAQ;AAAA,MAgBf;AAAA,IAEJ,CAAC,GACH;AAAA,KAEJ;AAEJ;","names":["t"]}
1
+ {"version":3,"sources":["../../src/components/asset-collection-bar.tsx"],"sourcesContent":["\"use client\";\n\nimport Image from \"./image.js\";\nimport Link from \"./link.js\";\nimport { ArrowRight } from \"lucide-react\";\nimport { CurrencyAmount } from \"./currency-icon.js\";\nimport { parsePriceDisplay } from \"../utils/format.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Panel } from \"./panel.js\";\nexport interface AssetCollectionBarSibling {\n tokenId: string;\n\n image: string | null;\n}\n\nexport interface AssetCollectionBarProps {\n collectionName: string;\n collectionImage?: string | null;\n collectionHref: string;\n currentTokenId: string;\n siblingTokens: AssetCollectionBarSibling[];\n onNavigate: (tokenId: string) => void;\n floorPriceRaw?: string | null;\n}\n\nexport function AssetCollectionBar({\n collectionName,\n collectionImage,\n collectionHref,\n currentTokenId,\n siblingTokens,\n onNavigate,\n floorPriceRaw,\n}: AssetCollectionBarProps) {\n const t = useT();\n const floor = floorPriceRaw ? parsePriceDisplay(floorPriceRaw) : null;\n\n const others = siblingTokens.filter(\n (t) => String(t.tokenId) !== String(currentTokenId)\n );\n const preview = others.slice(0, 4);\n\n return (\n <Panel className=\"overflow-hidden p-4 space-y-3\">\n\n <Link href={collectionHref} className=\"flex items-center gap-3 group min-w-0\">\n <div className=\"relative h-11 w-11 rounded-xl overflow-hidden shrink-0 bg-gradient-to-br from-brand-blue/20 to-brand-purple/20\">\n {collectionImage ? (\n <Image src={collectionImage} alt=\"\" fill className=\"object-cover\" unoptimized />\n ) : null}\n </div>\n <div className=\"min-w-0 flex-1\">\n <p className=\"text-base font-bold leading-tight truncate group-hover:text-primary transition-colors\">\n {collectionName}\n </p>\n {floor?.symbol ? (\n <p className=\"mt-0.5 flex items-center gap-1.5 text-xs text-muted-foreground\">\n <span>{t(\"Floor\")}</span>\n <CurrencyAmount amount={floor.numStr} symbol={floor.symbol} iconSize={11} amountClassName=\"font-semibold text-foreground\" />\n </p>\n ) : null}\n </div>\n <div className=\"shrink-0 h-8 w-8 rounded-xl bg-background/40 flex items-center justify-center text-muted-foreground group-hover:bg-background/70 group-hover:text-foreground transition-all\">\n <ArrowRight className=\"h-3.5 w-3.5\" />\n </div>\n </Link>\n\n {preview.length > 0 && (\n <div className=\"grid grid-cols-4 gap-1.5\">\n {Array.from({ length: 4 }).map((_, i) => {\n const sibling = preview[i];\n if (!sibling) {\n return <div key={`empty-${i}`} className=\"aspect-square rounded-xl bg-muted/20\" />;\n }\n return (\n <button\n key={sibling.tokenId}\n type=\"button\"\n onClick={() => onNavigate(sibling.tokenId)}\n className=\"group relative aspect-square rounded-xl overflow-hidden transition-all duration-200 hover:scale-[1.02] active:scale-95\"\n >\n {sibling.image ? (\n <Image\n src={sibling.image}\n alt=\"\"\n fill\n className=\"object-cover transition-transform duration-300 group-hover:scale-105\"\n unoptimized\n />\n ) : (\n <div className=\"h-full w-full bg-muted\" />\n )}\n </button>\n );\n })}\n </div>\n )}\n </Panel>\n );\n}\n"],"mappings":";AAgDY,cAQA,YARA;AA9CZ,OAAO,WAAW;AAClB,OAAO,UAAU;AACjB,SAAS,kBAAkB;AAC3B,SAAS,sBAAsB;AAC/B,SAAS,yBAAyB;AAClC,SAAS,YAAY;AACrB,SAAS,aAAa;AAiBf,SAAS,mBAAmB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAA4B;AAC1B,QAAM,IAAI,KAAK;AACf,QAAM,QAAQ,gBAAgB,kBAAkB,aAAa,IAAI;AAEjE,QAAM,SAAS,cAAc;AAAA,IAC3B,CAACA,OAAM,OAAOA,GAAE,OAAO,MAAM,OAAO,cAAc;AAAA,EACpD;AACA,QAAM,UAAU,OAAO,MAAM,GAAG,CAAC;AAEjC,SACE,qBAAC,SAAM,WAAU,iCAEf;AAAA,yBAAC,QAAK,MAAM,gBAAgB,WAAU,yCACpC;AAAA,0BAAC,SAAI,WAAU,kHACZ,4BACC,oBAAC,SAAM,KAAK,iBAAiB,KAAI,IAAG,MAAI,MAAC,WAAU,gBAAe,aAAW,MAAC,IAC5E,MACN;AAAA,MACA,qBAAC,SAAI,WAAU,kBACb;AAAA,4BAAC,OAAE,WAAU,yFACV,0BACH;AAAA,QACC,OAAO,SACN,qBAAC,OAAE,WAAU,kEACX;AAAA,8BAAC,UAAM,YAAE,OAAO,GAAE;AAAA,UAClB,oBAAC,kBAAe,QAAQ,MAAM,QAAQ,QAAQ,MAAM,QAAQ,UAAU,IAAI,iBAAgB,iCAAgC;AAAA,WAC5H,IACE;AAAA,SACN;AAAA,MACA,oBAAC,SAAI,WAAU,+KACb,8BAAC,cAAW,WAAU,eAAc,GACtC;AAAA,OACF;AAAA,IAEC,QAAQ,SAAS,KAChB,oBAAC,SAAI,WAAU,4BACZ,gBAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,CAAC,GAAG,MAAM;AACvC,YAAM,UAAU,QAAQ,CAAC;AACzB,UAAI,CAAC,SAAS;AACZ,eAAO,oBAAC,SAAuB,WAAU,0CAAxB,SAAS,CAAC,EAAqD;AAAA,MAClF;AACA,aACE;AAAA,QAAC;AAAA;AAAA,UAEC,MAAK;AAAA,UACL,SAAS,MAAM,WAAW,QAAQ,OAAO;AAAA,UACzC,WAAU;AAAA,UAET,kBAAQ,QACP;AAAA,YAAC;AAAA;AAAA,cACC,KAAK,QAAQ;AAAA,cACb,KAAI;AAAA,cACJ,MAAI;AAAA,cACJ,WAAU;AAAA,cACV,aAAW;AAAA;AAAA,UACb,IAEA,oBAAC,SAAI,WAAU,0BAAyB;AAAA;AAAA,QAdrC,QAAQ;AAAA,MAgBf;AAAA,IAEJ,CAAC,GACH;AAAA,KAEJ;AAEJ;","names":["t"]}
@@ -26,6 +26,7 @@ var import_jsx_runtime = require("react/jsx-runtime");
26
26
  var import_lucide_react = require("lucide-react");
27
27
  var import_license_summary = require("../utils/license-summary.js");
28
28
  var import_provider = require("../i18n/provider.js");
29
+ var import_panel = require("./panel.js");
29
30
  function AssetLicenseSummary({ attributes }) {
30
31
  const t = (0, import_provider.useT)();
31
32
  const summary = (0, import_license_summary.licenseSummary)(attributes);
@@ -60,17 +61,10 @@ function AssetLicenseSummary({ attributes }) {
60
61
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2.5", children: [
61
62
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-2xs font-medium text-muted-foreground", children: t("License") }),
62
63
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-base font-medium leading-relaxed text-foreground/90", children: summary }),
63
- pills.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-2 pt-0.5", children: pills.map((pill) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
64
- "span",
65
- {
66
- className: "inline-flex items-center gap-1.5 rounded-full border border-border/60 bg-muted/30 px-3 py-1 text-xs font-medium text-foreground/80",
67
- children: [
68
- pill.icon,
69
- pill.label
70
- ]
71
- },
64
+ pills.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "flex flex-wrap gap-2 pt-0.5", children: pills.map((pill) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_panel.Pill, { children: [
65
+ pill.icon,
72
66
  pill.label
73
- )) }) : null
67
+ ] }, pill.label)) }) : null
74
68
  ] });
75
69
  }
76
70
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-license-summary.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Bot, DollarSign, GitBranch, Globe } from \"lucide-react\";\nimport { licenseSummary } from \"../utils/license-summary.js\";\nimport { useT } from \"../i18n/provider.js\";\n\ntype AssetAttribute = { trait_type?: string; value?: string };\n\nexport function AssetLicenseSummary({ attributes }: { attributes: AssetAttribute[] }) {\n const t = useT();\n const summary = licenseSummary(attributes);\n if (!summary) return null;\n\n const get = (key: string) =>\n attributes.find((a) => a.trait_type?.toLowerCase() === key.toLowerCase())?.value;\n\n const commercialRaw = get(\"Commercial Use\");\n const derivatives = (get(\"Derivatives\") ?? \"\").toLowerCase();\n const ai = (get(\"AI Policy\") ?? get(\"AI & Data Mining\") ?? \"\").toLowerCase();\n const territory = get(\"Territory\");\n\n const pills: { icon: ReactNode; label: string }[] = [];\n if (commercialRaw) {\n pills.push({\n icon: <DollarSign className=\"h-3.5 w-3.5\" />,\n label: commercialRaw.toLowerCase() === \"yes\" ? \"Commercial use\" : \"Non-commercial\",\n });\n }\n if (derivatives) {\n pills.push({\n icon: <GitBranch className=\"h-3.5 w-3.5\" />,\n label: derivatives === \"not allowed\" ? \"No remixing\" : \"Remixable\",\n });\n }\n if (ai) {\n pills.push({\n icon: <Bot className=\"h-3.5 w-3.5\" />,\n label: ai.includes(\"not\") ? \"No AI training\" : \"AI allowed\",\n });\n }\n if (territory) {\n pills.push({ icon: <Globe className=\"h-3.5 w-3.5\" />, label: territory });\n }\n\n return (\n <div className=\"space-y-2.5\">\n <p className=\"text-2xs font-medium text-muted-foreground\">{t(\"License\")}</p>\n <p className=\"text-base font-medium leading-relaxed text-foreground/90\">{summary}</p>\n {pills.length > 0 ? (\n <div className=\"flex flex-wrap gap-2 pt-0.5\">\n {pills.map((pill) => (\n <span\n key={pill.label}\n className=\"inline-flex items-center gap-1.5 rounded-full border border-border/60 bg-muted/30 px-3 py-1 text-xs font-medium text-foreground/80\"\n >\n {pill.icon}\n {pill.label}\n </span>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBY;AAtBZ,0BAAkD;AAClD,6BAA+B;AAC/B,sBAAqB;AAId,SAAS,oBAAoB,EAAE,WAAW,GAAqC;AACpF,QAAM,QAAI,sBAAK;AACf,QAAM,cAAU,uCAAe,UAAU;AACzC,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM,MAAM,CAAC,QACX,WAAW,KAAK,CAAC,MAAM,EAAE,YAAY,YAAY,MAAM,IAAI,YAAY,CAAC,GAAG;AAE7E,QAAM,gBAAgB,IAAI,gBAAgB;AAC1C,QAAM,eAAe,IAAI,aAAa,KAAK,IAAI,YAAY;AAC3D,QAAM,MAAM,IAAI,WAAW,KAAK,IAAI,kBAAkB,KAAK,IAAI,YAAY;AAC3E,QAAM,YAAY,IAAI,WAAW;AAEjC,QAAM,QAA8C,CAAC;AACrD,MAAI,eAAe;AACjB,UAAM,KAAK;AAAA,MACT,MAAM,4CAAC,kCAAW,WAAU,eAAc;AAAA,MAC1C,OAAO,cAAc,YAAY,MAAM,QAAQ,mBAAmB;AAAA,IACpE,CAAC;AAAA,EACH;AACA,MAAI,aAAa;AACf,UAAM,KAAK;AAAA,MACT,MAAM,4CAAC,iCAAU,WAAU,eAAc;AAAA,MACzC,OAAO,gBAAgB,gBAAgB,gBAAgB;AAAA,IACzD,CAAC;AAAA,EACH;AACA,MAAI,IAAI;AACN,UAAM,KAAK;AAAA,MACT,MAAM,4CAAC,2BAAI,WAAU,eAAc;AAAA,MACnC,OAAO,GAAG,SAAS,KAAK,IAAI,mBAAmB;AAAA,IACjD,CAAC;AAAA,EACH;AACA,MAAI,WAAW;AACb,UAAM,KAAK,EAAE,MAAM,4CAAC,6BAAM,WAAU,eAAc,GAAI,OAAO,UAAU,CAAC;AAAA,EAC1E;AAEA,SACE,6CAAC,SAAI,WAAU,eACb;AAAA,gDAAC,OAAE,WAAU,8CAA8C,YAAE,SAAS,GAAE;AAAA,IACxE,4CAAC,OAAE,WAAU,4DAA4D,mBAAQ;AAAA,IAChF,MAAM,SAAS,IACd,4CAAC,SAAI,WAAU,+BACZ,gBAAM,IAAI,CAAC,SACV;AAAA,MAAC;AAAA;AAAA,QAEC,WAAU;AAAA,QAET;AAAA,eAAK;AAAA,UACL,KAAK;AAAA;AAAA;AAAA,MAJD,KAAK;AAAA,IAKZ,CACD,GACH,IACE;AAAA,KACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-license-summary.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Bot, DollarSign, GitBranch, Globe } from \"lucide-react\";\nimport { licenseSummary } from \"../utils/license-summary.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Pill } from \"./panel.js\";\n\ntype AssetAttribute = { trait_type?: string; value?: string };\n\nexport function AssetLicenseSummary({ attributes }: { attributes: AssetAttribute[] }) {\n const t = useT();\n const summary = licenseSummary(attributes);\n if (!summary) return null;\n\n const get = (key: string) =>\n attributes.find((a) => a.trait_type?.toLowerCase() === key.toLowerCase())?.value;\n\n const commercialRaw = get(\"Commercial Use\");\n const derivatives = (get(\"Derivatives\") ?? \"\").toLowerCase();\n const ai = (get(\"AI Policy\") ?? get(\"AI & Data Mining\") ?? \"\").toLowerCase();\n const territory = get(\"Territory\");\n\n const pills: { icon: ReactNode; label: string }[] = [];\n if (commercialRaw) {\n pills.push({\n icon: <DollarSign className=\"h-3.5 w-3.5\" />,\n label: commercialRaw.toLowerCase() === \"yes\" ? \"Commercial use\" : \"Non-commercial\",\n });\n }\n if (derivatives) {\n pills.push({\n icon: <GitBranch className=\"h-3.5 w-3.5\" />,\n label: derivatives === \"not allowed\" ? \"No remixing\" : \"Remixable\",\n });\n }\n if (ai) {\n pills.push({\n icon: <Bot className=\"h-3.5 w-3.5\" />,\n label: ai.includes(\"not\") ? \"No AI training\" : \"AI allowed\",\n });\n }\n if (territory) {\n pills.push({ icon: <Globe className=\"h-3.5 w-3.5\" />, label: territory });\n }\n\n return (\n <div className=\"space-y-2.5\">\n <p className=\"text-2xs font-medium text-muted-foreground\">{t(\"License\")}</p>\n <p className=\"text-base font-medium leading-relaxed text-foreground/90\">{summary}</p>\n {pills.length > 0 ? (\n <div className=\"flex flex-wrap gap-2 pt-0.5\">\n {pills.map((pill) => (\n <Pill key={pill.label}>\n {pill.icon}\n {pill.label}\n </Pill>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA0BY;AAvBZ,0BAAkD;AAClD,6BAA+B;AAC/B,sBAAqB;AACrB,mBAAqB;AAId,SAAS,oBAAoB,EAAE,WAAW,GAAqC;AACpF,QAAM,QAAI,sBAAK;AACf,QAAM,cAAU,uCAAe,UAAU;AACzC,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM,MAAM,CAAC,QACX,WAAW,KAAK,CAAC,MAAM,EAAE,YAAY,YAAY,MAAM,IAAI,YAAY,CAAC,GAAG;AAE7E,QAAM,gBAAgB,IAAI,gBAAgB;AAC1C,QAAM,eAAe,IAAI,aAAa,KAAK,IAAI,YAAY;AAC3D,QAAM,MAAM,IAAI,WAAW,KAAK,IAAI,kBAAkB,KAAK,IAAI,YAAY;AAC3E,QAAM,YAAY,IAAI,WAAW;AAEjC,QAAM,QAA8C,CAAC;AACrD,MAAI,eAAe;AACjB,UAAM,KAAK;AAAA,MACT,MAAM,4CAAC,kCAAW,WAAU,eAAc;AAAA,MAC1C,OAAO,cAAc,YAAY,MAAM,QAAQ,mBAAmB;AAAA,IACpE,CAAC;AAAA,EACH;AACA,MAAI,aAAa;AACf,UAAM,KAAK;AAAA,MACT,MAAM,4CAAC,iCAAU,WAAU,eAAc;AAAA,MACzC,OAAO,gBAAgB,gBAAgB,gBAAgB;AAAA,IACzD,CAAC;AAAA,EACH;AACA,MAAI,IAAI;AACN,UAAM,KAAK;AAAA,MACT,MAAM,4CAAC,2BAAI,WAAU,eAAc;AAAA,MACnC,OAAO,GAAG,SAAS,KAAK,IAAI,mBAAmB;AAAA,IACjD,CAAC;AAAA,EACH;AACA,MAAI,WAAW;AACb,UAAM,KAAK,EAAE,MAAM,4CAAC,6BAAM,WAAU,eAAc,GAAI,OAAO,UAAU,CAAC;AAAA,EAC1E;AAEA,SACE,6CAAC,SAAI,WAAU,eACb;AAAA,gDAAC,OAAE,WAAU,8CAA8C,YAAE,SAAS,GAAE;AAAA,IACxE,4CAAC,OAAE,WAAU,4DAA4D,mBAAQ;AAAA,IAChF,MAAM,SAAS,IACd,4CAAC,SAAI,WAAU,+BACZ,gBAAM,IAAI,CAAC,SACV,6CAAC,qBACE;AAAA,WAAK;AAAA,MACL,KAAK;AAAA,SAFG,KAAK,KAGhB,CACD,GACH,IACE;AAAA,KACN;AAEJ;","names":[]}
@@ -3,6 +3,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
3
3
  import { Bot, DollarSign, GitBranch, Globe } from "lucide-react";
4
4
  import { licenseSummary } from "../utils/license-summary.js";
5
5
  import { useT } from "../i18n/provider.js";
6
+ import { Pill } from "./panel.js";
6
7
  function AssetLicenseSummary({ attributes }) {
7
8
  const t = useT();
8
9
  const summary = licenseSummary(attributes);
@@ -37,17 +38,10 @@ function AssetLicenseSummary({ attributes }) {
37
38
  return /* @__PURE__ */ jsxs("div", { className: "space-y-2.5", children: [
38
39
  /* @__PURE__ */ jsx("p", { className: "text-2xs font-medium text-muted-foreground", children: t("License") }),
39
40
  /* @__PURE__ */ jsx("p", { className: "text-base font-medium leading-relaxed text-foreground/90", children: summary }),
40
- pills.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 pt-0.5", children: pills.map((pill) => /* @__PURE__ */ jsxs(
41
- "span",
42
- {
43
- className: "inline-flex items-center gap-1.5 rounded-full border border-border/60 bg-muted/30 px-3 py-1 text-xs font-medium text-foreground/80",
44
- children: [
45
- pill.icon,
46
- pill.label
47
- ]
48
- },
41
+ pills.length > 0 ? /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-2 pt-0.5", children: pills.map((pill) => /* @__PURE__ */ jsxs(Pill, { children: [
42
+ pill.icon,
49
43
  pill.label
50
- )) }) : null
44
+ ] }, pill.label)) }) : null
51
45
  ] });
52
46
  }
53
47
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/components/asset-license-summary.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Bot, DollarSign, GitBranch, Globe } from \"lucide-react\";\nimport { licenseSummary } from \"../utils/license-summary.js\";\nimport { useT } from \"../i18n/provider.js\";\n\ntype AssetAttribute = { trait_type?: string; value?: string };\n\nexport function AssetLicenseSummary({ attributes }: { attributes: AssetAttribute[] }) {\n const t = useT();\n const summary = licenseSummary(attributes);\n if (!summary) return null;\n\n const get = (key: string) =>\n attributes.find((a) => a.trait_type?.toLowerCase() === key.toLowerCase())?.value;\n\n const commercialRaw = get(\"Commercial Use\");\n const derivatives = (get(\"Derivatives\") ?? \"\").toLowerCase();\n const ai = (get(\"AI Policy\") ?? get(\"AI & Data Mining\") ?? \"\").toLowerCase();\n const territory = get(\"Territory\");\n\n const pills: { icon: ReactNode; label: string }[] = [];\n if (commercialRaw) {\n pills.push({\n icon: <DollarSign className=\"h-3.5 w-3.5\" />,\n label: commercialRaw.toLowerCase() === \"yes\" ? \"Commercial use\" : \"Non-commercial\",\n });\n }\n if (derivatives) {\n pills.push({\n icon: <GitBranch className=\"h-3.5 w-3.5\" />,\n label: derivatives === \"not allowed\" ? \"No remixing\" : \"Remixable\",\n });\n }\n if (ai) {\n pills.push({\n icon: <Bot className=\"h-3.5 w-3.5\" />,\n label: ai.includes(\"not\") ? \"No AI training\" : \"AI allowed\",\n });\n }\n if (territory) {\n pills.push({ icon: <Globe className=\"h-3.5 w-3.5\" />, label: territory });\n }\n\n return (\n <div className=\"space-y-2.5\">\n <p className=\"text-2xs font-medium text-muted-foreground\">{t(\"License\")}</p>\n <p className=\"text-base font-medium leading-relaxed text-foreground/90\">{summary}</p>\n {pills.length > 0 ? (\n <div className=\"flex flex-wrap gap-2 pt-0.5\">\n {pills.map((pill) => (\n <span\n key={pill.label}\n className=\"inline-flex items-center gap-1.5 rounded-full border border-border/60 bg-muted/30 px-3 py-1 text-xs font-medium text-foreground/80\"\n >\n {pill.icon}\n {pill.label}\n </span>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":";AAyBY,cA2BA,YA3BA;AAtBZ,SAAS,KAAK,YAAY,WAAW,aAAa;AAClD,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AAId,SAAS,oBAAoB,EAAE,WAAW,GAAqC;AACpF,QAAM,IAAI,KAAK;AACf,QAAM,UAAU,eAAe,UAAU;AACzC,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM,MAAM,CAAC,QACX,WAAW,KAAK,CAAC,MAAM,EAAE,YAAY,YAAY,MAAM,IAAI,YAAY,CAAC,GAAG;AAE7E,QAAM,gBAAgB,IAAI,gBAAgB;AAC1C,QAAM,eAAe,IAAI,aAAa,KAAK,IAAI,YAAY;AAC3D,QAAM,MAAM,IAAI,WAAW,KAAK,IAAI,kBAAkB,KAAK,IAAI,YAAY;AAC3E,QAAM,YAAY,IAAI,WAAW;AAEjC,QAAM,QAA8C,CAAC;AACrD,MAAI,eAAe;AACjB,UAAM,KAAK;AAAA,MACT,MAAM,oBAAC,cAAW,WAAU,eAAc;AAAA,MAC1C,OAAO,cAAc,YAAY,MAAM,QAAQ,mBAAmB;AAAA,IACpE,CAAC;AAAA,EACH;AACA,MAAI,aAAa;AACf,UAAM,KAAK;AAAA,MACT,MAAM,oBAAC,aAAU,WAAU,eAAc;AAAA,MACzC,OAAO,gBAAgB,gBAAgB,gBAAgB;AAAA,IACzD,CAAC;AAAA,EACH;AACA,MAAI,IAAI;AACN,UAAM,KAAK;AAAA,MACT,MAAM,oBAAC,OAAI,WAAU,eAAc;AAAA,MACnC,OAAO,GAAG,SAAS,KAAK,IAAI,mBAAmB;AAAA,IACjD,CAAC;AAAA,EACH;AACA,MAAI,WAAW;AACb,UAAM,KAAK,EAAE,MAAM,oBAAC,SAAM,WAAU,eAAc,GAAI,OAAO,UAAU,CAAC;AAAA,EAC1E;AAEA,SACE,qBAAC,SAAI,WAAU,eACb;AAAA,wBAAC,OAAE,WAAU,8CAA8C,YAAE,SAAS,GAAE;AAAA,IACxE,oBAAC,OAAE,WAAU,4DAA4D,mBAAQ;AAAA,IAChF,MAAM,SAAS,IACd,oBAAC,SAAI,WAAU,+BACZ,gBAAM,IAAI,CAAC,SACV;AAAA,MAAC;AAAA;AAAA,QAEC,WAAU;AAAA,QAET;AAAA,eAAK;AAAA,UACL,KAAK;AAAA;AAAA;AAAA,MAJD,KAAK;AAAA,IAKZ,CACD,GACH,IACE;AAAA,KACN;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../src/components/asset-license-summary.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { Bot, DollarSign, GitBranch, Globe } from \"lucide-react\";\nimport { licenseSummary } from \"../utils/license-summary.js\";\nimport { useT } from \"../i18n/provider.js\";\nimport { Pill } from \"./panel.js\";\n\ntype AssetAttribute = { trait_type?: string; value?: string };\n\nexport function AssetLicenseSummary({ attributes }: { attributes: AssetAttribute[] }) {\n const t = useT();\n const summary = licenseSummary(attributes);\n if (!summary) return null;\n\n const get = (key: string) =>\n attributes.find((a) => a.trait_type?.toLowerCase() === key.toLowerCase())?.value;\n\n const commercialRaw = get(\"Commercial Use\");\n const derivatives = (get(\"Derivatives\") ?? \"\").toLowerCase();\n const ai = (get(\"AI Policy\") ?? get(\"AI & Data Mining\") ?? \"\").toLowerCase();\n const territory = get(\"Territory\");\n\n const pills: { icon: ReactNode; label: string }[] = [];\n if (commercialRaw) {\n pills.push({\n icon: <DollarSign className=\"h-3.5 w-3.5\" />,\n label: commercialRaw.toLowerCase() === \"yes\" ? \"Commercial use\" : \"Non-commercial\",\n });\n }\n if (derivatives) {\n pills.push({\n icon: <GitBranch className=\"h-3.5 w-3.5\" />,\n label: derivatives === \"not allowed\" ? \"No remixing\" : \"Remixable\",\n });\n }\n if (ai) {\n pills.push({\n icon: <Bot className=\"h-3.5 w-3.5\" />,\n label: ai.includes(\"not\") ? \"No AI training\" : \"AI allowed\",\n });\n }\n if (territory) {\n pills.push({ icon: <Globe className=\"h-3.5 w-3.5\" />, label: territory });\n }\n\n return (\n <div className=\"space-y-2.5\">\n <p className=\"text-2xs font-medium text-muted-foreground\">{t(\"License\")}</p>\n <p className=\"text-base font-medium leading-relaxed text-foreground/90\">{summary}</p>\n {pills.length > 0 ? (\n <div className=\"flex flex-wrap gap-2 pt-0.5\">\n {pills.map((pill) => (\n <Pill key={pill.label}>\n {pill.icon}\n {pill.label}\n </Pill>\n ))}\n </div>\n ) : null}\n </div>\n );\n}\n"],"mappings":";AA0BY,cA2BA,YA3BA;AAvBZ,SAAS,KAAK,YAAY,WAAW,aAAa;AAClD,SAAS,sBAAsB;AAC/B,SAAS,YAAY;AACrB,SAAS,YAAY;AAId,SAAS,oBAAoB,EAAE,WAAW,GAAqC;AACpF,QAAM,IAAI,KAAK;AACf,QAAM,UAAU,eAAe,UAAU;AACzC,MAAI,CAAC,QAAS,QAAO;AAErB,QAAM,MAAM,CAAC,QACX,WAAW,KAAK,CAAC,MAAM,EAAE,YAAY,YAAY,MAAM,IAAI,YAAY,CAAC,GAAG;AAE7E,QAAM,gBAAgB,IAAI,gBAAgB;AAC1C,QAAM,eAAe,IAAI,aAAa,KAAK,IAAI,YAAY;AAC3D,QAAM,MAAM,IAAI,WAAW,KAAK,IAAI,kBAAkB,KAAK,IAAI,YAAY;AAC3E,QAAM,YAAY,IAAI,WAAW;AAEjC,QAAM,QAA8C,CAAC;AACrD,MAAI,eAAe;AACjB,UAAM,KAAK;AAAA,MACT,MAAM,oBAAC,cAAW,WAAU,eAAc;AAAA,MAC1C,OAAO,cAAc,YAAY,MAAM,QAAQ,mBAAmB;AAAA,IACpE,CAAC;AAAA,EACH;AACA,MAAI,aAAa;AACf,UAAM,KAAK;AAAA,MACT,MAAM,oBAAC,aAAU,WAAU,eAAc;AAAA,MACzC,OAAO,gBAAgB,gBAAgB,gBAAgB;AAAA,IACzD,CAAC;AAAA,EACH;AACA,MAAI,IAAI;AACN,UAAM,KAAK;AAAA,MACT,MAAM,oBAAC,OAAI,WAAU,eAAc;AAAA,MACnC,OAAO,GAAG,SAAS,KAAK,IAAI,mBAAmB;AAAA,IACjD,CAAC;AAAA,EACH;AACA,MAAI,WAAW;AACb,UAAM,KAAK,EAAE,MAAM,oBAAC,SAAM,WAAU,eAAc,GAAI,OAAO,UAAU,CAAC;AAAA,EAC1E;AAEA,SACE,qBAAC,SAAI,WAAU,eACb;AAAA,wBAAC,OAAE,WAAU,8CAA8C,YAAE,SAAS,GAAE;AAAA,IACxE,oBAAC,OAAE,WAAU,4DAA4D,mBAAQ;AAAA,IAChF,MAAM,SAAS,IACd,oBAAC,SAAI,WAAU,+BACZ,gBAAM,IAAI,CAAC,SACV,qBAAC,QACE;AAAA,WAAK;AAAA,MACL,KAAK;AAAA,SAFG,KAAK,KAGhB,CACD,GACH,IACE;AAAA,KACN;AAEJ;","names":[]}