@deframe-sdk/components 0.1.73 → 0.1.74
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/index.d.mts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +16 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1638,6 +1638,7 @@ interface SwapQuoteDetailsLabels {
|
|
|
1638
1638
|
blockchainCostsLabel: string;
|
|
1639
1639
|
networkGasLabel: string;
|
|
1640
1640
|
protocolFeeLabel: string;
|
|
1641
|
+
priceImpactLabel: string;
|
|
1641
1642
|
slippageLabel: string;
|
|
1642
1643
|
etaLabel: string;
|
|
1643
1644
|
quoteIdLabel: string;
|
|
@@ -1658,6 +1659,8 @@ interface SwapQuoteDetailsViewProps {
|
|
|
1658
1659
|
feePercentage: string;
|
|
1659
1660
|
gasCostFormatted: string;
|
|
1660
1661
|
protocolFee: string;
|
|
1662
|
+
priceImpactFormatted: string;
|
|
1663
|
+
priceImpactIsPositive: boolean;
|
|
1661
1664
|
slippageFormatted: string;
|
|
1662
1665
|
etaFormatted: string;
|
|
1663
1666
|
quoteId: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1638,6 +1638,7 @@ interface SwapQuoteDetailsLabels {
|
|
|
1638
1638
|
blockchainCostsLabel: string;
|
|
1639
1639
|
networkGasLabel: string;
|
|
1640
1640
|
protocolFeeLabel: string;
|
|
1641
|
+
priceImpactLabel: string;
|
|
1641
1642
|
slippageLabel: string;
|
|
1642
1643
|
etaLabel: string;
|
|
1643
1644
|
quoteIdLabel: string;
|
|
@@ -1658,6 +1659,8 @@ interface SwapQuoteDetailsViewProps {
|
|
|
1658
1659
|
feePercentage: string;
|
|
1659
1660
|
gasCostFormatted: string;
|
|
1660
1661
|
protocolFee: string;
|
|
1662
|
+
priceImpactFormatted: string;
|
|
1663
|
+
priceImpactIsPositive: boolean;
|
|
1661
1664
|
slippageFormatted: string;
|
|
1662
1665
|
etaFormatted: string;
|
|
1663
1666
|
quoteId: string;
|
package/dist/index.js
CHANGED
|
@@ -8366,14 +8366,6 @@ function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
|
8366
8366
|
]
|
|
8367
8367
|
}
|
|
8368
8368
|
),
|
|
8369
|
-
transactionDetails.exchangeRateFormatted && /* @__PURE__ */ jsxRuntime.jsx(
|
|
8370
|
-
"p",
|
|
8371
|
-
{
|
|
8372
|
-
"data-test-id": "swap-form-simple-advanced-panel-subtitle",
|
|
8373
|
-
className: "text-[13px] text-[color:var(--deframe-widget-color-text-secondary)] m-0 mb-[var(--deframe-widget-size-gap-sm)] leading-[1.4] font-[inherit]",
|
|
8374
|
-
children: transactionDetails.exchangeRateFormatted
|
|
8375
|
-
}
|
|
8376
|
-
),
|
|
8377
8369
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8378
8370
|
"div",
|
|
8379
8371
|
{
|
|
@@ -8382,9 +8374,15 @@ function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
|
8382
8374
|
}
|
|
8383
8375
|
),
|
|
8384
8376
|
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.exchangeRateLabel, value: transactionDetails.exchangeRateFormatted }),
|
|
8385
|
-
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.blockchainCostsLabel, value: transactionDetails.totalCostFormatted }),
|
|
8386
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8387
|
-
|
|
8377
|
+
/* @__PURE__ */ jsxRuntime.jsx(DetailRow, { label: transactionDetails.labels.blockchainCostsLabel, value: `- ${transactionDetails.totalCostFormatted}`, valueColor: "negative" }),
|
|
8378
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8379
|
+
DetailRow,
|
|
8380
|
+
{
|
|
8381
|
+
label: transactionDetails.labels.priceImpactLabel,
|
|
8382
|
+
value: transactionDetails.priceImpactFormatted,
|
|
8383
|
+
valueColor: transactionDetails.priceImpactIsPositive ? "positive" : "negative"
|
|
8384
|
+
}
|
|
8385
|
+
),
|
|
8388
8386
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8389
8387
|
SlippageDetailRow,
|
|
8390
8388
|
{
|
|
@@ -8401,7 +8399,12 @@ function AdvancedPanelContent({ advancedSettings, transactionDetails }) {
|
|
|
8401
8399
|
}
|
|
8402
8400
|
);
|
|
8403
8401
|
}
|
|
8404
|
-
|
|
8402
|
+
var valueColorClassNames = {
|
|
8403
|
+
default: "text-[color:var(--deframe-widget-color-text-primary)]",
|
|
8404
|
+
negative: "text-[color:var(--deframe-widget-color-state-error)]",
|
|
8405
|
+
positive: "text-[color:var(--deframe-widget-color-state-success)]"
|
|
8406
|
+
};
|
|
8407
|
+
function DetailRow({ label, value, valueColor = "default" }) {
|
|
8405
8408
|
if (!label && !value) return null;
|
|
8406
8409
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8407
8410
|
"div",
|
|
@@ -8421,7 +8424,7 @@ function DetailRow({ label, value }) {
|
|
|
8421
8424
|
"span",
|
|
8422
8425
|
{
|
|
8423
8426
|
"data-test-id": "swap-form-simple-detail-row-value",
|
|
8424
|
-
className: "text-[13px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-right font-[var(--deframe-widget-font-family)]
|
|
8427
|
+
className: tailwindMerge.twMerge("text-[13px] [font-weight:var(--deframe-widget-font-weight-semibold)] text-right font-[var(--deframe-widget-font-family)]", valueColorClassNames[valueColor]),
|
|
8425
8428
|
children: value
|
|
8426
8429
|
}
|
|
8427
8430
|
)
|