@jaw.id/ui 0.4.6 → 0.4.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FeeTokenSelector/index.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IAEtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,qBAAqB;IAC7B,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAyDD,eAAO,MAAM,gBAAgB,GAAI,8FAQ9B,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FeeTokenSelector/index.tsx"],"names":[],"mappings":"AAUA,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IAEtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,qBAAqB;IAC7B,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,aAAa,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAyDD,eAAO,MAAM,gBAAgB,GAAI,8FAQ9B,qBAAqB,mDA2MvB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionDialog/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAOjD,eAAO,MAAM,iBAAiB,GAAI,kTAyB/B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TransactionDialog/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAOjD,eAAO,MAAM,iBAAiB,GAAI,kTAyB/B,sBAAsB,4CAwzBxB,CAAC;AAEF,cAAc,SAAS,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -53006,15 +53006,15 @@ var GL = (e, t, n) => {
|
|
|
53006
53006
|
].includes(e.symbol.toUpperCase()) && !isNaN(n) ? qL(n) : ""
|
|
53007
53007
|
};
|
|
53008
53008
|
}
|
|
53009
|
-
if (!o
|
|
53009
|
+
if (!o) return null;
|
|
53010
53010
|
let t = parseFloat(o);
|
|
53011
53011
|
if (isNaN(t)) return null;
|
|
53012
|
-
let n = t * a;
|
|
53013
53012
|
if (e.isNative) return {
|
|
53014
53013
|
formatted: `${KL(o, e.symbol)} ${e.symbol}`,
|
|
53015
|
-
usd: qL(
|
|
53014
|
+
usd: a ? qL(t * a) : ""
|
|
53016
53015
|
};
|
|
53017
|
-
|
|
53016
|
+
if (!a) return null;
|
|
53017
|
+
let n = t * a, r = e.decimals >= 6 ? 3 : e.decimals;
|
|
53018
53018
|
return {
|
|
53019
53019
|
formatted: `${n.toFixed(r)} ${e.symbol}`,
|
|
53020
53020
|
usd: qL(n)
|
|
@@ -53042,13 +53042,16 @@ var GL = (e, t, n) => {
|
|
|
53042
53042
|
}),
|
|
53043
53043
|
/* @__PURE__ */ B("div", {
|
|
53044
53044
|
className: "shrink-0 text-right",
|
|
53045
|
-
children: a
|
|
53045
|
+
children: a ? a.usd ? /* @__PURE__ */ V(ut, { children: [/* @__PURE__ */ B("div", {
|
|
53046
53046
|
className: "text-xs font-semibold",
|
|
53047
53047
|
children: a.usd
|
|
53048
53048
|
}), /* @__PURE__ */ V("div", {
|
|
53049
53049
|
className: "text-muted-foreground text-[10px]",
|
|
53050
53050
|
children: ["Up to ", a.formatted]
|
|
53051
|
-
})] }) :
|
|
53051
|
+
})] }) : /* @__PURE__ */ B("div", {
|
|
53052
|
+
className: "text-xs font-semibold",
|
|
53053
|
+
children: a.formatted
|
|
53054
|
+
}) : e.isSelectable ? null : /* @__PURE__ */ B("span", {
|
|
53052
53055
|
className: "text-destructive text-[10px]",
|
|
53053
53056
|
children: e.balance === 0n ? "0" : "Insufficient"
|
|
53054
53057
|
})
|
|
@@ -53124,7 +53127,7 @@ function YL(e = 768) {
|
|
|
53124
53127
|
}
|
|
53125
53128
|
//#endregion
|
|
53126
53129
|
//#region ../core/dist/sdk-info.js
|
|
53127
|
-
var XL = "0.4.
|
|
53130
|
+
var XL = "0.4.3";
|
|
53128
53131
|
(/* @__PURE__ */ L(((e, t) => {
|
|
53129
53132
|
var n = Object.prototype.hasOwnProperty, r = "~";
|
|
53130
53133
|
function i() {}
|
|
@@ -58036,8 +58039,11 @@ var UU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58036
58039
|
children: [/* @__PURE__ */ V("div", {
|
|
58037
58040
|
className: "flex w-full items-center justify-between",
|
|
58038
58041
|
children: [/* @__PURE__ */ B("p", {
|
|
58039
|
-
className:
|
|
58040
|
-
children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` :
|
|
58042
|
+
className: `text-foreground text-base ${P > 0 ? "font-normal" : "font-bold"}`,
|
|
58043
|
+
children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` : (() => {
|
|
58044
|
+
let e = Number(n);
|
|
58045
|
+
return e > 0 && e < 1e-4 ? `< 0.0001 ${N}` : `${e.toFixed(4)} ${N}`;
|
|
58046
|
+
})()
|
|
58041
58047
|
}), g && !a && f && h && /* @__PURE__ */ B(JL, {
|
|
58042
58048
|
tokens: f,
|
|
58043
58049
|
selectedToken: m ?? null,
|
|
@@ -58047,7 +58053,7 @@ var UU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58047
58053
|
nativeTokenPrice: P,
|
|
58048
58054
|
estimatedGasEth: n
|
|
58049
58055
|
})]
|
|
58050
|
-
}), /* @__PURE__ */ B("p", {
|
|
58056
|
+
}), P > 0 && /* @__PURE__ */ B("p", {
|
|
58051
58057
|
className: "text-muted-foreground text-xs font-normal",
|
|
58052
58058
|
children: (() => {
|
|
58053
58059
|
let e = Number(n);
|
|
@@ -58371,8 +58377,11 @@ var UU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58371
58377
|
children: [/* @__PURE__ */ V("div", {
|
|
58372
58378
|
className: "flex w-full items-center justify-between",
|
|
58373
58379
|
children: [/* @__PURE__ */ B("p", {
|
|
58374
|
-
className:
|
|
58375
|
-
children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` :
|
|
58380
|
+
className: `text-foreground text-base ${P > 0 ? "font-normal" : "font-bold"}`,
|
|
58381
|
+
children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` : (() => {
|
|
58382
|
+
let e = Number(n);
|
|
58383
|
+
return e > 0 && e < 1e-4 ? `< 0.0001 ${N}` : `${e.toFixed(4)} ${N}`;
|
|
58384
|
+
})()
|
|
58376
58385
|
}), g && !a && f && h && /* @__PURE__ */ B(JL, {
|
|
58377
58386
|
tokens: f,
|
|
58378
58387
|
selectedToken: m ?? null,
|
|
@@ -58382,7 +58391,7 @@ var UU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58382
58391
|
nativeTokenPrice: P,
|
|
58383
58392
|
estimatedGasEth: n
|
|
58384
58393
|
})]
|
|
58385
|
-
}), /* @__PURE__ */ B("p", {
|
|
58394
|
+
}), P > 0 && /* @__PURE__ */ B("p", {
|
|
58386
58395
|
className: "text-muted-foreground text-xs font-normal",
|
|
58387
58396
|
children: (() => {
|
|
58388
58397
|
let e = Number(n);
|