@jaw.id/ui 1.1.2 → 1.2.1
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/OnboardingDialog/accountHelpers.d.ts +12 -0
- package/dist/components/OnboardingDialog/accountHelpers.d.ts.map +1 -0
- package/dist/components/OnboardingDialog/index.d.ts +2 -1
- package/dist/components/OnboardingDialog/index.d.ts.map +1 -1
- package/dist/components/OnboardingDialog/selectDefaultAccount.d.ts +12 -0
- package/dist/components/OnboardingDialog/selectDefaultAccount.d.ts.map +1 -0
- package/dist/components/OnboardingDialog/types.d.ts +11 -0
- package/dist/components/OnboardingDialog/types.d.ts.map +1 -1
- package/dist/components/TransactionDialog/AssetPreview.d.ts +10 -0
- package/dist/components/TransactionDialog/AssetPreview.d.ts.map +1 -0
- package/dist/components/TransactionDialog/index.d.ts +1 -1
- package/dist/components/TransactionDialog/index.d.ts.map +1 -1
- package/dist/components/TransactionDialog/types.d.ts +4 -0
- package/dist/components/TransactionDialog/types.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useAssetPreview.d.ts +21 -0
- package/dist/hooks/useAssetPreview.d.ts.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +11178 -10871
- package/dist/react/ReactUIHandler.d.ts.map +1 -1
- package/dist/{smartAccount-DA5m3LVe.js → smartAccount-DYk6CqRF.js} +1 -1
- package/dist/utils/assetPreview.d.ts +43 -0
- package/dist/utils/assetPreview.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactUIHandler.d.ts","sourceRoot":"","sources":["../../src/react/ReactUIHandler.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,SAAS,EACT,eAAe,EACf,SAAS,EACT,UAAU,EA0BX,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"ReactUIHandler.d.ts","sourceRoot":"","sources":["../../src/react/ReactUIHandler.tsx"],"names":[],"mappings":"AAIA,OAAO,EACL,SAAS,EACT,eAAe,EACf,SAAS,EACT,UAAU,EA0BX,MAAM,cAAc,CAAC;AA2BtB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AA4D7C;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kFAAkF;IAClF,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,qBAAa,cAAe,YAAW,SAAS;IAC9C,OAAO,CAAC,MAAM,CAA0C;IACxD,OAAO,CAAC,UAAU,CAAC,CAAW;gBAElB,OAAO,CAAC,EAAE,qBAAqB;IAI3C;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAInC;;;OAGG;IACH,QAAQ,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI;IAI/B,8DAA8D;IAC9D,OAAO,KAAK,cAAc,GAIzB;IAEK,OAAO,CAAC,CAAC,GAAG,OAAO,EAAE,OAAO,EAAE,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IA6FtE,SAAS,CAAC,OAAO,EAAE,SAAS,GAAG,OAAO;IAahC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAU9B,OAAO,CAAC,YAAY;CAmMrB"}
|
|
@@ -13921,4 +13921,4 @@ async function u_(e, t, n) {
|
|
|
13921
13921
|
return Jt(t * await Zr(Zg(e, n)), 18);
|
|
13922
13922
|
}
|
|
13923
13923
|
//#endregion
|
|
13924
|
-
export { Cu as $, Wf as A, ld as B, Mg as C, ip as D, Cp as E, zf as F, Bu as G, ed as H, Mf as I, Fu as J, ju as K, kf as L, Yf as M, Jf as N, Hf as O, Xf as P, ku as Q, Df as R, kg as S,
|
|
13924
|
+
export { Cu as $, Wf as A, ld as B, Mg as C, On as Ct, ip as D, Cp as E, zf as F, Bu as G, ed as H, Mf as I, Fu as J, ju as K, kf as L, Yf as M, Jf as N, Hf as O, Xf as P, ku as Q, Df as R, kg as S, kn as St, wg as T, td as U, cd as V, Y as W, Nu as X, Pu as Y, Ru as Z, Eg as _, gr as _t, l_ as a, Xo as at, Hg as b, wn as bt, i_ as c, zo as ct, n_ as d, Io as dt, kl as et, e_ as f, Ao as ft, Dg as g, _r as gt, Gg as h, xa as ht, a_ as i, sc as it, Gf as j, Uf as k, Zg as l, Bo as lt, Kg as m, Ra as mt, Xg as n, $c as nt, c_ as o, $o as ot, qg as p, J as pt, Au as q, u_ as r, Xc as rt, r_ as s, Jo as st, Jg as t, Tl as tt, t_ as u, Ro as ut, Bg as v, jn as vt, Ag as w, Dn as wt, jg as x, Tn as xt, Vg as y, G as yt, dd as z };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type Address } from 'viem';
|
|
2
|
+
import { type TransactionCall } from '@jaw.id/core';
|
|
3
|
+
export interface RawAssetChange {
|
|
4
|
+
token: {
|
|
5
|
+
address: string;
|
|
6
|
+
decimals?: number;
|
|
7
|
+
symbol?: string;
|
|
8
|
+
};
|
|
9
|
+
value: {
|
|
10
|
+
pre: bigint;
|
|
11
|
+
post: bigint;
|
|
12
|
+
diff: bigint;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export interface AssetDelta {
|
|
16
|
+
address: string;
|
|
17
|
+
symbol?: string;
|
|
18
|
+
decimals: number;
|
|
19
|
+
diff: bigint;
|
|
20
|
+
direction: 'in' | 'out';
|
|
21
|
+
amountFormatted: string;
|
|
22
|
+
isNative: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Normalize viem's `assetChanges` into the rows the UI renders.
|
|
26
|
+
* Drops zero-diff entries and non-native entries without a usable symbol/decimals.
|
|
27
|
+
* Addresses in `erc721` are rendered as whole-token counts (viem reports NFT decimals
|
|
28
|
+
* as `1` or `undefined`, which would otherwise show as "0.1" or be dropped).
|
|
29
|
+
*/
|
|
30
|
+
export declare function mapAssetChanges(changes: readonly RawAssetChange[], erc721?: ReadonlySet<string>): AssetDelta[];
|
|
31
|
+
/** Format a formatUnits string for display: at most 4 decimals, sub-0.0001 dust floored to "<0.0001". */
|
|
32
|
+
export declare function formatAssetAmount(amountFormatted: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Simulate the batch against current chain state and return the net per-asset balance
|
|
35
|
+
* changes for `account`. Throws on simulation failure — the caller owns the fallback.
|
|
36
|
+
*/
|
|
37
|
+
export declare function simulateAssetChanges({ chainId, apiKey, account, calls, }: {
|
|
38
|
+
chainId: number;
|
|
39
|
+
apiKey?: string;
|
|
40
|
+
account: Address;
|
|
41
|
+
calls: TransactionCall[];
|
|
42
|
+
}): Promise<AssetDelta[]>;
|
|
43
|
+
//# sourceMappingURL=assetPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assetPreview.d.ts","sourceRoot":"","sources":["../../src/utils/assetPreview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqD,KAAK,OAAO,EAAE,MAAM,MAAM,CAAC;AAEvF,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAEjE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/D,KAAK,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CACpD;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,SAAS,cAAc,EAAE,EAClC,MAAM,GAAE,WAAW,CAAC,MAAM,CAAa,GACtC,UAAU,EAAE,CA2Bd;AAKD,yGAAyG;AACzG,wBAAgB,iBAAiB,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAIjE;AAwDD;;;GAGG;AACH,wBAAsB,oBAAoB,CAAC,EACzC,OAAO,EACP,MAAM,EACN,OAAO,EACP,KAAK,GACN,EAAE;IACD,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,eAAe,EAAE,CAAC;CAC1B,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CA+BxB"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC"}
|