@jaw.id/ui 1.0.2 → 1.1.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.
@@ -1,9 +1,9 @@
1
- import { ClassValue } from 'clsx';
1
+ import { type ClassValue } from 'clsx';
2
2
  export declare function cn(...inputs: ClassValue[]): string;
3
3
  /**
4
4
  * Context for passing the portal container element to Radix UI Dialog.
5
5
  * This ensures Radix portals render inside the SDK's container div,
6
6
  * preventing consumer app CSS from leaking into SDK modals.
7
7
  */
8
- export declare const PortalContainerContext: import('react').Context<HTMLElement | null>;
8
+ export declare const PortalContainerContext: import("react").Context<HTMLElement | null>;
9
9
  //# sourceMappingURL=utils.d.ts.map
@@ -1,4 +1,5 @@
1
- import { UIHandler, UIHandlerConfig, UIRequest, UIResponse, JawTheme } from '../../../core/src/index.ts';
1
+ import { UIHandler, UIHandlerConfig, UIRequest, UIResponse } from '@jaw.id/core';
2
+ import type { JawTheme } from '@jaw.id/core';
2
3
  /**
3
4
  * Options for ReactUIHandler constructor.
4
5
  */
@@ -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, wg as T, td as U, cd as V, Y as W, Nu as X, Pu as Y, Ru as Z, Eg as _, Tn as _t, l_ as a, Jo as at, Hg as b, Dn as bt, i_ as c, Ao as ct, n_ as d, xa as dt, kl as et, e_ as f, _r as ft, Dg as g, wn as gt, Gg as h, G as ht, a_ as i, $o as it, Gf as j, Uf as k, Zg as l, J as lt, Kg as m, jn as mt, Xg as n, sc as nt, c_ as o, Ro as ot, qg as p, gr as pt, Au as q, u_ as r, Xo as rt, r_ as s, Io as st, Jg as t, Tl as tt, t_ as u, Ra as ut, Bg as v, kn as vt, Ag as w, jg as x, Vg as y, On as yt, dd as z };
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, Dn 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 _, G as _t, l_ as a, Jo as at, Hg as b, kn as bt, i_ as c, Ro as ct, n_ as d, J as dt, kl as et, e_ as f, Ra as ft, Dg as g, jn as gt, Gg as h, gr as ht, a_ as i, $o as it, Gf as j, Uf as k, Zg as l, Io as lt, Kg as m, _r as mt, Xg as n, sc as nt, c_ as o, zo as ot, qg as p, xa as pt, Au as q, u_ as r, Xo as rt, r_ as s, Bo as st, Jg as t, Tl as tt, t_ as u, Ao as ut, Bg as v, wn as vt, Ag as w, jg as x, On as xt, Vg as y, Tn as yt, dd as z };
@@ -1,3 +1,9 @@
1
+ /**
2
+ * DOM application of a resolved theme.
3
+ *
4
+ * Sets CSS custom properties on a container element and manages
5
+ * the `dark` class / `color-scheme` property.
6
+ */
1
7
  import { ResolvedTheme } from './resolve-theme.js';
2
8
  /**
3
9
  * Apply resolved theme variables to an HTML element.
@@ -1,4 +1,7 @@
1
- import { JawBorderRadius, JawFontStack } from '../../../core/src/index.ts';
1
+ /**
2
+ * Default palettes and mapping tables for the JAW UI theme system.
3
+ */
4
+ import { JawBorderRadius, JawFontStack } from '@jaw.id/core';
2
5
  export declare const DEFAULT_LIGHT_PALETTE: Readonly<Record<string, string>>;
3
6
  export declare const DEFAULT_DARK_PALETTE: Readonly<Record<string, string>>;
4
7
  export declare const BORDER_RADIUS_MAP: Readonly<Record<JawBorderRadius, string>>;
@@ -1,4 +1,10 @@
1
- import { JawTheme } from '../../../core/src/index.ts';
1
+ /**
2
+ * Theme resolution pipeline.
3
+ *
4
+ * Merges base palette, accent overrides, preset maps, and user CSS variables
5
+ * into a single frozen record of CSS custom properties.
6
+ */
7
+ import { JawTheme } from '@jaw.id/core';
2
8
  export interface ResolvedTheme {
3
9
  readonly variables: Readonly<Record<string, string>>;
4
10
  readonly colorScheme: 'light' | 'dark';
@@ -1,4 +1,4 @@
1
- import { AbiFunction, Hex } from 'viem';
1
+ import { type AbiFunction, type Hex } from 'viem';
2
2
  export type FieldFormatKind = 'raw' | 'addressName' | 'tokenAmount' | 'amount' | 'date' | 'unit' | 'nftName' | 'duration' | 'enum' | 'calldata';
3
3
  export interface FieldFormatParams {
4
4
  tokenPath?: string;
@@ -0,0 +1,22 @@
1
+ import { type Hex } from 'viem';
2
+ export interface Eip712Digests {
3
+ /** keccak256(0x1901 ‖ domainSeparator ‖ hashStruct(message)) — the value actually signed. */
4
+ eip712Digest: Hex;
5
+ /** hashStruct of the EIP712Domain — the domain separator. */
6
+ domainHash: Hex;
7
+ /** hashStruct of the message struct. */
8
+ messageHash: Hex;
9
+ }
10
+ /**
11
+ * Parse an EIP-712 typed-data JSON string and compute the three ERC-8213
12
+ * digests. Throws if the JSON is malformed (callers should guard with the same
13
+ * try/catch they already use to parse typed data for display).
14
+ */
15
+ export declare function computeEip712Digests(typedDataJson: string): Eip712Digests;
16
+ /**
17
+ * Calldata Digest = keccak256( uint256(len(calldata)) ‖ calldata ).
18
+ * The 32-byte big-endian length prefix binds the digest to the exact byte
19
+ * length; chainId is intentionally excluded by the spec.
20
+ */
21
+ export declare function computeCalldataDigest(data: Hex): Hex;
22
+ //# sourceMappingURL=erc8213.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"erc8213.d.ts","sourceRoot":"","sources":["../../src/utils/erc8213.ts"],"names":[],"mappings":"AAoBA,OAAO,EASL,KAAK,GAAG,EAIT,MAAM,MAAM,CAAC;AAOd,MAAM,WAAW,aAAa;IAC5B,6FAA6F;IAC7F,YAAY,EAAE,GAAG,CAAC;IAClB,6DAA6D;IAC7D,UAAU,EAAE,GAAG,CAAC;IAChB,wCAAwC;IACxC,WAAW,EAAE,GAAG,CAAC;CAClB;AAmCD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,CAgBzE;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,GAAG,GAAG,GAAG,CAEpD"}
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": "1.0.2",
4
+ "version": "1.1.1",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "sideEffects": [
@@ -37,6 +37,34 @@
37
37
  },
38
38
  "nx": {
39
39
  "targets": {
40
+ "build": {
41
+ "executor": "nx:run-commands",
42
+ "dependsOn": [
43
+ "^build"
44
+ ],
45
+ "cache": true,
46
+ "inputs": [
47
+ "production",
48
+ "^production",
49
+ {
50
+ "externalDependencies": [
51
+ "vite",
52
+ "typescript"
53
+ ]
54
+ }
55
+ ],
56
+ "outputs": [
57
+ "{projectRoot}/dist"
58
+ ],
59
+ "options": {
60
+ "cwd": "{projectRoot}",
61
+ "commands": [
62
+ "vite build",
63
+ "tsc --build tsconfig.lib.json"
64
+ ],
65
+ "parallel": false
66
+ }
67
+ },
40
68
  "test": {
41
69
  "cache": true,
42
70
  "inputs": [
@@ -57,7 +85,7 @@
57
85
  "react-dom": ">=18.0.0"
58
86
  },
59
87
  "dependencies": {
60
- "@jaw.id/core": "1.0.2",
88
+ "@jaw.id/core": "1.0.3",
61
89
  "@hookform/resolvers": "^5.2.2",
62
90
  "@justaname.id/sdk": "^0.2.204",
63
91
  "@radix-ui/react-accordion": "^1.2.12",