hd-wallet-ui 2.0.16 → 2.0.18
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/package.json +2 -2
- package/src/app.js +6 -3
- package/src/template.js +11 -11
- package/styles/main.css +6 -31
- package/styles/widget.css +6 -31
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hd-wallet-ui",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.18",
|
|
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",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"buffer": "^6.0.3",
|
|
41
41
|
"flatbuffers": "^25.9.23",
|
|
42
42
|
"flatc-wasm": "^26.1.32",
|
|
43
|
-
"hd-wallet-wasm": "^2.0.
|
|
43
|
+
"hd-wallet-wasm": "^2.0.18",
|
|
44
44
|
"qrcode": "^1.5.3",
|
|
45
45
|
"spacedatastandards.org": "^1.93.3",
|
|
46
46
|
"vcard-cryptoperson": "^1.1.11"
|
package/src/app.js
CHANGED
|
@@ -3836,8 +3836,8 @@ function isPasskeySupported() {
|
|
|
3836
3836
|
|
|
3837
3837
|
// Track selected remember method (pin or passkey) for each login type
|
|
3838
3838
|
const rememberMethod = {
|
|
3839
|
-
password: '
|
|
3840
|
-
seed: '
|
|
3839
|
+
password: 'pin',
|
|
3840
|
+
seed: 'pin'
|
|
3841
3841
|
};
|
|
3842
3842
|
|
|
3843
3843
|
function setupLoginHandlers() {
|
|
@@ -4272,7 +4272,6 @@ function setupMainAppHandlers() {
|
|
|
4272
4272
|
$('login-modal')?.classList.add('active');
|
|
4273
4273
|
});
|
|
4274
4274
|
$('nav-logout')?.addEventListener('click', logout);
|
|
4275
|
-
$('account-logout')?.addEventListener('click', logout);
|
|
4276
4275
|
$('nav-keys')?.addEventListener('click', async () => {
|
|
4277
4276
|
$('keys-modal')?.classList.add('active');
|
|
4278
4277
|
if (state.loggedIn) {
|
|
@@ -6042,6 +6041,10 @@ export async function createWalletUI(rootElement, options = {}) {
|
|
|
6042
6041
|
const modal = document.getElementById('keys-modal');
|
|
6043
6042
|
if (modal) modal.classList.add('active');
|
|
6044
6043
|
},
|
|
6044
|
+
/** Clear the wallet session; host applications own any visible logout control */
|
|
6045
|
+
logout() {
|
|
6046
|
+
logout();
|
|
6047
|
+
},
|
|
6045
6048
|
/** Remove all injected wallet UI elements from the DOM */
|
|
6046
6049
|
destroy() {
|
|
6047
6050
|
const container = document.getElementById('hd-wallet-ui-container');
|
package/src/template.js
CHANGED
|
@@ -3,7 +3,7 @@ export function getModalHTML() {
|
|
|
3
3
|
<!-- Keys Modal -->
|
|
4
4
|
<div id="keys-modal" class="modal">
|
|
5
5
|
<div class="modal-glass modal-wide">
|
|
6
|
-
<div class="modal-header account-modal-header"><div class="account-header-info"><div class="account-wallet-row"><select id="account-wallet-select" class="glass-input compact account-wallet-select" aria-label="Select wallet"></select></div><div class="account-wallet-summary"><div class="account-wallet-balance-line"><div class="ph-portfolio-value" id="wallet-bond-value">$0.00</div><div class="ph-portfolio-label">Bond</div></div></div></div><
|
|
6
|
+
<div class="modal-header account-modal-header"><div class="account-header-info"><div class="account-wallet-row"><select id="account-wallet-select" class="glass-input compact account-wallet-select" aria-label="Select wallet"></select></div><div class="account-wallet-summary"><div class="account-wallet-balance-line"><div class="ph-portfolio-value" id="wallet-bond-value">$0.00</div><div class="ph-portfolio-label">Bond</div></div></div></div><button class="modal-close account-modal-close" type="button" aria-label="Close"><svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg></button></div>
|
|
7
7
|
<div class="modal-tabs">
|
|
8
8
|
<button class="modal-tab active" data-modal-tab="vcard-tab-content">Identity</button>
|
|
9
9
|
<button class="modal-tab" data-modal-tab="trust-tab-content">Trust Map</button>
|
|
@@ -562,11 +562,11 @@ export function getModalHTML() {
|
|
|
562
562
|
<span class="entropy-label"><span id="entropy-bits">0</span> bits entropy</span>
|
|
563
563
|
</div>
|
|
564
564
|
<div class="remember-wallet-group">
|
|
565
|
-
<label class="glass-checkbox"><input type="checkbox" id="remember-wallet-password"><span class="checkmark"></span><span>Remember wallet</span></label>
|
|
566
|
-
<div class="remember-options" id="remember-options-password"
|
|
567
|
-
<div class="remember-method-selector"><button type="button" class="remember-method-btn" data-method="pin" data-target="password">PIN</button><button type="button" class="remember-method-btn
|
|
568
|
-
<div class="pin-input-group" id="pin-group-password"
|
|
569
|
-
<div class="passkey-info" id="passkey-info-password"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2a5 5 0 0 1 5 5v3H7V7a5 5 0 0 1 5-5z"/><rect x="3" y="10" width="18" height="12" rx="2"/><circle cx="12" cy="16" r="1"/></svg><span>Use Face ID, Touch ID, or device PIN</span></div>
|
|
565
|
+
<label class="glass-checkbox"><input type="checkbox" id="remember-wallet-password" checked><span class="checkmark"></span><span>Remember wallet</span></label>
|
|
566
|
+
<div class="remember-options" id="remember-options-password">
|
|
567
|
+
<div class="remember-method-selector"><button type="button" class="remember-method-btn active" data-method="pin" data-target="password">PIN</button><button type="button" class="remember-method-btn" data-method="passkey" data-target="password" id="passkey-btn-password">Passkey</button></div>
|
|
568
|
+
<div class="pin-input-group" id="pin-group-password"><input type="password" id="pin-input-password" class="glass-input pin-input" placeholder="6-digit PIN" maxlength="6" inputmode="numeric" pattern="[0-9]*"></div>
|
|
569
|
+
<div class="passkey-info" id="passkey-info-password" style="display: none;"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2a5 5 0 0 1 5 5v3H7V7a5 5 0 0 1 5-5z"/><rect x="3" y="10" width="18" height="12" rx="2"/><circle cx="12" cy="16" r="1"/></svg><span>Use Face ID, Touch ID, or device PIN</span></div>
|
|
570
570
|
</div>
|
|
571
571
|
</div>
|
|
572
572
|
<button id="derive-from-password" class="glass-btn primary full-width" disabled type="button">Login</button>
|
|
@@ -574,11 +574,11 @@ export function getModalHTML() {
|
|
|
574
574
|
<div id="seed-method" class="method-content">
|
|
575
575
|
<div class="glass-input-group"><textarea id="seed-phrase" class="glass-input glass-textarea" rows="3" placeholder="Enter 12 or 24 word seed phrase..."></textarea><div class="seed-actions"><button id="generate-seed" class="glass-btn small">Generate</button><button id="validate-seed" class="glass-btn small">Validate</button></div></div>
|
|
576
576
|
<div class="remember-wallet-group">
|
|
577
|
-
<label class="glass-checkbox"><input type="checkbox" id="remember-wallet-seed"><span class="checkmark"></span><span>Remember wallet</span></label>
|
|
578
|
-
<div class="remember-options" id="remember-options-seed"
|
|
579
|
-
<div class="remember-method-selector"><button type="button" class="remember-method-btn" data-method="pin" data-target="seed">PIN</button><button type="button" class="remember-method-btn
|
|
580
|
-
<div class="pin-input-group" id="pin-group-seed"
|
|
581
|
-
<div class="passkey-info" id="passkey-info-seed"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2a5 5 0 0 1 5 5v3H7V7a5 5 0 0 1 5-5z"/><rect x="3" y="10" width="18" height="12" rx="2"/><circle cx="12" cy="16" r="1"/></svg><span>Use Face ID, Touch ID, or device PIN</span></div>
|
|
577
|
+
<label class="glass-checkbox"><input type="checkbox" id="remember-wallet-seed" checked><span class="checkmark"></span><span>Remember wallet</span></label>
|
|
578
|
+
<div class="remember-options" id="remember-options-seed">
|
|
579
|
+
<div class="remember-method-selector"><button type="button" class="remember-method-btn active" data-method="pin" data-target="seed">PIN</button><button type="button" class="remember-method-btn" data-method="passkey" data-target="seed" id="passkey-btn-seed">Passkey</button></div>
|
|
580
|
+
<div class="pin-input-group" id="pin-group-seed"><input type="password" id="pin-input-seed" class="glass-input pin-input" placeholder="6-digit PIN" maxlength="6" inputmode="numeric" pattern="[0-9]*"></div>
|
|
581
|
+
<div class="passkey-info" id="passkey-info-seed" style="display: none;"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M12 2a5 5 0 0 1 5 5v3H7V7a5 5 0 0 1 5-5z"/><rect x="3" y="10" width="18" height="12" rx="2"/><circle cx="12" cy="16" r="1"/></svg><span>Use Face ID, Touch ID, or device PIN</span></div>
|
|
582
582
|
</div>
|
|
583
583
|
</div>
|
|
584
584
|
<button id="derive-from-seed" class="glass-btn primary full-width" disabled>Login</button>
|
package/styles/main.css
CHANGED
|
@@ -1205,35 +1205,7 @@ body:has(.modal.active) .nav-bar {
|
|
|
1205
1205
|
position: relative;
|
|
1206
1206
|
align-items: center;
|
|
1207
1207
|
min-height: 118px;
|
|
1208
|
-
padding-right:
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
.account-header-actions {
|
|
1212
|
-
position: absolute;
|
|
1213
|
-
top: 12px;
|
|
1214
|
-
right: 14px;
|
|
1215
|
-
display: flex;
|
|
1216
|
-
align-items: center;
|
|
1217
|
-
gap: 4px;
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
.account-logout-btn {
|
|
1221
|
-
width: 32px;
|
|
1222
|
-
height: 32px;
|
|
1223
|
-
display: inline-flex;
|
|
1224
|
-
align-items: center;
|
|
1225
|
-
justify-content: center;
|
|
1226
|
-
background: transparent;
|
|
1227
|
-
border: none;
|
|
1228
|
-
color: var(--white);
|
|
1229
|
-
cursor: pointer;
|
|
1230
|
-
padding: 0;
|
|
1231
|
-
transition: color 0.2s, opacity 0.2s;
|
|
1232
|
-
}
|
|
1233
|
-
|
|
1234
|
-
.account-logout-btn:hover {
|
|
1235
|
-
color: var(--white-80);
|
|
1236
|
-
opacity: 0.9;
|
|
1208
|
+
padding-right: 56px;
|
|
1237
1209
|
}
|
|
1238
1210
|
|
|
1239
1211
|
.account-wallet-row {
|
|
@@ -1269,11 +1241,12 @@ body:has(.modal.active) .nav-bar {
|
|
|
1269
1241
|
.account-wallet-balance-line {
|
|
1270
1242
|
display: flex;
|
|
1271
1243
|
align-items: center;
|
|
1272
|
-
gap:
|
|
1244
|
+
gap: 16px;
|
|
1273
1245
|
}
|
|
1274
1246
|
|
|
1275
1247
|
.account-wallet-summary .ph-portfolio-value {
|
|
1276
1248
|
color: #4ade80;
|
|
1249
|
+
font-size: 25px;
|
|
1277
1250
|
}
|
|
1278
1251
|
|
|
1279
1252
|
.account-wallet-summary .ph-portfolio-label {
|
|
@@ -1320,7 +1293,9 @@ body:has(.modal.active) .nav-bar {
|
|
|
1320
1293
|
}
|
|
1321
1294
|
|
|
1322
1295
|
.account-modal-close {
|
|
1323
|
-
position:
|
|
1296
|
+
position: absolute;
|
|
1297
|
+
top: 12px;
|
|
1298
|
+
right: 14px;
|
|
1324
1299
|
}
|
|
1325
1300
|
|
|
1326
1301
|
.modal-body {
|
package/styles/widget.css
CHANGED
|
@@ -1207,35 +1207,7 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
1207
1207
|
position: relative;
|
|
1208
1208
|
align-items: center;
|
|
1209
1209
|
min-height: 118px;
|
|
1210
|
-
padding-right:
|
|
1211
|
-
}
|
|
1212
|
-
|
|
1213
|
-
#hd-wallet-ui-container .account-header-actions {
|
|
1214
|
-
position: absolute;
|
|
1215
|
-
top: 12px;
|
|
1216
|
-
right: 14px;
|
|
1217
|
-
display: flex;
|
|
1218
|
-
align-items: center;
|
|
1219
|
-
gap: 4px;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
#hd-wallet-ui-container .account-logout-btn {
|
|
1223
|
-
width: 32px;
|
|
1224
|
-
height: 32px;
|
|
1225
|
-
display: inline-flex;
|
|
1226
|
-
align-items: center;
|
|
1227
|
-
justify-content: center;
|
|
1228
|
-
background: transparent;
|
|
1229
|
-
border: none;
|
|
1230
|
-
color: var(--white);
|
|
1231
|
-
cursor: pointer;
|
|
1232
|
-
padding: 0;
|
|
1233
|
-
transition: color 0.2s, opacity 0.2s;
|
|
1234
|
-
}
|
|
1235
|
-
|
|
1236
|
-
#hd-wallet-ui-container .account-logout-btn:hover {
|
|
1237
|
-
color: var(--white-80);
|
|
1238
|
-
opacity: 0.9;
|
|
1210
|
+
padding-right: 56px;
|
|
1239
1211
|
}
|
|
1240
1212
|
|
|
1241
1213
|
#hd-wallet-ui-container .account-wallet-row {
|
|
@@ -1271,11 +1243,12 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
1271
1243
|
#hd-wallet-ui-container .account-wallet-balance-line {
|
|
1272
1244
|
display: flex;
|
|
1273
1245
|
align-items: center;
|
|
1274
|
-
gap:
|
|
1246
|
+
gap: 16px;
|
|
1275
1247
|
}
|
|
1276
1248
|
|
|
1277
1249
|
#hd-wallet-ui-container .account-wallet-summary .ph-portfolio-value {
|
|
1278
1250
|
color: #4ade80;
|
|
1251
|
+
font-size: 25px;
|
|
1279
1252
|
}
|
|
1280
1253
|
|
|
1281
1254
|
#hd-wallet-ui-container .account-wallet-summary .ph-portfolio-label {
|
|
@@ -1322,7 +1295,9 @@ body:has(#hd-wallet-ui-container .modal.active) #hd-wallet-ui-container .nav-bar
|
|
|
1322
1295
|
}
|
|
1323
1296
|
|
|
1324
1297
|
#hd-wallet-ui-container .account-modal-close {
|
|
1325
|
-
position:
|
|
1298
|
+
position: absolute;
|
|
1299
|
+
top: 12px;
|
|
1300
|
+
right: 14px;
|
|
1326
1301
|
}
|
|
1327
1302
|
|
|
1328
1303
|
#hd-wallet-ui-container .modal-body {
|