@sparkvault/sdk-js 1.27.0 → 1.27.2

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.
@@ -2722,7 +2722,7 @@ function getStyles(options) {
2722
2722
 
2723
2723
  .sv-not-activated-badge-svg {
2724
2724
  display: block;
2725
- filter: drop-shadow(0 6px 14px rgba(245, 158, 11, 0.18));
2725
+ filter: drop-shadow(0 8px 18px rgba(15, 23, 42, 0.08));
2726
2726
  }
2727
2727
 
2728
2728
  .sv-not-activated-title {
@@ -5049,41 +5049,54 @@ const ACTIVATION_URL = 'https://app.sparkvault.com/products/identity';
5049
5049
  function createBadge() {
5050
5050
  const badge = div('sv-not-activated-badge');
5051
5051
  const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
5052
- svg.setAttribute('viewBox', '0 0 56 56');
5052
+ svg.setAttribute('viewBox', '0 0 64 64');
5053
5053
  svg.setAttribute('width', '72');
5054
5054
  svg.setAttribute('height', '72');
5055
5055
  svg.setAttribute('fill', 'none');
5056
+ svg.setAttribute('aria-hidden', 'true');
5056
5057
  svg.classList.add('sv-not-activated-badge-svg');
5057
- // Soft outer ring
5058
- const ring = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
5059
- ring.setAttribute('cx', '28');
5060
- ring.setAttribute('cy', '28');
5061
- ring.setAttribute('r', '27');
5062
- ring.setAttribute('fill', '#FFFBEB');
5063
- ring.setAttribute('stroke', '#FDE68A');
5064
- ring.setAttribute('stroke-width', '1');
5065
- svg.appendChild(ring);
5066
- // Shield body
5067
- const shield = document.createElementNS('http://www.w3.org/2000/svg', 'path');
5068
- shield.setAttribute('d', 'M28 13l-10 4.2v8.6c0 6.7 4.27 12.95 10 14.4 5.73-1.45 10-7.7 10-14.4v-8.6L28 13z');
5069
- shield.setAttribute('fill', '#F59E0B');
5070
- svg.appendChild(shield);
5071
- // Exclamation bar
5072
- const bar = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
5073
- bar.setAttribute('x', '26.6');
5074
- bar.setAttribute('y', '20');
5075
- bar.setAttribute('width', '2.8');
5076
- bar.setAttribute('height', '10');
5077
- bar.setAttribute('rx', '1.4');
5078
- bar.setAttribute('fill', '#FFFFFF');
5079
- svg.appendChild(bar);
5080
- // Exclamation dot
5081
- const dot = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
5082
- dot.setAttribute('cx', '28');
5083
- dot.setAttribute('cy', '34');
5084
- dot.setAttribute('r', '1.6');
5085
- dot.setAttribute('fill', '#FFFFFF');
5086
- svg.appendChild(dot);
5058
+ const surface = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
5059
+ surface.setAttribute('cx', '32');
5060
+ surface.setAttribute('cy', '32');
5061
+ surface.setAttribute('r', '29.5');
5062
+ surface.setAttribute('fill', '#F8FAFC');
5063
+ surface.setAttribute('stroke', '#E2E8F0');
5064
+ surface.setAttribute('stroke-width', '1');
5065
+ svg.appendChild(surface);
5066
+ const panel = document.createElementNS('http://www.w3.org/2000/svg', 'rect');
5067
+ panel.setAttribute('x', '18.5');
5068
+ panel.setAttribute('y', '18.5');
5069
+ panel.setAttribute('width', '27');
5070
+ panel.setAttribute('height', '27');
5071
+ panel.setAttribute('rx', '7');
5072
+ panel.setAttribute('fill', '#FFFFFF');
5073
+ panel.setAttribute('stroke', '#CBD5E1');
5074
+ panel.setAttribute('stroke-width', '1');
5075
+ svg.appendChild(panel);
5076
+ const createLine = (y, x2) => {
5077
+ const line = document.createElementNS('http://www.w3.org/2000/svg', 'path');
5078
+ line.setAttribute('d', `M24 ${y}H${x2}`);
5079
+ line.setAttribute('stroke', '#475569');
5080
+ line.setAttribute('stroke-width', '2');
5081
+ line.setAttribute('stroke-linecap', 'round');
5082
+ svg.appendChild(line);
5083
+ };
5084
+ createLine('26', '40');
5085
+ createLine('32', '40');
5086
+ createLine('38', '35');
5087
+ const createKnob = (cx, cy) => {
5088
+ const knob = document.createElementNS('http://www.w3.org/2000/svg', 'circle');
5089
+ knob.setAttribute('cx', cx);
5090
+ knob.setAttribute('cy', cy);
5091
+ knob.setAttribute('r', '2.5');
5092
+ knob.setAttribute('fill', '#4F46E5');
5093
+ knob.setAttribute('stroke', '#FFFFFF');
5094
+ knob.setAttribute('stroke-width', '1.5');
5095
+ svg.appendChild(knob);
5096
+ };
5097
+ createKnob('30', '26');
5098
+ createKnob('36', '32');
5099
+ createKnob('28', '38');
5087
5100
  badge.appendChild(svg);
5088
5101
  return badge;
5089
5102
  }
@@ -5195,6 +5208,14 @@ class ProductNotConfiguredView {
5195
5208
  * Orchestrates view state and rendering for identity verification flows.
5196
5209
  * Uses extracted handlers for TOTP and Passkey operations.
5197
5210
  */
5211
+ const SPARKLINK_CSP_BLOCKED_ERROR = {
5212
+ message: [
5213
+ 'Connection blocked by security policy.',
5214
+ 'Please contact the site administrator to add wss://ws.sparkvault.com',
5215
+ 'to the Content-Security-Policy connect-src directive.',
5216
+ ].join(' '),
5217
+ code: 'sparklink_csp_blocked',
5218
+ };
5198
5219
  class IdentityRenderer {
5199
5220
  constructor(container, api, options, callbacks) {
5200
5221
  // View management
@@ -5234,7 +5255,6 @@ class IdentityRenderer {
5234
5255
  this.callbacks.onSuccess(result);
5235
5256
  }
5236
5257
  catch (err) {
5237
- // eslint-disable-next-line no-console
5238
5258
  console.warn('[SparkVault SDK] onSuccess threw, continuing to redirect', err);
5239
5259
  }
5240
5260
  }
@@ -5641,8 +5661,7 @@ class IdentityRenderer {
5641
5661
  // CSP blocking WebSocket - provide developer-friendly error
5642
5662
  this.setState({
5643
5663
  view: 'error',
5644
- message: 'Connection blocked by security policy. Please contact the site administrator to add wss://*.sparkvault.com to the Content-Security-Policy connect-src directive.',
5645
- code: 'sparklink_csp_blocked',
5664
+ ...SPARKLINK_CSP_BLOCKED_ERROR,
5646
5665
  });
5647
5666
  }
5648
5667
  else {
@@ -6150,8 +6169,7 @@ class IdentityRenderer {
6150
6169
  if (wsResult.error === 'csp') {
6151
6170
  this.setState({
6152
6171
  view: 'error',
6153
- message: 'Connection blocked by security policy. Please contact the site administrator to add wss://*.sparkvault.com to the Content-Security-Policy connect-src directive.',
6154
- code: 'sparklink_csp_blocked',
6172
+ ...SPARKLINK_CSP_BLOCKED_ERROR,
6155
6173
  });
6156
6174
  }
6157
6175
  else {