@jaw.id/ui 0.0.1 → 0.0.3

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/CHANGELOG.md ADDED
@@ -0,0 +1,23 @@
1
+ ## 0.0.3 (2026-02-19)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - **core,ui,wagmi:** updated README.mds ([#112](https://github.com/JustaName-id/jaw-mono/pull/112))
6
+
7
+ ### 🧱 Updated Dependencies
8
+
9
+ - Updated @jaw.id/core to 0.0.2
10
+
11
+ ### ❤️ Thank You
12
+
13
+ - Ghadi @Ghadi8
14
+
15
+ ## 0.0.2 (2026-02-19)
16
+
17
+ ### 🩹 Fixes
18
+
19
+ - **ui,keys:** prevent crash when call permission selector is undefined ([#111](https://github.com/JustaName-id/jaw-mono/pull/111))
20
+
21
+ ### ❤️ Thank You
22
+
23
+ - Leo Franklin @LeoFranklin015
package/README.md CHANGED
@@ -1,54 +1,44 @@
1
1
  # @jaw.id/ui
2
2
 
3
- React UI components for JAW (JustaName Account Wallet) - pre-built dialogs for wallet interactions.
3
+ Pre-built React dialogs for [JAW.id](https://jaw.id) wallet interactions: onboarding, transaction signing, permissions, and more.
4
+
5
+ ## Documentation
6
+
7
+ For documentation and guides, visit [docs.jaw.id](https://docs.jaw.id).
4
8
 
5
9
  ## Installation
6
10
 
7
11
  ```bash
8
12
  npm install @jaw.id/ui
9
- ```
10
-
11
- Import styles in your app entry point:
12
-
13
- ```typescript
14
- import '@jaw.id/ui/style.css';
13
+ # or
14
+ bun add @jaw.id/ui
15
15
  ```
16
16
 
17
17
  ## Quick Start
18
18
 
19
- Use `ReactUIHandler` with app-specific passkey mode:
20
-
21
19
  ```tsx
22
20
  import { JAW } from '@jaw.id/core';
23
21
  import { ReactUIHandler } from '@jaw.id/ui';
24
- import '@jaw.id/ui/style.css';
25
22
 
26
- const uiHandler = new ReactUIHandler({
27
- container: document.getElementById('jaw-ui-root')!,
28
- });
23
+ const uiHandler = new ReactUIHandler();
29
24
 
30
- const jaw = await JAW.create({
25
+ const jaw = JAW.create({
31
26
  apiKey: 'your-api-key',
32
27
  appName: 'My App',
33
- mode: 'appSpecific',
34
- uiHandler,
28
+ preference: {
29
+ mode: 'AppSpecific',
30
+ uiHandler,
31
+ },
35
32
  });
36
33
  ```
37
34
 
38
- ## Exports
35
+ ## AI-Assisted Development
39
36
 
40
- **Dialog Components:** `OnboardingDialog`, `ConnectDialog`, `TransactionDialog`, `SignatureDialog`, `Eip712Dialog`, `SiweDialog`, `PermissionDialog`, `DefaultDialog`
37
+ Add JAW.id skills to your AI coding agent:
41
38
 
42
- **React Integration:** `ReactUIHandler` - Complete UIHandler implementation for app-specific mode
43
-
44
- ## Peer Dependencies
45
-
46
- - `react` >= 18.0.0
47
- - `react-dom` >= 18.0.0
48
-
49
- ## Documentation
50
-
51
- For detailed guides and examples, visit **[docs.jaw.id](https://docs.jaw.id)**.
39
+ ```bash
40
+ npx skills add JustaName-id/jaw-skills
41
+ ```
52
42
 
53
43
  ## License
54
44
 
@@ -1,4 +1,4 @@
1
- import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as R, b as E, e as x, H as y, f as M } from "./index-DlfjdYW4.js";
1
+ import { B as p, g as m, s as w, d as k, i as b, l as L, a as O, c as R, b as E, e as x, H as y, f as M } from "./index-DBYNWeek.js";
2
2
  class S extends p {
3
3
  constructor({ callbackSelector: s, cause: e, data: o, extraData: n, sender: c, urls: t }) {
4
4
  super(e.shortMessage || "An error occurred while fetching for an offchain result.", {
@@ -10,7 +10,7 @@ export interface SpendPermission {
10
10
  }
11
11
  export interface CallPermission {
12
12
  target: string;
13
- selector: string;
13
+ selector?: string;
14
14
  functionSignature: string;
15
15
  }
16
16
  export interface PermissionDialogProps {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/PermissionDialog/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;A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AC,EAAE,cAAc,EAAE,CAAC;IAGzB,UAAU,EAAE,MAAM,CAAC;IAGnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;IAGrB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAG7B,SAAS,CAAC,EAAE,IAAI,CAAC;IAGjB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IAGpB,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACzC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IACnD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAG/B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAG5B,aAAa,EAAE,MAAM,CAAC;CACvB"}
@@ -40082,7 +40082,7 @@ async function Eg(t, e) {
40082
40082
  });
40083
40083
  return z === "0x" ? { data: void 0 } : { data: z };
40084
40084
  } catch (_) {
40085
- const L = AW(_), { offchainLookup: O, offchainLookupSignature: C } = await import("./ccip-Cdkx99iZ.js");
40085
+ const L = AW(_), { offchainLookup: O, offchainLookupSignature: C } = await import("./ccip-BYa9WTP9.js");
40086
40086
  if (t.ccipRead !== !1 && L?.slice(0, 10) === C && x)
40087
40087
  return { data: await O(t, { data: L, to: x }) };
40088
40088
  throw N && L?.slice(0, 10) === "0x101bb98d" ? new Qq({ factory: d }) : x5(_, {
@@ -71973,6 +71973,11 @@ const zd = [
71973
71973
  name: "entryPointAddress",
71974
71974
  type: "address",
71975
71975
  internalType: "address"
71976
+ },
71977
+ {
71978
+ name: "factory",
71979
+ type: "address",
71980
+ internalType: "address"
71976
71981
  }
71977
71982
  ],
71978
71983
  stateMutability: "nonpayable"
@@ -71985,6 +71990,19 @@ const zd = [
71985
71990
  type: "receive",
71986
71991
  stateMutability: "payable"
71987
71992
  },
71993
+ {
71994
+ type: "function",
71995
+ name: "REPLAYABLE_NONCE_KEY",
71996
+ inputs: [],
71997
+ outputs: [
71998
+ {
71999
+ name: "",
72000
+ type: "uint256",
72001
+ internalType: "uint256"
72002
+ }
72003
+ ],
72004
+ stateMutability: "view"
72005
+ },
71988
72006
  {
71989
72007
  type: "function",
71990
72008
  name: "addOwnerAddress",
@@ -72016,6 +72034,25 @@ const zd = [
72016
72034
  outputs: [],
72017
72035
  stateMutability: "nonpayable"
72018
72036
  },
72037
+ {
72038
+ type: "function",
72039
+ name: "canSkipChainIdValidation",
72040
+ inputs: [
72041
+ {
72042
+ name: "functionSelector",
72043
+ type: "bytes4",
72044
+ internalType: "bytes4"
72045
+ }
72046
+ ],
72047
+ outputs: [
72048
+ {
72049
+ name: "",
72050
+ type: "bool",
72051
+ internalType: "bool"
72052
+ }
72053
+ ],
72054
+ stateMutability: "pure"
72055
+ },
72019
72056
  {
72020
72057
  type: "function",
72021
72058
  name: "eip712Domain",
@@ -72125,6 +72162,19 @@ const zd = [
72125
72162
  outputs: [],
72126
72163
  stateMutability: "nonpayable"
72127
72164
  },
72165
+ {
72166
+ type: "function",
72167
+ name: "executeWithoutChainIdValidation",
72168
+ inputs: [
72169
+ {
72170
+ name: "calls",
72171
+ type: "bytes[]",
72172
+ internalType: "bytes[]"
72173
+ }
72174
+ ],
72175
+ outputs: [],
72176
+ stateMutability: "payable"
72177
+ },
72128
72178
  {
72129
72179
  type: "function",
72130
72180
  name: "getNonce",
@@ -72138,6 +72188,72 @@ const zd = [
72138
72188
  ],
72139
72189
  stateMutability: "view"
72140
72190
  },
72191
+ {
72192
+ type: "function",
72193
+ name: "getUserOpHashWithoutChainId",
72194
+ inputs: [
72195
+ {
72196
+ name: "userOp",
72197
+ type: "tuple",
72198
+ internalType: "struct PackedUserOperation",
72199
+ components: [
72200
+ {
72201
+ name: "sender",
72202
+ type: "address",
72203
+ internalType: "address"
72204
+ },
72205
+ {
72206
+ name: "nonce",
72207
+ type: "uint256",
72208
+ internalType: "uint256"
72209
+ },
72210
+ {
72211
+ name: "initCode",
72212
+ type: "bytes",
72213
+ internalType: "bytes"
72214
+ },
72215
+ {
72216
+ name: "callData",
72217
+ type: "bytes",
72218
+ internalType: "bytes"
72219
+ },
72220
+ {
72221
+ name: "accountGasLimits",
72222
+ type: "bytes32",
72223
+ internalType: "bytes32"
72224
+ },
72225
+ {
72226
+ name: "preVerificationGas",
72227
+ type: "uint256",
72228
+ internalType: "uint256"
72229
+ },
72230
+ {
72231
+ name: "gasFees",
72232
+ type: "bytes32",
72233
+ internalType: "bytes32"
72234
+ },
72235
+ {
72236
+ name: "paymasterAndData",
72237
+ type: "bytes",
72238
+ internalType: "bytes"
72239
+ },
72240
+ {
72241
+ name: "signature",
72242
+ type: "bytes",
72243
+ internalType: "bytes"
72244
+ }
72245
+ ]
72246
+ }
72247
+ ],
72248
+ outputs: [
72249
+ {
72250
+ name: "",
72251
+ type: "bytes32",
72252
+ internalType: "bytes32"
72253
+ }
72254
+ ],
72255
+ stateMutability: "view"
72256
+ },
72141
72257
  {
72142
72258
  type: "function",
72143
72259
  name: "initialize",
@@ -72490,6 +72606,33 @@ const zd = [
72490
72606
  name: "JustanAccount_AlreadyInitialized",
72491
72607
  inputs: []
72492
72608
  },
72609
+ {
72610
+ type: "error",
72611
+ name: "JustanAccount_InvalidNonceKey",
72612
+ inputs: [
72613
+ {
72614
+ name: "key",
72615
+ type: "uint256",
72616
+ internalType: "uint256"
72617
+ }
72618
+ ]
72619
+ },
72620
+ {
72621
+ type: "error",
72622
+ name: "JustanAccount_SelectorNotAllowed",
72623
+ inputs: [
72624
+ {
72625
+ name: "selector",
72626
+ type: "bytes4",
72627
+ internalType: "bytes4"
72628
+ }
72629
+ ]
72630
+ },
72631
+ {
72632
+ type: "error",
72633
+ name: "JustanAccount_UnauthorizedInitialization",
72634
+ inputs: []
72635
+ },
72493
72636
  {
72494
72637
  type: "error",
72495
72638
  name: "MultiOwnable_AlreadyOwner",
@@ -72581,7 +72724,7 @@ const zd = [
72581
72724
  type: "constructor",
72582
72725
  inputs: [
72583
72726
  {
72584
- name: "implementation",
72727
+ name: "entryPointAddress",
72585
72728
  type: "address",
72586
72729
  internalType: "address"
72587
72730
  }
@@ -72664,7 +72807,12 @@ const zd = [
72664
72807
  },
72665
72808
  {
72666
72809
  type: "error",
72667
- name: "OwnerRequired",
72810
+ name: "JustanAccountFactory_AlreadyDeployed",
72811
+ inputs: []
72812
+ },
72813
+ {
72814
+ type: "error",
72815
+ name: "JustanAccountFactory_OwnerRequired",
72668
72816
  inputs: []
72669
72817
  }
72670
72818
  ];
@@ -75231,12 +75379,15 @@ async function bfe(t, e) {
75231
75379
  function oA(t) {
75232
75380
  return {
75233
75381
  ...t,
75234
- spends: t.spends.map((e) => ({
75235
- token: e.token,
75236
- allowance: e.allowance,
75237
- unit: yfe(e.unit),
75238
- multiplier: e.multiplier
75239
- }))
75382
+ spends: t.spends.map((e) => {
75383
+ const n = e.unit === "year" ? "month" : e.unit, r = e.unit === "year" ? e.multiplier * 12 : e.multiplier;
75384
+ return {
75385
+ token: e.token,
75386
+ allowance: e.allowance,
75387
+ unit: yfe(n),
75388
+ multiplier: r
75389
+ };
75390
+ })
75240
75391
  };
75241
75392
  }
75242
75393
  function xU(t) {
@@ -75284,8 +75435,7 @@ function yfe(t) {
75284
75435
  day: 2,
75285
75436
  week: 3,
75286
75437
  month: 4,
75287
- year: 5,
75288
- forever: 6
75438
+ forever: 5
75289
75439
  }[t];
75290
75440
  }
75291
75441
  const yb = [
@@ -75321,7 +75471,7 @@ const yb = [
75321
75471
  { name: "token", type: "address" },
75322
75472
  { name: "allowance", type: "uint160" },
75323
75473
  { name: "unit", type: "uint8" },
75324
- { name: "multiplier", type: "uint8" }
75474
+ { name: "multiplier", type: "uint16" }
75325
75475
  ]
75326
75476
  }
75327
75477
  ]
@@ -75358,7 +75508,7 @@ const yb = [
75358
75508
  { name: "token", type: "address" },
75359
75509
  { name: "allowance", type: "uint160" },
75360
75510
  { name: "unit", type: "uint8" },
75361
- { name: "multiplier", type: "uint8" }
75511
+ { name: "multiplier", type: "uint16" }
75362
75512
  ]
75363
75513
  }
75364
75514
  ]
@@ -75396,7 +75546,7 @@ const yb = [
75396
75546
  { name: "token", type: "address" },
75397
75547
  { name: "allowance", type: "uint160" },
75398
75548
  { name: "unit", type: "uint8" },
75399
- { name: "multiplier", type: "uint8" }
75549
+ { name: "multiplier", type: "uint16" }
75400
75550
  ]
75401
75551
  }
75402
75552
  ]
@@ -75434,7 +75584,7 @@ const yb = [
75434
75584
  { name: "token", type: "address" },
75435
75585
  { name: "allowance", type: "uint160" },
75436
75586
  { name: "unit", type: "uint8" },
75437
- { name: "multiplier", type: "uint8" }
75587
+ { name: "multiplier", type: "uint16" }
75438
75588
  ]
75439
75589
  }
75440
75590
  ]
@@ -75481,7 +75631,7 @@ const yb = [
75481
75631
  { name: "token", type: "address" },
75482
75632
  { name: "allowance", type: "uint160" },
75483
75633
  { name: "unit", type: "uint8" },
75484
- { name: "multiplier", type: "uint8" }
75634
+ { name: "multiplier", type: "uint16" }
75485
75635
  ]
75486
75636
  }
75487
75637
  ]
@@ -80844,7 +80994,7 @@ const JS = ({ to: t, data: e, chainId: n, apiKey: r }) => {
80844
80994
  I.removeEventListener("wheel", U);
80845
80995
  };
80846
80996
  }, []);
80847
- const W = _h(l || 1, d, 24), Z = f || W, Q = (I) => I.toLowerCase() === IS.toLowerCase() ? "Any Contract" : null, K = (I, U) => U.toLowerCase() === ffe.toLowerCase() ? "Any Function" : I, Y = (I) => I ? `${I.slice(0, 5)}...${I.slice(-4)}` : "", ae = (I, U) => {
80997
+ const W = _h(l || 1, d, 24), Z = f || W, Q = (I) => I.toLowerCase() === IS.toLowerCase() ? "Any Contract" : null, K = (I, U) => U?.toLowerCase() === ffe.toLowerCase() ? "Any Function" : I, Y = (I) => I ? `${I.slice(0, 5)}...${I.slice(-4)}` : "", ae = (I, U) => {
80848
80998
  typeof window < "u" && navigator?.clipboard && (navigator.clipboard.writeText(I), U(!0), setTimeout(() => U(!1), 3e3));
80849
80999
  }, X = !m && !b && !$ && !E && (!P || v), te = o.length, H = a.length, D = te + H;
80850
81000
  return /* @__PURE__ */ j(
@@ -82588,8 +82738,8 @@ function R0e({
82588
82738
  };
82589
82739
  }), [Z, d, N, v]), Y = ct(() => Q.map((H) => ({
82590
82740
  target: H.target,
82591
- selector: H.selector || "",
82592
- functionSignature: H.functionSignature || uM(H.selector || "")
82741
+ selector: H.selector,
82742
+ functionSignature: H.functionSignature || (H.selector ? uM(H.selector) : "Unknown Function")
82593
82743
  })), [Q]), ae = ct(() => oM(t.data.expiry), [t.data.expiry]), le = ct(() => {
82594
82744
  const H = [];
82595
82745
  if (K.length > 0) {
@@ -82943,8 +83093,8 @@ function B0e({
82943
83093
  };
82944
83094
  }) : [], [g, h, S, M]), K = ct(() => g?.calls ? g.calls.map((te) => ({
82945
83095
  target: te.target,
82946
- selector: te.selector || "",
82947
- functionSignature: te.functionSignature || uM(te.selector || "")
83096
+ selector: te.selector,
83097
+ functionSignature: te.functionSignature || (te.selector ? uM(te.selector) : "Unknown Function")
82948
83098
  })) : [], [g]), Y = ct(() => {
82949
83099
  if (!g) return "";
82950
83100
  const te = parseInt(g.end, 10);
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { q as e, m as o, C as n, o as c, n as i, D as t, E as l, r, p as I, F as d, G as g, L as D, h as k, O as u, P as T, R as C, S as p, j as h, T as m, U as f, t as E, W as P, I as S, k as U, N as y, A, J as F, K as G, z as N, M as O, v as R, y as b, w as v, x as w, u as x } from "./index-DlfjdYW4.js";
1
+ import { q as e, m as o, C as n, o as c, n as i, D as t, E as l, r, p as I, F as d, G as g, L as D, h as k, O as u, P as T, R as C, S as p, j as h, T as m, U as f, t as E, W as P, I as S, k as U, N as y, A, J as F, K as G, z as N, M as O, v as R, y as b, w as v, x as w, u as x } from "./index-DBYNWeek.js";
2
2
  export {
3
3
  e as BadgeDollarIcon,
4
4
  o as CloseIcon,
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@jaw.id/ui",
3
- "version": "0.0.1",
3
+ "description": "Pre-built React dialogs for JAW.id",
4
+ "version": "0.0.3",
4
5
  "type": "module",
5
6
  "sideEffects": [
6
7
  "**/*.css",
@@ -64,4 +65,4 @@
64
65
  "tailwindcss": "3",
65
66
  "vite-plugin-lib-inject-css": "^2.2.2"
66
67
  }
67
- }
68
+ }
@@ -149,8 +149,8 @@ export const PermissionDialog = ({
149
149
  return null;
150
150
  };
151
151
 
152
- const getFunctionDisplayName = (signature: string, selector: string): string => {
153
- if (selector.toLowerCase() === ANY_FN_SEL.toLowerCase()) {
152
+ const getFunctionDisplayName = (signature: string, selector?: string): string => {
153
+ if (selector?.toLowerCase() === ANY_FN_SEL.toLowerCase()) {
154
154
  return 'Any Function';
155
155
  }
156
156
  return signature;
@@ -12,7 +12,7 @@ export interface SpendPermission {
12
12
 
13
13
  export interface CallPermission {
14
14
  target: string;
15
- selector: string;
15
+ selector?: string;
16
16
  functionSignature: string;
17
17
  }
18
18
 
@@ -2195,8 +2195,8 @@ function PermissionDialogWrapper({
2195
2195
  // Format call permissions
2196
2196
  const calls = useMemo(() => callsData.map(call => ({
2197
2197
  target: call.target,
2198
- selector: call.selector || '',
2199
- functionSignature: call.functionSignature || resolveFunctionSelector(call.selector || ''),
2198
+ selector: call.selector,
2199
+ functionSignature: call.functionSignature || (call.selector ? resolveFunctionSelector(call.selector) : 'Unknown Function'),
2200
2200
  })), [callsData]);
2201
2201
 
2202
2202
  // Format expiry date
@@ -2818,8 +2818,8 @@ function RevokePermissionDialogWrapper({
2818
2818
 
2819
2819
  return fetchedPermissionData.calls.map((call: any) => ({
2820
2820
  target: call.target,
2821
- selector: call.selector || '',
2822
- functionSignature: call.functionSignature || resolveFunctionSelector(call.selector || ''),
2821
+ selector: call.selector,
2822
+ functionSignature: call.functionSignature || (call.selector ? resolveFunctionSelector(call.selector) : 'Unknown Function'),
2823
2823
  }));
2824
2824
  }, [fetchedPermissionData]);
2825
2825