@jaw.id/ui 0.4.6 → 0.4.8
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() {}
|
|
@@ -57245,9 +57248,9 @@ function aU(e, t, n) {
|
|
|
57245
57248
|
}
|
|
57246
57249
|
//#endregion
|
|
57247
57250
|
//#region src/utils/reverseResolve.ts
|
|
57248
|
-
var oU = "https://api.justaname.id/ens/v2/reverse", sU = 50, cU = "https://
|
|
57251
|
+
var oU = "https://api.justaname.id/ens/v2/reverse", sU = 50, cU = "https://metadata.ens.domains/mainnet/avatar/";
|
|
57249
57252
|
function lU(e) {
|
|
57250
|
-
return
|
|
57253
|
+
return cU + encodeURIComponent(e);
|
|
57251
57254
|
}
|
|
57252
57255
|
async function uU(e, t, n) {
|
|
57253
57256
|
let r = new URL(oU);
|
|
@@ -57260,11 +57263,7 @@ async function uU(e, t, n) {
|
|
|
57260
57263
|
for (let e of o) {
|
|
57261
57264
|
if (!e?.name) continue;
|
|
57262
57265
|
let t = { name: e.name };
|
|
57263
|
-
|
|
57264
|
-
let n = lU(e.records?.records?.texts?.find((e) => e.key === "avatar")?.value);
|
|
57265
|
-
n && (t.avatar = n);
|
|
57266
|
-
}
|
|
57267
|
-
s[e.address.toLowerCase()] = t;
|
|
57266
|
+
n && e.records?.records?.texts?.find((e) => e.key === "avatar")?.value && (t.avatar = lU(e.name)), s[e.address.toLowerCase()] = t;
|
|
57268
57267
|
}
|
|
57269
57268
|
return s;
|
|
57270
57269
|
}
|
|
@@ -58036,8 +58035,11 @@ var UU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58036
58035
|
children: [/* @__PURE__ */ V("div", {
|
|
58037
58036
|
className: "flex w-full items-center justify-between",
|
|
58038
58037
|
children: [/* @__PURE__ */ B("p", {
|
|
58039
|
-
className:
|
|
58040
|
-
children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` :
|
|
58038
|
+
className: `text-foreground text-base ${P > 0 ? "font-normal" : "font-bold"}`,
|
|
58039
|
+
children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` : (() => {
|
|
58040
|
+
let e = Number(n);
|
|
58041
|
+
return e > 0 && e < 1e-4 ? `< 0.0001 ${N}` : `${e.toFixed(4)} ${N}`;
|
|
58042
|
+
})()
|
|
58041
58043
|
}), g && !a && f && h && /* @__PURE__ */ B(JL, {
|
|
58042
58044
|
tokens: f,
|
|
58043
58045
|
selectedToken: m ?? null,
|
|
@@ -58047,7 +58049,7 @@ var UU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58047
58049
|
nativeTokenPrice: P,
|
|
58048
58050
|
estimatedGasEth: n
|
|
58049
58051
|
})]
|
|
58050
|
-
}), /* @__PURE__ */ B("p", {
|
|
58052
|
+
}), P > 0 && /* @__PURE__ */ B("p", {
|
|
58051
58053
|
className: "text-muted-foreground text-xs font-normal",
|
|
58052
58054
|
children: (() => {
|
|
58053
58055
|
let e = Number(n);
|
|
@@ -58371,8 +58373,11 @@ var UU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58371
58373
|
children: [/* @__PURE__ */ V("div", {
|
|
58372
58374
|
className: "flex w-full items-center justify-between",
|
|
58373
58375
|
children: [/* @__PURE__ */ B("p", {
|
|
58374
|
-
className:
|
|
58375
|
-
children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` :
|
|
58376
|
+
className: `text-foreground text-base ${P > 0 ? "font-normal" : "font-bold"}`,
|
|
58377
|
+
children: P > 0 ? `$${(P * Number(n)).toFixed(4)}` : (() => {
|
|
58378
|
+
let e = Number(n);
|
|
58379
|
+
return e > 0 && e < 1e-4 ? `< 0.0001 ${N}` : `${e.toFixed(4)} ${N}`;
|
|
58380
|
+
})()
|
|
58376
58381
|
}), g && !a && f && h && /* @__PURE__ */ B(JL, {
|
|
58377
58382
|
tokens: f,
|
|
58378
58383
|
selectedToken: m ?? null,
|
|
@@ -58382,7 +58387,7 @@ var UU = ({ to: e, data: t, chainId: n, apiKey: r, resolvedAddresses: i, resolve
|
|
|
58382
58387
|
nativeTokenPrice: P,
|
|
58383
58388
|
estimatedGasEth: n
|
|
58384
58389
|
})]
|
|
58385
|
-
}), /* @__PURE__ */ B("p", {
|
|
58390
|
+
}), P > 0 && /* @__PURE__ */ B("p", {
|
|
58386
58391
|
className: "text-muted-foreground text-xs font-normal",
|
|
58387
58392
|
children: (() => {
|
|
58388
58393
|
let e = Number(n);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reverseResolve.d.ts","sourceRoot":"","sources":["../../src/utils/reverseResolve.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"reverseResolve.d.ts","sourceRoot":"","sources":["../../src/utils/reverseResolve.ts"],"names":[],"mappings":"AAaA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAwED,6LAA6L;AAC7L,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,YAAY,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAOrH;AAED,2KAA2K;AAC3K,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,YAAY,EAAE,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC,CAE3C"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaw.id/ui",
|
|
3
3
|
"description": "Pre-built React dialogs for JAW.id",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.8",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"sideEffects": [
|
|
@@ -35,6 +35,23 @@
|
|
|
35
35
|
"default": "./dist/index.js"
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
+
"nx": {
|
|
39
|
+
"targets": {
|
|
40
|
+
"test": {
|
|
41
|
+
"cache": true,
|
|
42
|
+
"inputs": [
|
|
43
|
+
"default",
|
|
44
|
+
"^production",
|
|
45
|
+
"{projectRoot}/vitest.config.ts"
|
|
46
|
+
],
|
|
47
|
+
"executor": "nx:run-commands",
|
|
48
|
+
"options": {
|
|
49
|
+
"cwd": "{projectRoot}",
|
|
50
|
+
"command": "bunx vitest run"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
38
55
|
"peerDependencies": {
|
|
39
56
|
"react": ">=18.0.0",
|
|
40
57
|
"react-dom": ">=18.0.0"
|