@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.
- package/README.md +2 -1
- package/dist/sparkvault.cjs.js +55 -37
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +55 -37
- package/dist/sparkvault.esm.js.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/sparkvault.esm.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
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
|
-
|
|
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
|
-
|
|
6154
|
-
code: 'sparklink_csp_blocked',
|
|
6172
|
+
...SPARKLINK_CSP_BLOCKED_ERROR,
|
|
6155
6173
|
});
|
|
6156
6174
|
}
|
|
6157
6175
|
else {
|