@medialane/ui 0.116.0 → 0.118.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.
- package/dist/components/dual-price.cjs +64 -16
- package/dist/components/dual-price.cjs.map +1 -1
- package/dist/components/dual-price.d.cts +24 -23
- package/dist/components/dual-price.d.ts +24 -23
- package/dist/components/dual-price.js +64 -16
- package/dist/components/dual-price.js.map +1 -1
- package/package.json +1 -1
|
@@ -37,15 +37,41 @@ function CoinChip({ symbol, size }) {
|
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
|
+
function FiatChip({ size }) {
|
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
42
|
+
"span",
|
|
43
|
+
{
|
|
44
|
+
className: "grid shrink-0 place-items-center rounded-full bg-foreground/[0.06] font-extrabold leading-none text-foreground/80",
|
|
45
|
+
style: { width: size + 10, height: size + 10, fontSize: size },
|
|
46
|
+
children: "$"
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
function stripDollarSign(usdValue) {
|
|
51
|
+
return usdValue.replace("$", "");
|
|
52
|
+
}
|
|
40
53
|
const DISPLAY_FACE = "font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums";
|
|
41
54
|
const DUAL_PRICE_SCALES = {
|
|
42
|
-
/** Full-width hero contexts: AssetMarketplacePanel's main price.
|
|
43
|
-
|
|
44
|
-
hero: { fiat: "text-4xl", crypto: "text-2xl", chip: 16, stableChip: 13, divider: "h-7", showCurrencyLabel: true },
|
|
55
|
+
/** Full-width hero contexts: AssetMarketplacePanel's main price. */
|
|
56
|
+
hero: { amount: "text-3xl", chip: 18, stableChip: 14, divider: "h-7", showLabel: true },
|
|
45
57
|
/** Card contexts: ListingCard's full variant — denser, the coin icon
|
|
46
58
|
* already conveys the currency, a text label would be redundant. */
|
|
47
|
-
card: {
|
|
59
|
+
card: { amount: "text-base", chip: 13, stableChip: 10, divider: "h-4", showLabel: false }
|
|
48
60
|
};
|
|
61
|
+
function PriceUnit({
|
|
62
|
+
chip,
|
|
63
|
+
amount,
|
|
64
|
+
label,
|
|
65
|
+
amountClassName
|
|
66
|
+
}) {
|
|
67
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
68
|
+
chip,
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "flex items-baseline gap-1.5", children: [
|
|
70
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: amountClassName, children: amount }),
|
|
71
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-semibold text-muted-foreground/70", children: label })
|
|
72
|
+
] })
|
|
73
|
+
] });
|
|
74
|
+
}
|
|
49
75
|
function DualPrice({
|
|
50
76
|
amountFormatted,
|
|
51
77
|
currency,
|
|
@@ -56,24 +82,45 @@ function DualPrice({
|
|
|
56
82
|
if (!amountFormatted) return null;
|
|
57
83
|
const s = DUAL_PRICE_SCALES[scale];
|
|
58
84
|
const cryptoDisplay = (0, import_format.formatDisplayPrice)(amountFormatted);
|
|
85
|
+
const amountClass = `${DISPLAY_FACE} ${s.amount}`;
|
|
59
86
|
if (!usdValue) {
|
|
60
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className:
|
|
61
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
62
|
-
|
|
87
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
88
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
89
|
+
PriceUnit,
|
|
90
|
+
{
|
|
91
|
+
chip: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CoinChip, { symbol: currency, size: s.chip }),
|
|
92
|
+
amount: cryptoDisplay,
|
|
93
|
+
label: s.showLabel ? currency ?? void 0 : void 0,
|
|
94
|
+
amountClassName: amountClass
|
|
95
|
+
}
|
|
96
|
+
),
|
|
63
97
|
trailing && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-0.5", children: trailing })
|
|
64
98
|
] });
|
|
65
99
|
}
|
|
66
100
|
const stable = (0, import_format.isStableCurrency)(currency);
|
|
67
101
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-center gap-2.5", children: [
|
|
68
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
102
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
103
|
+
PriceUnit,
|
|
104
|
+
{
|
|
105
|
+
chip: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(FiatChip, { size: s.chip }),
|
|
106
|
+
amount: stripDollarSign(usdValue),
|
|
107
|
+
label: s.showLabel ? "USD" : void 0,
|
|
108
|
+
amountClassName: amountClass
|
|
109
|
+
}
|
|
110
|
+
),
|
|
69
111
|
!stable && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `${s.divider} w-px bg-border/60 shrink-0` }),
|
|
70
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
71
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CoinChip, { symbol: currency, size:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
112
|
+
stable ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
113
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(CoinChip, { symbol: currency, size: s.stableChip }),
|
|
114
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "text-sm font-semibold text-muted-foreground", children: currency })
|
|
115
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
116
|
+
PriceUnit,
|
|
117
|
+
{
|
|
118
|
+
chip: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CoinChip, { symbol: currency, size: s.chip }),
|
|
119
|
+
amount: cryptoDisplay,
|
|
120
|
+
label: s.showLabel ? currency ?? void 0 : void 0,
|
|
121
|
+
amountClassName: amountClass
|
|
122
|
+
}
|
|
123
|
+
),
|
|
77
124
|
trailing && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ml-0.5", children: trailing })
|
|
78
125
|
] });
|
|
79
126
|
}
|
|
@@ -101,7 +148,8 @@ function PriceChipContent({
|
|
|
101
148
|
}
|
|
102
149
|
const t = CHIP_TONES[tone];
|
|
103
150
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
104
|
-
usdValue,
|
|
151
|
+
stripDollarSign(usdValue),
|
|
152
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: `font-semibold ${t.text}`, children: "USD" }),
|
|
105
153
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: t.dot, children: "\xB7" }),
|
|
106
154
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: `inline-flex items-center gap-1 font-semibold ${t.text}`, children: [
|
|
107
155
|
currency && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_currency_icon.CurrencyIcon, { symbol: currency, size: 12 }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/dual-price.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.js\";\n\n/** Currency icon in the soft circular chip used throughout the wallet UI —\n * reads as a coin, not a stray glyph floating next to text. */\nexport function CoinChip({ symbol, size }: { symbol: string | null | undefined; size: number }) {\n return (\n <span\n className=\"grid shrink-0 place-items-center rounded-full bg-foreground/[0.06]\"\n style={{ width: size + 10, height: size + 10 }}\n >\n <CurrencyIcon symbol={symbol ?? \"\"} size={size} />\n </span>\n );\n}\n\nconst DISPLAY_FACE = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\nconst DUAL_PRICE_SCALES = {\n /** Full-width hero contexts: AssetMarketplacePanel's main price. Has room\n * to spell out the currency (\"0.07 ETH\"), not just imply it via icon. */\n hero: { fiat: \"text-4xl\", crypto: \"text-2xl\", chip: 16, stableChip: 13, divider: \"h-7\", showCurrencyLabel: true },\n /** Card contexts: ListingCard's full variant — denser, the coin icon\n * already conveys the currency, a text label would be redundant. */\n card: { fiat: \"text-lg\", crypto: \"text-sm\", chip: 11, stableChip: 9, divider: \"h-4\", showCurrencyLabel: false },\n} as const;\n\n/**\n * Equal-weight dual price: fiat and the on-chain currency shown as peers,\n * not primary/afterthought — this platform's audience spans non-crypto\n * newcomers who read fiat and crypto-native buyers who read the token\n * amount. Both use the brand display face at a real step-down in scale so\n * the pairing reads as \"two related numbers,\" not one dominant + one\n * caption. Falls back to crypto-only when no USD rate is available. When\n * the currency is itself a USD-pegged stablecoin, the crypto amount\n * collapses to a small currency badge — showing \"$12.00\" beside \"12.00\n * USDC\" would just be the same number twice.\n */\nexport function DualPrice({\n amountFormatted,\n currency,\n usdValue,\n scale,\n trailing,\n}: {\n amountFormatted: string | null | undefined;\n currency: string | null | undefined;\n usdValue?: string | null;\n scale: keyof typeof DUAL_PRICE_SCALES;\n trailing?: ReactNode;\n}) {\n if (!amountFormatted) return null;\n const s = DUAL_PRICE_SCALES[scale];\n const cryptoDisplay = formatDisplayPrice(amountFormatted);\n\n if (!usdValue) {\n return (\n <div className={`flex items-center gap-2.5 ${DISPLAY_FACE} ${s.fiat}`}>\n <CoinChip symbol={currency} size={s.chip} />\n {cryptoDisplay}\n {trailing && <span className=\"ml-0.5\">{trailing}</span>}\n </div>\n );\n }\n\n const stable = isStableCurrency(currency);\n return (\n <div className=\"flex items-center gap-2.5\">\n <span className={`${DISPLAY_FACE} ${s.fiat}`}>{usdValue}</span>\n {!stable && <span className={`${s.divider} w-px bg-border/60 shrink-0`} />}\n <span className=\"inline-flex items-center gap-1.5\">\n <CoinChip symbol={currency} size={stable ? s.stableChip : s.chip} />\n {stable ? (\n <span className=\"text-sm font-semibold text-muted-foreground\">{currency}</span>\n ) : s.showCurrencyLabel ? (\n <span className=\"flex items-baseline gap-1.5\">\n <span className={`${DISPLAY_FACE} ${s.crypto} text-foreground/90`}>{cryptoDisplay}</span>\n <span className=\"text-sm font-semibold text-muted-foreground/70\">{currency}</span>\n </span>\n ) : (\n <span className={`${DISPLAY_FACE} ${s.crypto} text-foreground/90`}>{cryptoDisplay}</span>\n )}\n </span>\n {trailing && <span className=\"ml-0.5\">{trailing}</span>}\n </div>\n );\n}\n\nconst CHIP_TONES = {\n /** Full-bleed image overlays (AssetCard) — fixed dark glass, guaranteed\n * readable regardless of the artwork or the viewer's theme. */\n \"overlay-dark\": { dot: \"text-white/30\", text: \"text-white/65\" },\n /** Theme-aware card backgrounds (TokenCard). */\n card: { dot: \"text-muted-foreground/50\", text: \"text-muted-foreground\" },\n} as const;\n\n/**\n * Overlay/pill price content — fiat leads, crypto trails dimmer, middot-\n * separated; stablecoins collapse to fiat + symbol alone. Renders only the\n * inner fragment: callers own their own pill container (background, blur,\n * border, padding), which intentionally differs between hosts (see\n * `tone`) rather than being forced into one visual treatment.\n */\nexport function PriceChipContent({\n amountFormatted,\n currency,\n usdValue,\n tone,\n}: {\n amountFormatted: string | null | undefined;\n currency: string | null | undefined;\n usdValue?: string | null;\n tone: keyof typeof CHIP_TONES;\n}) {\n if (!amountFormatted) return null;\n const cryptoDisplay = formatDisplayPrice(amountFormatted);\n const stable = isStableCurrency(currency);\n\n if (!usdValue) {\n return (\n <>\n {currency && <CurrencyIcon symbol={currency} size={13} />}\n {cryptoDisplay}\n </>\n );\n }\n\n const t = CHIP_TONES[tone];\n return (\n <>\n {usdValue}\n <span className={t.dot}>·</span>\n <span className={`inline-flex items-center gap-1 font-semibold ${t.text}`}>\n {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AAA,MACtD,SAAS,WAAW;AAAA,OACvB;AAAA,KACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/dual-price.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.js\";\n\n/** Currency icon in the soft circular chip used throughout the wallet UI —\n * reads as a coin, not a stray glyph floating next to text. */\nexport function CoinChip({ symbol, size }: { symbol: string | null | undefined; size: number }) {\n return (\n <span\n className=\"grid shrink-0 place-items-center rounded-full bg-foreground/[0.06]\"\n style={{ width: size + 10, height: size + 10 }}\n >\n <CurrencyIcon symbol={symbol ?? \"\"} size={size} />\n </span>\n );\n}\n\n/** Same circular chip as CoinChip, for fiat. Sized 1:1 with the crypto\n * icon (fontSize === size, not a fraction of it) so the \"$\" reads with\n * the same visual weight as the coin icon sitting next to it — a smaller,\n * thinner glyph in an identically-sized circle looked like an afterthought\n * next to a solid icon, even though the circles measured the same. */\nfunction FiatChip({ size }: { size: number }) {\n return (\n <span\n className=\"grid shrink-0 place-items-center rounded-full bg-foreground/[0.06] font-extrabold leading-none text-foreground/80\"\n style={{ width: size + 10, height: size + 10, fontSize: size }}\n >\n $\n </span>\n );\n}\n\n/** usdValue arrives pre-formatted (\"$13.14\", \"<$0.01\") — the chip already\n * carries the \"$\", so strip it from the number to avoid showing it twice. */\nfunction stripDollarSign(usdValue: string): string {\n return usdValue.replace(\"$\", \"\");\n}\n\nconst DISPLAY_FACE = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\nconst DUAL_PRICE_SCALES = {\n /** Full-width hero contexts: AssetMarketplacePanel's main price. */\n hero: { amount: \"text-3xl\", chip: 18, stableChip: 14, divider: \"h-7\", showLabel: true },\n /** Card contexts: ListingCard's full variant — denser, the coin icon\n * already conveys the currency, a text label would be redundant. */\n card: { amount: \"text-base\", chip: 13, stableChip: 10, divider: \"h-4\", showLabel: false },\n} as const;\n\n/**\n * One currency's [chip] [amount] [optional code label] unit. Fiat and\n * crypto both render through this exact function — the previous version\n * had two separately-hand-coded branches (one baseline-aligned, one\n * center-aligned; one full-opacity, one dimmed) that drifted out of sync\n * with each other. Routing both through one function makes that class of\n * bug structurally impossible: there is only one place font, size,\n * opacity, and alignment for a price unit can be defined.\n */\nfunction PriceUnit({\n chip,\n amount,\n label,\n amountClassName,\n}: {\n chip: ReactNode;\n amount: string;\n label?: string;\n amountClassName: string;\n}) {\n return (\n <span className=\"inline-flex items-center gap-1.5\">\n {chip}\n <span className=\"flex items-baseline gap-1.5\">\n <span className={amountClassName}>{amount}</span>\n {label && <span className=\"text-sm font-semibold text-muted-foreground/70\">{label}</span>}\n </span>\n </span>\n );\n}\n\n/**\n * Equal-weight dual price: fiat and the on-chain currency shown as true\n * peers — same font, same size, same icon treatment, same label\n * alignment — not one dominant number with a secondary afterthought.\n * This platform's audience spans non-crypto newcomers who read fiat and\n * crypto-native buyers who read the token amount; neither should look\n * like the \"real\" price and the other a footnote. Falls back to\n * crypto-only when no USD rate is available. When the currency is itself\n * a USD-pegged stablecoin, the crypto side collapses to a chip + code\n * badge — showing \"13.14 USD\" beside \"13.14 USDC\" would just be the same\n * number twice.\n */\nexport function DualPrice({\n amountFormatted,\n currency,\n usdValue,\n scale,\n trailing,\n}: {\n amountFormatted: string | null | undefined;\n currency: string | null | undefined;\n usdValue?: string | null;\n scale: keyof typeof DUAL_PRICE_SCALES;\n trailing?: ReactNode;\n}) {\n if (!amountFormatted) return null;\n const s = DUAL_PRICE_SCALES[scale];\n const cryptoDisplay = formatDisplayPrice(amountFormatted);\n const amountClass = `${DISPLAY_FACE} ${s.amount}`;\n\n if (!usdValue) {\n return (\n <div className=\"flex items-center gap-2.5\">\n <PriceUnit\n chip={<CoinChip symbol={currency} size={s.chip} />}\n amount={cryptoDisplay}\n label={s.showLabel ? (currency ?? undefined) : undefined}\n amountClassName={amountClass}\n />\n {trailing && <span className=\"ml-0.5\">{trailing}</span>}\n </div>\n );\n }\n\n const stable = isStableCurrency(currency);\n return (\n <div className=\"flex items-center gap-2.5\">\n <PriceUnit\n chip={<FiatChip size={s.chip} />}\n amount={stripDollarSign(usdValue)}\n label={s.showLabel ? \"USD\" : undefined}\n amountClassName={amountClass}\n />\n {!stable && <span className={`${s.divider} w-px bg-border/60 shrink-0`} />}\n {stable ? (\n <span className=\"inline-flex items-center gap-1.5\">\n <CoinChip symbol={currency} size={s.stableChip} />\n <span className=\"text-sm font-semibold text-muted-foreground\">{currency}</span>\n </span>\n ) : (\n <PriceUnit\n chip={<CoinChip symbol={currency} size={s.chip} />}\n amount={cryptoDisplay}\n label={s.showLabel ? (currency ?? undefined) : undefined}\n amountClassName={amountClass}\n />\n )}\n {trailing && <span className=\"ml-0.5\">{trailing}</span>}\n </div>\n );\n}\n\nconst CHIP_TONES = {\n /** Full-bleed image overlays (AssetCard) — fixed dark glass, guaranteed\n * readable regardless of the artwork or the viewer's theme. */\n \"overlay-dark\": { dot: \"text-white/30\", text: \"text-white/65\" },\n /** Theme-aware card backgrounds (TokenCard). */\n card: { dot: \"text-muted-foreground/50\", text: \"text-muted-foreground\" },\n} as const;\n\n/**\n * Overlay/pill price content — fiat leads, crypto trails, middot-\n * separated; stablecoins collapse to fiat + symbol alone. Renders only the\n * inner fragment: callers own their own pill container (background, blur,\n * border, padding), which intentionally differs between hosts (see\n * `tone`) rather than being forced into one visual treatment. Smaller\n * scale than DualPrice (compact artwork overlay), so no fiat/crypto icon\n * chips here — the middot + dimmer trailing color is what marks the\n * crypto side as secondary in this tighter context.\n */\nexport function PriceChipContent({\n amountFormatted,\n currency,\n usdValue,\n tone,\n}: {\n amountFormatted: string | null | undefined;\n currency: string | null | undefined;\n usdValue?: string | null;\n tone: keyof typeof CHIP_TONES;\n}) {\n if (!amountFormatted) return null;\n const cryptoDisplay = formatDisplayPrice(amountFormatted);\n const stable = isStableCurrency(currency);\n\n if (!usdValue) {\n return (\n <>\n {currency && <CurrencyIcon symbol={currency} size={13} />}\n {cryptoDisplay}\n </>\n );\n }\n\n const t = CHIP_TONES[tone];\n return (\n <>\n {stripDollarSign(usdValue)}\n <span className={`font-semibold ${t.text}`}>USD</span>\n <span className={t.dot}>·</span>\n <span className={`inline-flex items-center gap-1 font-semibold ${t.text}`}>\n {currency && <CurrencyIcon symbol={currency} size={12} />}\n {stable ? currency : cryptoDisplay}\n </span>\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAcM;AAXN,2BAA6B;AAC7B,oBAAqD;AAI9C,SAAS,SAAS,EAAE,QAAQ,KAAK,GAAwD;AAC9F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,OAAO,IAAI,QAAQ,OAAO,GAAG;AAAA,MAE7C,sDAAC,qCAAa,QAAQ,UAAU,IAAI,MAAY;AAAA;AAAA,EAClD;AAEJ;AAOA,SAAS,SAAS,EAAE,KAAK,GAAqB;AAC5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,OAAO,IAAI,QAAQ,OAAO,IAAI,UAAU,KAAK;AAAA,MAC9D;AAAA;AAAA,EAED;AAEJ;AAIA,SAAS,gBAAgB,UAA0B;AACjD,SAAO,SAAS,QAAQ,KAAK,EAAE;AACjC;AAEA,MAAM,eAAe;AAErB,MAAM,oBAAoB;AAAA;AAAA,EAExB,MAAM,EAAE,QAAQ,YAAY,MAAM,IAAI,YAAY,IAAI,SAAS,OAAO,WAAW,KAAK;AAAA;AAAA;AAAA,EAGtF,MAAM,EAAE,QAAQ,aAAa,MAAM,IAAI,YAAY,IAAI,SAAS,OAAO,WAAW,MAAM;AAC1F;AAWA,SAAS,UAAU;AAAA,EACjB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKG;AACD,SACE,6CAAC,UAAK,WAAU,oCACb;AAAA;AAAA,I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AS,QAAQ,UAAU,MAAM,EAAE,MAAM;AAAA,QAChD,QAAQ;AAAA,QACR,OAAO,EAAE,YAAa,YAAY,SAAa;AAAA,QAC/C,iBAAiB;AAAA;AAAA,IACnB;AAAA,IAED,YAAY,4CAAC,UAAK,WAAU,UAAU,oBAAS;AAAA,KAClD;AAEJ;AAEA,MAAM,aAAa;AAAA;AAAA;AAAA,EAGjB,gBAAgB,EAAE,KAAK,iBAAiB,MAAM,gBAAgB;AAAA;AAAA,EAE9D,MAAM,EAAE,KAAK,4BAA4B,MAAM,wBAAwB;AACzE;AAYO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKG;AACD,MAAI,CAAC,gBAAiB,QAAO;AAC7B,QAAM,oBAAgB,kCAAmB,eAAe;AACxD,QAAM,aAAS,gCAAiB,QAAQ;AAExC,MAAI,CAAC,UAAU;AACb,WACE,4EACG;AAAA,kBAAY,4CAAC,qCAAa,QAAQ,UAAU,MAAM,IAAI;AAAA,MACtD;AAAA,OACH;AAAA,EAEJ;AAEA,QAAM,IAAI,WAAW,IAAI;AACzB,SACE,4EACG;AAAA,oBAAgB,QAAQ;AAAA,IACzB,4CAAC,UAAK,WAAW,iBAAiB,EAAE,IAAI,IAAI,iBAAG;AAAA,IAC/C,4CAAC,UAAK,WAAW,EAAE,KAAK,kBAAC;AAAA,IACzB,6CAAC,UAAK,WAAW,gDAAgD,EAAE,IAAI,IACpE;AAAA,kBAAY,4CAAC,qCAAa,QAAQ,UAAU,MAAM,IAAI;AAAA,MACtD,SAAS,WAAW;AAAA,OACvB;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -8,37 +8,35 @@ declare function CoinChip({ symbol, size }: {
|
|
|
8
8
|
size: number;
|
|
9
9
|
}): react_jsx_runtime.JSX.Element;
|
|
10
10
|
declare const DUAL_PRICE_SCALES: {
|
|
11
|
-
/** Full-width hero contexts: AssetMarketplacePanel's main price.
|
|
12
|
-
* to spell out the currency ("0.07 ETH"), not just imply it via icon. */
|
|
11
|
+
/** Full-width hero contexts: AssetMarketplacePanel's main price. */
|
|
13
12
|
readonly hero: {
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly stableChip: 13;
|
|
13
|
+
readonly amount: "text-3xl";
|
|
14
|
+
readonly chip: 18;
|
|
15
|
+
readonly stableChip: 14;
|
|
18
16
|
readonly divider: "h-7";
|
|
19
|
-
readonly
|
|
17
|
+
readonly showLabel: true;
|
|
20
18
|
};
|
|
21
19
|
/** Card contexts: ListingCard's full variant — denser, the coin icon
|
|
22
20
|
* already conveys the currency, a text label would be redundant. */
|
|
23
21
|
readonly card: {
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly stableChip: 9;
|
|
22
|
+
readonly amount: "text-base";
|
|
23
|
+
readonly chip: 13;
|
|
24
|
+
readonly stableChip: 10;
|
|
28
25
|
readonly divider: "h-4";
|
|
29
|
-
readonly
|
|
26
|
+
readonly showLabel: false;
|
|
30
27
|
};
|
|
31
28
|
};
|
|
32
29
|
/**
|
|
33
|
-
* Equal-weight dual price: fiat and the on-chain currency shown as
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* USDC" would just be the same
|
|
30
|
+
* Equal-weight dual price: fiat and the on-chain currency shown as true
|
|
31
|
+
* peers — same font, same size, same icon treatment, same label
|
|
32
|
+
* alignment — not one dominant number with a secondary afterthought.
|
|
33
|
+
* This platform's audience spans non-crypto newcomers who read fiat and
|
|
34
|
+
* crypto-native buyers who read the token amount; neither should look
|
|
35
|
+
* like the "real" price and the other a footnote. Falls back to
|
|
36
|
+
* crypto-only when no USD rate is available. When the currency is itself
|
|
37
|
+
* a USD-pegged stablecoin, the crypto side collapses to a chip + code
|
|
38
|
+
* badge — showing "13.14 USD" beside "13.14 USDC" would just be the same
|
|
39
|
+
* number twice.
|
|
42
40
|
*/
|
|
43
41
|
declare function DualPrice({ amountFormatted, currency, usdValue, scale, trailing, }: {
|
|
44
42
|
amountFormatted: string | null | undefined;
|
|
@@ -61,11 +59,14 @@ declare const CHIP_TONES: {
|
|
|
61
59
|
};
|
|
62
60
|
};
|
|
63
61
|
/**
|
|
64
|
-
* Overlay/pill price content — fiat leads, crypto trails
|
|
62
|
+
* Overlay/pill price content — fiat leads, crypto trails, middot-
|
|
65
63
|
* separated; stablecoins collapse to fiat + symbol alone. Renders only the
|
|
66
64
|
* inner fragment: callers own their own pill container (background, blur,
|
|
67
65
|
* border, padding), which intentionally differs between hosts (see
|
|
68
|
-
* `tone`) rather than being forced into one visual treatment.
|
|
66
|
+
* `tone`) rather than being forced into one visual treatment. Smaller
|
|
67
|
+
* scale than DualPrice (compact artwork overlay), so no fiat/crypto icon
|
|
68
|
+
* chips here — the middot + dimmer trailing color is what marks the
|
|
69
|
+
* crypto side as secondary in this tighter context.
|
|
69
70
|
*/
|
|
70
71
|
declare function PriceChipContent({ amountFormatted, currency, usdValue, tone, }: {
|
|
71
72
|
amountFormatted: string | null | undefined;
|
|
@@ -8,37 +8,35 @@ declare function CoinChip({ symbol, size }: {
|
|
|
8
8
|
size: number;
|
|
9
9
|
}): react_jsx_runtime.JSX.Element;
|
|
10
10
|
declare const DUAL_PRICE_SCALES: {
|
|
11
|
-
/** Full-width hero contexts: AssetMarketplacePanel's main price.
|
|
12
|
-
* to spell out the currency ("0.07 ETH"), not just imply it via icon. */
|
|
11
|
+
/** Full-width hero contexts: AssetMarketplacePanel's main price. */
|
|
13
12
|
readonly hero: {
|
|
14
|
-
readonly
|
|
15
|
-
readonly
|
|
16
|
-
readonly
|
|
17
|
-
readonly stableChip: 13;
|
|
13
|
+
readonly amount: "text-3xl";
|
|
14
|
+
readonly chip: 18;
|
|
15
|
+
readonly stableChip: 14;
|
|
18
16
|
readonly divider: "h-7";
|
|
19
|
-
readonly
|
|
17
|
+
readonly showLabel: true;
|
|
20
18
|
};
|
|
21
19
|
/** Card contexts: ListingCard's full variant — denser, the coin icon
|
|
22
20
|
* already conveys the currency, a text label would be redundant. */
|
|
23
21
|
readonly card: {
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
readonly
|
|
27
|
-
readonly stableChip: 9;
|
|
22
|
+
readonly amount: "text-base";
|
|
23
|
+
readonly chip: 13;
|
|
24
|
+
readonly stableChip: 10;
|
|
28
25
|
readonly divider: "h-4";
|
|
29
|
-
readonly
|
|
26
|
+
readonly showLabel: false;
|
|
30
27
|
};
|
|
31
28
|
};
|
|
32
29
|
/**
|
|
33
|
-
* Equal-weight dual price: fiat and the on-chain currency shown as
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* USDC" would just be the same
|
|
30
|
+
* Equal-weight dual price: fiat and the on-chain currency shown as true
|
|
31
|
+
* peers — same font, same size, same icon treatment, same label
|
|
32
|
+
* alignment — not one dominant number with a secondary afterthought.
|
|
33
|
+
* This platform's audience spans non-crypto newcomers who read fiat and
|
|
34
|
+
* crypto-native buyers who read the token amount; neither should look
|
|
35
|
+
* like the "real" price and the other a footnote. Falls back to
|
|
36
|
+
* crypto-only when no USD rate is available. When the currency is itself
|
|
37
|
+
* a USD-pegged stablecoin, the crypto side collapses to a chip + code
|
|
38
|
+
* badge — showing "13.14 USD" beside "13.14 USDC" would just be the same
|
|
39
|
+
* number twice.
|
|
42
40
|
*/
|
|
43
41
|
declare function DualPrice({ amountFormatted, currency, usdValue, scale, trailing, }: {
|
|
44
42
|
amountFormatted: string | null | undefined;
|
|
@@ -61,11 +59,14 @@ declare const CHIP_TONES: {
|
|
|
61
59
|
};
|
|
62
60
|
};
|
|
63
61
|
/**
|
|
64
|
-
* Overlay/pill price content — fiat leads, crypto trails
|
|
62
|
+
* Overlay/pill price content — fiat leads, crypto trails, middot-
|
|
65
63
|
* separated; stablecoins collapse to fiat + symbol alone. Renders only the
|
|
66
64
|
* inner fragment: callers own their own pill container (background, blur,
|
|
67
65
|
* border, padding), which intentionally differs between hosts (see
|
|
68
|
-
* `tone`) rather than being forced into one visual treatment.
|
|
66
|
+
* `tone`) rather than being forced into one visual treatment. Smaller
|
|
67
|
+
* scale than DualPrice (compact artwork overlay), so no fiat/crypto icon
|
|
68
|
+
* chips here — the middot + dimmer trailing color is what marks the
|
|
69
|
+
* crypto side as secondary in this tighter context.
|
|
69
70
|
*/
|
|
70
71
|
declare function PriceChipContent({ amountFormatted, currency, usdValue, tone, }: {
|
|
71
72
|
amountFormatted: string | null | undefined;
|
|
@@ -12,15 +12,41 @@ function CoinChip({ symbol, size }) {
|
|
|
12
12
|
}
|
|
13
13
|
);
|
|
14
14
|
}
|
|
15
|
+
function FiatChip({ size }) {
|
|
16
|
+
return /* @__PURE__ */ jsx(
|
|
17
|
+
"span",
|
|
18
|
+
{
|
|
19
|
+
className: "grid shrink-0 place-items-center rounded-full bg-foreground/[0.06] font-extrabold leading-none text-foreground/80",
|
|
20
|
+
style: { width: size + 10, height: size + 10, fontSize: size },
|
|
21
|
+
children: "$"
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
function stripDollarSign(usdValue) {
|
|
26
|
+
return usdValue.replace("$", "");
|
|
27
|
+
}
|
|
15
28
|
const DISPLAY_FACE = "font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums";
|
|
16
29
|
const DUAL_PRICE_SCALES = {
|
|
17
|
-
/** Full-width hero contexts: AssetMarketplacePanel's main price.
|
|
18
|
-
|
|
19
|
-
hero: { fiat: "text-4xl", crypto: "text-2xl", chip: 16, stableChip: 13, divider: "h-7", showCurrencyLabel: true },
|
|
30
|
+
/** Full-width hero contexts: AssetMarketplacePanel's main price. */
|
|
31
|
+
hero: { amount: "text-3xl", chip: 18, stableChip: 14, divider: "h-7", showLabel: true },
|
|
20
32
|
/** Card contexts: ListingCard's full variant — denser, the coin icon
|
|
21
33
|
* already conveys the currency, a text label would be redundant. */
|
|
22
|
-
card: {
|
|
34
|
+
card: { amount: "text-base", chip: 13, stableChip: 10, divider: "h-4", showLabel: false }
|
|
23
35
|
};
|
|
36
|
+
function PriceUnit({
|
|
37
|
+
chip,
|
|
38
|
+
amount,
|
|
39
|
+
label,
|
|
40
|
+
amountClassName
|
|
41
|
+
}) {
|
|
42
|
+
return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
43
|
+
chip,
|
|
44
|
+
/* @__PURE__ */ jsxs("span", { className: "flex items-baseline gap-1.5", children: [
|
|
45
|
+
/* @__PURE__ */ jsx("span", { className: amountClassName, children: amount }),
|
|
46
|
+
label && /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-muted-foreground/70", children: label })
|
|
47
|
+
] })
|
|
48
|
+
] });
|
|
49
|
+
}
|
|
24
50
|
function DualPrice({
|
|
25
51
|
amountFormatted,
|
|
26
52
|
currency,
|
|
@@ -31,24 +57,45 @@ function DualPrice({
|
|
|
31
57
|
if (!amountFormatted) return null;
|
|
32
58
|
const s = DUAL_PRICE_SCALES[scale];
|
|
33
59
|
const cryptoDisplay = formatDisplayPrice(amountFormatted);
|
|
60
|
+
const amountClass = `${DISPLAY_FACE} ${s.amount}`;
|
|
34
61
|
if (!usdValue) {
|
|
35
|
-
return /* @__PURE__ */ jsxs("div", { className:
|
|
36
|
-
/* @__PURE__ */ jsx(
|
|
37
|
-
|
|
62
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
63
|
+
/* @__PURE__ */ jsx(
|
|
64
|
+
PriceUnit,
|
|
65
|
+
{
|
|
66
|
+
chip: /* @__PURE__ */ jsx(CoinChip, { symbol: currency, size: s.chip }),
|
|
67
|
+
amount: cryptoDisplay,
|
|
68
|
+
label: s.showLabel ? currency ?? void 0 : void 0,
|
|
69
|
+
amountClassName: amountClass
|
|
70
|
+
}
|
|
71
|
+
),
|
|
38
72
|
trailing && /* @__PURE__ */ jsx("span", { className: "ml-0.5", children: trailing })
|
|
39
73
|
] });
|
|
40
74
|
}
|
|
41
75
|
const stable = isStableCurrency(currency);
|
|
42
76
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
43
|
-
/* @__PURE__ */ jsx(
|
|
77
|
+
/* @__PURE__ */ jsx(
|
|
78
|
+
PriceUnit,
|
|
79
|
+
{
|
|
80
|
+
chip: /* @__PURE__ */ jsx(FiatChip, { size: s.chip }),
|
|
81
|
+
amount: stripDollarSign(usdValue),
|
|
82
|
+
label: s.showLabel ? "USD" : void 0,
|
|
83
|
+
amountClassName: amountClass
|
|
84
|
+
}
|
|
85
|
+
),
|
|
44
86
|
!stable && /* @__PURE__ */ jsx("span", { className: `${s.divider} w-px bg-border/60 shrink-0` }),
|
|
45
|
-
/* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
46
|
-
/* @__PURE__ */ jsx(CoinChip, { symbol: currency, size:
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
87
|
+
stable ? /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
88
|
+
/* @__PURE__ */ jsx(CoinChip, { symbol: currency, size: s.stableChip }),
|
|
89
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-muted-foreground", children: currency })
|
|
90
|
+
] }) : /* @__PURE__ */ jsx(
|
|
91
|
+
PriceUnit,
|
|
92
|
+
{
|
|
93
|
+
chip: /* @__PURE__ */ jsx(CoinChip, { symbol: currency, size: s.chip }),
|
|
94
|
+
amount: cryptoDisplay,
|
|
95
|
+
label: s.showLabel ? currency ?? void 0 : void 0,
|
|
96
|
+
amountClassName: amountClass
|
|
97
|
+
}
|
|
98
|
+
),
|
|
52
99
|
trailing && /* @__PURE__ */ jsx("span", { className: "ml-0.5", children: trailing })
|
|
53
100
|
] });
|
|
54
101
|
}
|
|
@@ -76,7 +123,8 @@ function PriceChipContent({
|
|
|
76
123
|
}
|
|
77
124
|
const t = CHIP_TONES[tone];
|
|
78
125
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
-
usdValue,
|
|
126
|
+
stripDollarSign(usdValue),
|
|
127
|
+
/* @__PURE__ */ jsx("span", { className: `font-semibold ${t.text}`, children: "USD" }),
|
|
80
128
|
/* @__PURE__ */ jsx("span", { className: t.dot, children: "\xB7" }),
|
|
81
129
|
/* @__PURE__ */ jsxs("span", { className: `inline-flex items-center gap-1 font-semibold ${t.text}`, children: [
|
|
82
130
|
currency && /* @__PURE__ */ jsx(CurrencyIcon, { symbol: currency, size: 12 }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/dual-price.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.js\";\n\n/** Currency icon in the soft circular chip used throughout the wallet UI —\n * reads as a coin, not a stray glyph floating next to text. */\nexport function CoinChip({ symbol, size }: { symbol: string | null | undefined; size: number }) {\n return (\n <span\n className=\"grid shrink-0 place-items-center rounded-full bg-foreground/[0.06]\"\n style={{ width: size + 10, height: size + 10 }}\n >\n <CurrencyIcon symbol={symbol ?? \"\"} size={size} />\n </span>\n );\n}\n\nconst DISPLAY_FACE = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\nconst DUAL_PRICE_SCALES = {\n /** Full-width hero contexts: AssetMarketplacePanel's main price. Has room\n * to spell out the currency (\"0.07 ETH\"), not just imply it via icon. */\n hero: { fiat: \"text-4xl\", crypto: \"text-2xl\", chip: 16, stableChip: 13, divider: \"h-7\", showCurrencyLabel: true },\n /** Card contexts: ListingCard's full variant — denser, the coin icon\n * already conveys the currency, a text label would be redundant. */\n card: { fiat: \"text-lg\", crypto: \"text-sm\", chip: 11, stableChip: 9, divider: \"h-4\", showCurrencyLabel: false },\n} as const;\n\n/**\n * Equal-weight dual price: fiat and the on-chain currency shown as peers,\n * not primary/afterthought — this platform's audience spans non-crypto\n * newcomers who read fiat and crypto-native buyers who read the token\n * amount. Both use the brand display face at a real step-down in scale so\n * the pairing reads as \"two related numbers,\" not one dominant + one\n * caption. Falls back to crypto-only when no USD rate is available. When\n * the currency is itself a USD-pegged stablecoin, the crypto amount\n * collapses to a small currency badge — showing \"$12.00\" beside \"12.00\n * USDC\" would just be the same number twice.\n */\nexport function DualPrice({\n amountFormatted,\n currency,\n usdValue,\n scale,\n trailing,\n}: {\n amountFormatted: string | null | undefined;\n currency: string | null | undefined;\n usdValue?: string | null;\n scale: keyof typeof DUAL_PRICE_SCALES;\n trailing?: ReactNode;\n}) {\n if (!amountFormatted) return null;\n const s = DUAL_PRICE_SCALES[scale];\n const cryptoDisplay = formatDisplayPrice(amountFormatted);\n\n if (!usdValue) {\n return (\n <div className={`flex items-center gap-2.5 ${DISPLAY_FACE} ${s.fiat}`}>\n <CoinChip symbol={currency} size={s.chip} />\n {cryptoDisplay}\n {trailing && <span className=\"ml-0.5\">{trailing}</span>}\n </div>\n );\n }\n\n const stable = isStableCurrency(currency);\n return (\n <div className=\"flex items-center gap-2.5\">\n <span className={`${DISPLAY_FACE} ${s.fiat}`}>{usdValue}</span>\n {!stable && <span className={`${s.divider} w-px bg-border/60 shrink-0`} />}\n <span className=\"inline-flex items-center gap-1.5\">\n <CoinChip symbol={currency} size={stable ? s.stableChip : s.chip} />\n {stable ? (\n <span className=\"text-sm font-semibold text-muted-foreground\">{currency}</span>\n ) : s.showCurrencyLabel ? (\n <span className=\"flex items-baseline gap-1.5\">\n <span className={`${DISPLAY_FACE} ${s.crypto} text-foreground/90`}>{cryptoDisplay}</span>\n <span className=\"text-sm font-semibold text-muted-foreground/70\">{currency}</span>\n </span>\n ) : (\n <span className={`${DISPLAY_FACE} ${s.crypto} text-foreground/90`}>{cryptoDisplay}</span>\n )}\n </span>\n {trailing && <span className=\"ml-0.5\">{trailing}</span>}\n </div>\n );\n}\n\nconst CHIP_TONES = {\n /** Full-bleed image overlays (AssetCard) — fixed dark glass, guaranteed\n * readable regardless of the artwork or the viewer's theme. */\n \"overlay-dark\": { dot: \"text-white/30\", text: \"text-white/65\" },\n /** Theme-aware card backgrounds (TokenCard). */\n card: { dot: \"text-muted-foreground/50\", text: \"text-muted-foreground\" },\n} as const;\n\n/**\n * Overlay/pill price content — fiat leads, crypto trails dimmer, middot-\n * separated; stablecoins collapse to fiat + symbol alone. Renders only the\n * inner fragment: callers own their own pill container (background, blur,\n * border, padding), which intentionally differs between hosts (see\n * `tone`) rather than being forced into one visual treatment.\n */\nexport function PriceChipContent({\n amountFormatted,\n currency,\n usdValue,\n tone,\n}: {\n amountFormatted: string | null | undefined;\n currency: string | null | undefined;\n usdValue?: string | null;\n tone: keyof typeof CHIP_TONES;\n}) {\n if (!amountFormatted) return null;\n const cryptoDisplay = formatDisplayPrice(amountFormatted);\n const stable = isStableCurrency(currency);\n\n if (!usdValue) {\n return (\n <>\n {currency && <CurrencyIcon symbol={currency} size={13} />}\n {cryptoDisplay}\n </>\n );\n }\n\n const t = CHIP_TONES[tone];\n return (\n <>\n {usdValue}\n <span className={t.dot}>·</span>\n <span className={`inline-flex items-center gap-1 font-semibold ${t.text}`}>\n {currency && <CurrencyIcon symbol={currency} size={12} />}\n {stable ? currency : cryptoDisplay}\n </span>\n </>\n );\n}\n"],"mappings":";AAcM,SA6GA,UA7GA,KA8CA,YA9CA;AAXN,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB,wBAAwB;AAI9C,SAAS,SAAS,EAAE,QAAQ,KAAK,GAAwD;AAC9F,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,OAAO,EAAE,OAAO,OAAO,IAAI,QAAQ,OAAO,GAAG;AAAA,MAE7C,8BAAC,gBAAa,QAAQ,UAAU,IAAI,MAAY;AAAA;AAAA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SAC7E,IAEA,oBAAC,UAAK,WAAW,GAAG,YAAY,IAAI,EAAE,MAAM,uBAAwB,yBAAc;AAAA,OAEtF;AAAA,IACC,YAAY,oBAAC,UAAK,WAAU,UAAU,oBAAS;AAAA,KAClD;AAEJ;AAEA,MAAM,aAAa;AAAA;AAAA;AAAA,EAGjB,gBAAgB,EAAE,KAAK,iBAAiB,MAAM,gBAAgB;AAAA;AAAA,EAE9D,MAAM,EAAE,KAAK,4BAA4B,MAAM,wBAAwB;AACzE;AASO,SAAS,iBAAiB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKG;AACD,MAAI,CAAC,gBAAiB,QAAO;AAC7B,QAAM,gBAAgB,mBAAmB,eAAe;AACxD,QAAM,SAAS,iBAAiB,QAAQ;AAExC,MAAI,CAAC,UAAU;AACb,WACE,iCACG;AAAA,kBAAY,oBAAC,gBAAa,QAAQ,UAAU,MAAM,IAAI;AAAA,MACtD;AAAA,OACH;AAAA,EAEJ;AAEA,QAAM,IAAI,WAAW,IAAI;AACzB,SACE,iCACG;AAAA;AAAA,IACD,oBAAC,UAAK,WAAW,EAAE,KAAK,kBAAC;AAAA,IACzB,qBAAC,UAAK,WAAW,gDAAgD,EAAE,IAAI,IACpE;AAAA,kBAAY,oBAAC,gBAAa,QAAQ,UAAU,MAAM,IAAI;AAAA,MACtD,SAAS,WAAW;AAAA,OACvB;AAAA,KACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/dual-price.tsx"],"sourcesContent":["\"use client\";\n\nimport type { ReactNode } from \"react\";\nimport { CurrencyIcon } from \"./currency-icon.js\";\nimport { formatDisplayPrice, isStableCurrency } from \"../utils/format.js\";\n\n/** Currency icon in the soft circular chip used throughout the wallet UI —\n * reads as a coin, not a stray glyph floating next to text. */\nexport function CoinChip({ symbol, size }: { symbol: string | null | undefined; size: number }) {\n return (\n <span\n className=\"grid shrink-0 place-items-center rounded-full bg-foreground/[0.06]\"\n style={{ width: size + 10, height: size + 10 }}\n >\n <CurrencyIcon symbol={symbol ?? \"\"} size={size} />\n </span>\n );\n}\n\n/** Same circular chip as CoinChip, for fiat. Sized 1:1 with the crypto\n * icon (fontSize === size, not a fraction of it) so the \"$\" reads with\n * the same visual weight as the coin icon sitting next to it — a smaller,\n * thinner glyph in an identically-sized circle looked like an afterthought\n * next to a solid icon, even though the circles measured the same. */\nfunction FiatChip({ size }: { size: number }) {\n return (\n <span\n className=\"grid shrink-0 place-items-center rounded-full bg-foreground/[0.06] font-extrabold leading-none text-foreground/80\"\n style={{ width: size + 10, height: size + 10, fontSize: size }}\n >\n $\n </span>\n );\n}\n\n/** usdValue arrives pre-formatted (\"$13.14\", \"<$0.01\") — the chip already\n * carries the \"$\", so strip it from the number to avoid showing it twice. */\nfunction stripDollarSign(usdValue: string): string {\n return usdValue.replace(\"$\", \"\");\n}\n\nconst DISPLAY_FACE = \"font-[family-name:var(--font-display)] font-extrabold tracking-tight tabular-nums\";\n\nconst DUAL_PRICE_SCALES = {\n /** Full-width hero contexts: AssetMarketplacePanel's main price. */\n hero: { amount: \"text-3xl\", chip: 18, stableChip: 14, divider: \"h-7\", showLabel: true },\n /** Card contexts: ListingCard's full variant — denser, the coin icon\n * already conveys the currency, a text label would be redundant. */\n card: { amount: \"text-base\", chip: 13, stableChip: 10, divider: \"h-4\", showLabel: false },\n} as const;\n\n/**\n * One currency's [chip] [amount] [optional code label] unit. Fiat and\n * crypto both render through this exact function — the previous version\n * had two separately-hand-coded branches (one baseline-aligned, one\n * center-aligned; one full-opacity, one dimmed) that drifted out of sync\n * with each other. Routing both through one function makes that class of\n * bug structurally impossible: there is only one place font, size,\n * opacity, and alignment for a price unit can be defined.\n */\nfunction PriceUnit({\n chip,\n amount,\n label,\n amountClassName,\n}: {\n chip: ReactNode;\n amount: string;\n label?: string;\n amountClassName: string;\n}) {\n return (\n <span className=\"inline-flex items-center gap-1.5\">\n {chip}\n <span className=\"flex items-baseline gap-1.5\">\n <span className={amountClassName}>{amount}</span>\n {label && <span className=\"text-sm font-semibold text-muted-foreground/70\">{label}</span>}\n </span>\n </span>\n );\n}\n\n/**\n * Equal-weight dual price: fiat and the on-chain currency shown as true\n * peers — same font, same size, same icon treatment, same label\n * alignment — not one dominant number with a secondary afterthought.\n * This platform's audience spans non-crypto newcomers who read fiat and\n * crypto-native buyers who read the token amount; neither should look\n * like the \"real\" price and the other a footnote. Falls back to\n * crypto-only when no USD rate is available. When the currency is itself\n * a USD-pegged stablecoin, the crypto side collapses to a chip + code\n * badge — showing \"13.14 USD\" beside \"13.14 USDC\" would just be the same\n * number twice.\n */\nexport function DualPrice({\n amountFormatted,\n currency,\n usdValue,\n scale,\n trailing,\n}: {\n amountFormatted: string | null | undefined;\n currency: string | null | undefined;\n usdValue?: string | null;\n scale: keyof typeof DUAL_PRICE_SCALES;\n trailing?: ReactNode;\n}) {\n if (!amountFormatted) return null;\n const s = DUAL_PRICE_SCALES[scale];\n const cryptoDisplay = formatDisplayPrice(amountFormatted);\n const amountClass = `${DISPLAY_FACE} ${s.amount}`;\n\n if (!usdValue) {\n return (\n <div className=\"flex items-center gap-2.5\">\n <PriceUnit\n chip={<CoinChip symbol={currency} size={s.chip} />}\n amount={cryptoDisplay}\n label={s.showLabel ? (currency ?? undefined) : undefined}\n amountClassName={amountClass}\n />\n {trailing && <span className=\"ml-0.5\">{trailing}</span>}\n </div>\n );\n }\n\n const stable = isStableCurrency(currency);\n return (\n <div className=\"flex items-center gap-2.5\">\n <PriceUnit\n chip={<FiatChip size={s.chip} />}\n amount={stripDollarSign(usdValue)}\n label={s.showLabel ? \"USD\" : undefined}\n amountClassName={amountClass}\n />\n {!stable && <span className={`${s.divider} w-px bg-border/60 shrink-0`} />}\n {stable ? (\n <span className=\"inline-flex items-center gap-1.5\">\n <CoinChip symbol={currency} size={s.stableChip} />\n <span className=\"text-sm font-semibold text-muted-foreground\">{currency}</span>\n </span>\n ) : (\n <PriceUnit\n chip={<CoinChip symbol={currency} size={s.chip} />}\n amount={cryptoDisplay}\n label={s.showLabel ? (currency ?? undefined) : undefined}\n amountClassName={amountClass}\n />\n )}\n {trailing && <span className=\"ml-0.5\">{trailing}</span>}\n </div>\n );\n}\n\nconst CHIP_TONES = {\n /** Full-bleed image overlays (AssetCard) — fixed dark glass, guaranteed\n * readable regardless of the artwork or the viewer's theme. */\n \"overlay-dark\": { dot: \"text-white/30\", text: \"text-white/65\" },\n /** Theme-aware card backgrounds (TokenCard). */\n card: { dot: \"text-muted-foreground/50\", text: \"text-muted-foreground\" },\n} as const;\n\n/**\n * Overlay/pill price content — fiat leads, crypto trails, middot-\n * separated; stablecoins collapse to fiat + symbol alone. Renders only the\n * inner fragment: callers own their own pill container (background, blur,\n * border, padding), which intentionally differs between hosts (see\n * `tone`) rather than being forced into one visual treatment. Smaller\n * scale than DualPrice (compact artwork overlay), so no fiat/crypto icon\n * chips here — the middot + dimmer trailing color is what marks the\n * crypto side as secondary in this tighter context.\n */\nexport function PriceChipContent({\n amountFormatted,\n currency,\n usdValue,\n tone,\n}: {\n amountFormatted: string | null | undefined;\n currency: string | null | undefined;\n usdValue?: string | null;\n tone: keyof typeof CHIP_TONES;\n}) {\n if (!amountFormatted) return null;\n const cryptoDisplay = formatDisplayPrice(amountFormatted);\n const stable = isStableCurrency(currency);\n\n if (!usdValue) {\n return (\n <>\n {currency && <CurrencyIcon symbol={currency} size={13} />}\n {cryptoDisplay}\n </>\n );\n }\n\n const t = CHIP_TONES[tone];\n return (\n <>\n {stripDollarSign(usdValue)}\n <span className={`font-semibold ${t.text}`}>USD</span>\n <span className={t.dot}>·</span>\n <span className={`inline-flex items-center gap-1 font-semibold ${t.text}`}>\n {currency && <CurrencyIcon symbol={currency} size={12} />}\n {stable ? currency : cryptoDisplay}\n </span>\n </>\n );\n}\n"],"mappings":";AAcM,SA+KA,UA/KA,KA4DA,YA5DA;AAXN,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB,wBAAwB;AAI9C,SAAS,SAAS,EAAE,QAAQ,KA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