hd-wallet-ui 1.2.6 → 1.4.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/README.md CHANGED
@@ -39,11 +39,26 @@ wallet-ui/
39
39
  │ ├── address-derivation.js # Multi-chain address generation
40
40
  │ └── constants.js # Coin configs, explorer URLs, path helpers
41
41
  ├── styles/
42
- └── main.css # Glass morphism styles
42
+ ├── main.css # Standalone demo site styles (global)
43
+ │ └── widget.css # Namespaced embed styles (scoped to #hd-wallet-ui-container)
43
44
  ├── package.json
44
45
  └── vite.config.js
45
46
  ```
46
47
 
48
+ ## Embedding (Avoiding CSS Collisions)
49
+
50
+ If you're integrating the modal UI into an existing webpage, use the namespaced stylesheet export:
51
+
52
+ ```js
53
+ import 'hd-wallet-ui/styles';
54
+ ```
55
+
56
+ For the standalone demo site styling, use:
57
+
58
+ ```js
59
+ import 'hd-wallet-ui/styles/demo';
60
+ ```
61
+
47
62
  ## Usage Examples
48
63
 
49
64
  ### Address Derivation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hd-wallet-ui",
3
- "version": "1.2.6",
3
+ "version": "1.4.3",
4
4
  "description": "HD Wallet modal UI — login, keys, identity, trust map, and security bond. Attach to any button in your app.",
5
5
  "type": "module",
6
6
  "main": "src/app.js",
@@ -8,20 +8,25 @@
8
8
  "exports": {
9
9
  ".": "./src/app.js",
10
10
  "./lib": "./src/lib.js",
11
- "./styles": "./styles/main.css"
11
+ "./styles": "./styles/widget.css",
12
+ "./styles/demo": "./styles/main.css"
12
13
  },
13
14
  "files": [
14
15
  "src/",
15
16
  "styles/"
16
17
  ],
17
- "sideEffects": false,
18
+ "sideEffects": [
19
+ "**/*.css"
20
+ ],
18
21
  "scripts": {
19
22
  "build:wasm": "emcmake cmake -B ../build-wasm -S .. -DCMAKE_BUILD_TYPE=Release -DHD_WALLET_BUILD_WASM=ON && cmake --build ../build-wasm --target hd_wallet_wasm_npm -j8",
23
+ "build:widget-css": "node scripts/build-widget-css.mjs",
20
24
  "dev": "vite",
21
25
  "dev:full": "npm run build:wasm && vite",
22
26
  "build": "npm run build:wasm && vite build",
23
27
  "build:docs": "npm run build:wasm && vite build --outDir ../docs --emptyOutDir",
24
28
  "preview": "vite preview",
29
+ "prepack": "npm run build:widget-css",
25
30
  "test": "vitest run",
26
31
  "test:watch": "vitest"
27
32
  },
@@ -34,8 +39,8 @@
34
39
  "bip39": "^3.1.0",
35
40
  "buffer": "^6.0.3",
36
41
  "flatbuffers": "^25.9.23",
37
- "flatc-wasm": "^25.12.19-wasm.43",
38
- "hd-wallet-wasm": "^1.2.6",
42
+ "flatc-wasm": "^26.1.15",
43
+ "hd-wallet-wasm": "^1.4.3",
39
44
  "qrcode": "^1.5.3",
40
45
  "spacedatastandards.org": "^23.3.3-0.3.4",
41
46
  "vcard-cryptoperson": "^1.1.11"