@sparkvault/sdk-js 15.15.0 → 15.15.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.
- package/dist/index.cjs +40 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +40 -23
- package/dist/index.mjs.map +1 -1
- package/dist/products/identity/views/sms-consent.d.ts +2 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4051,6 +4051,9 @@ class LoadingView {
|
|
|
4051
4051
|
/** The terms of service, published once, on the marketing site. */
|
|
4052
4052
|
const TERMS_URL = 'https://sparkvault.com/terms/';
|
|
4053
4053
|
|
|
4054
|
+
/** The privacy policy, published once, on the marketing site. */
|
|
4055
|
+
const PRIVACY_URL = 'https://sparkvault.com/privacy/';
|
|
4056
|
+
|
|
4054
4057
|
/**
|
|
4055
4058
|
* Beside every field where a person enters a phone number SparkVault texts or
|
|
4056
4059
|
* calls (the sign-in field and the backup phone of Identity's sign-in, in
|
|
@@ -4059,17 +4062,26 @@ const TERMS_URL = 'https://sparkvault.com/terms/';
|
|
|
4059
4062
|
* text or a call: a phone number the sign-in was handed reaches the picker
|
|
4060
4063
|
* without passing the field. The terms take the consent from whoever provides
|
|
4061
4064
|
* the number, so the words fit a number typed and a number handed over alike.
|
|
4062
|
-
*
|
|
4063
|
-
*
|
|
4064
|
-
*
|
|
4065
|
-
*
|
|
4065
|
+
* A carrier approves the number SparkVault texts from only when this line, its
|
|
4066
|
+
* call to action, names the service, the consent, how often messages come,
|
|
4067
|
+
* that rates may apply, how to opt out and get help, and links the terms and
|
|
4068
|
+
* the privacy policy, so it says each of them. It agrees with the terms' SMS
|
|
4069
|
+
* and voice disclosures and the privacy policy (apps/www/terms.md 15,
|
|
4070
|
+
* apps/www/privacy.md 1.1, held to them by
|
|
4071
|
+
* apps/www/tests/consent-lines.test.mjs): texts carry the codes, alerts and
|
|
4072
|
+
* notifications they name and calls only the codes, STOP opts the number out,
|
|
4073
|
+
* HELP answers, frequency varies, rates may apply, and where texts and calls
|
|
4074
|
+
* go and how to opt back in (START or UNSTOP) are the terms' to say.
|
|
4066
4075
|
*/
|
|
4067
4076
|
const SMS_CONSENT = Object.freeze({
|
|
4068
|
-
beforeTerms: 'By providing a phone number, you agree to receive verification codes and account
|
|
4077
|
+
beforeTerms: 'By providing a phone number, you agree to receive texts from SparkVault with verification codes, security alerts and account notifications, and automated calls with verification codes, as its ',
|
|
4069
4078
|
terms: 'Terms',
|
|
4070
|
-
|
|
4079
|
+
beforePrivacy: ' and ',
|
|
4080
|
+
privacy: 'Privacy Policy',
|
|
4081
|
+
afterPrivacy: ' describe. Message frequency varies. Message and data rates may apply. Reply STOP to opt out or HELP for help.'
|
|
4071
4082
|
});
|
|
4072
4083
|
|
|
4084
|
+
/* global HTMLAnchorElement */
|
|
4073
4085
|
/**
|
|
4074
4086
|
* SMS and Voice Consent
|
|
4075
4087
|
*
|
|
@@ -4079,8 +4091,19 @@ const SMS_CONSENT = Object.freeze({
|
|
|
4079
4091
|
* under the method picker wherever it offers a text or a call. It describes
|
|
4080
4092
|
* the field or the methods above it, so a screen reader reads it with them.
|
|
4081
4093
|
*/
|
|
4094
|
+
/** A document the line names, linked in place and opening in a new tab. */
|
|
4095
|
+
function documentLink(name, href) {
|
|
4096
|
+
const link = document.createElement('a');
|
|
4097
|
+
link.className = 'sv-sms-consent-link';
|
|
4098
|
+
link.href = href;
|
|
4099
|
+
link.target = '_blank';
|
|
4100
|
+
link.rel = 'noopener noreferrer';
|
|
4101
|
+
link.textContent = name;
|
|
4102
|
+
return link;
|
|
4103
|
+
}
|
|
4082
4104
|
/**
|
|
4083
|
-
* The consent line, its "Terms"
|
|
4105
|
+
* The consent line, its "Terms" and "Privacy Policy" opening those documents
|
|
4106
|
+
* in a new tab.
|
|
4084
4107
|
*
|
|
4085
4108
|
* @param id - The line's id, which the field or each method names in its `aria-describedby`
|
|
4086
4109
|
*/
|
|
@@ -4088,13 +4111,7 @@ function smsConsent(id) {
|
|
|
4088
4111
|
const line = document.createElement('p');
|
|
4089
4112
|
line.className = 'sv-sms-consent';
|
|
4090
4113
|
line.id = id;
|
|
4091
|
-
|
|
4092
|
-
terms.className = 'sv-sms-consent-link';
|
|
4093
|
-
terms.href = TERMS_URL;
|
|
4094
|
-
terms.target = '_blank';
|
|
4095
|
-
terms.rel = 'noopener noreferrer';
|
|
4096
|
-
terms.textContent = SMS_CONSENT.terms;
|
|
4097
|
-
line.append(SMS_CONSENT.beforeTerms, terms, SMS_CONSENT.afterTerms);
|
|
4114
|
+
line.append(SMS_CONSENT.beforeTerms, documentLink(SMS_CONSENT.terms, TERMS_URL), SMS_CONSENT.beforePrivacy, documentLink(SMS_CONSENT.privacy, PRIVACY_URL), SMS_CONSENT.afterPrivacy);
|
|
4098
4115
|
return line;
|
|
4099
4116
|
}
|
|
4100
4117
|
|
|
@@ -8261,7 +8278,7 @@ function getStyles(options) {
|
|
|
8261
8278
|
};
|
|
8262
8279
|
return `
|
|
8263
8280
|
/* ========================================
|
|
8264
|
-
MOTION SYSTEM
|
|
8281
|
+
MOTION SYSTEM: shared duration/easing tokens so every transition in
|
|
8265
8282
|
the flow is consistent. 120/180/280ms tiers; standard and decelerate
|
|
8266
8283
|
curves only, never overshoot.
|
|
8267
8284
|
======================================== */
|
|
@@ -8550,7 +8567,7 @@ function getStyles(options) {
|
|
|
8550
8567
|
background: ${tokens.primaryHover};
|
|
8551
8568
|
}
|
|
8552
8569
|
|
|
8553
|
-
/* Secondary Button
|
|
8570
|
+
/* Secondary Button, quiet: subtle fill, hairline border */
|
|
8554
8571
|
.sv-btn-secondary {
|
|
8555
8572
|
background: ${tokens.bgSubtle};
|
|
8556
8573
|
color: ${tokens.textPrimary};
|
|
@@ -8562,7 +8579,7 @@ function getStyles(options) {
|
|
|
8562
8579
|
border-color: ${tokens.borderHover};
|
|
8563
8580
|
}
|
|
8564
8581
|
|
|
8565
|
-
/* Method Button
|
|
8582
|
+
/* Method Button: a full-width row with a nudging chevron affordance
|
|
8566
8583
|
(added via ::after so no DOM change is needed). The card itself stays
|
|
8567
8584
|
planted: hover is a quiet fill + border shift, no translate. */
|
|
8568
8585
|
.sv-btn-method {
|
|
@@ -8642,7 +8659,7 @@ function getStyles(options) {
|
|
|
8642
8659
|
width: 100%;
|
|
8643
8660
|
}
|
|
8644
8661
|
|
|
8645
|
-
/* Bare glyph slot
|
|
8662
|
+
/* Bare glyph slot, no container chrome. Quiet slate stroke that takes
|
|
8646
8663
|
the accent on row hover. */
|
|
8647
8664
|
.sv-method-icon {
|
|
8648
8665
|
width: 20px;
|
|
@@ -8911,8 +8928,8 @@ function getStyles(options) {
|
|
|
8911
8928
|
}
|
|
8912
8929
|
|
|
8913
8930
|
/* The SMS and voice consent under a phone number field: fine print in the
|
|
8914
|
-
secondary ink, its
|
|
8915
|
-
without a second color. */
|
|
8931
|
+
secondary ink, its links underlined in the same ink so each reads as a
|
|
8932
|
+
link without a second color. */
|
|
8916
8933
|
.sv-sms-consent {
|
|
8917
8934
|
margin: 8px 0 0;
|
|
8918
8935
|
font-size: 12px;
|
|
@@ -9371,7 +9388,7 @@ function getStyles(options) {
|
|
|
9371
9388
|
margin-bottom: 16px;
|
|
9372
9389
|
}
|
|
9373
9390
|
|
|
9374
|
-
/* Bare glyph
|
|
9391
|
+
/* Bare glyph, no tinted circle container. */
|
|
9375
9392
|
.sv-sparklink-icon {
|
|
9376
9393
|
width: 48px;
|
|
9377
9394
|
height: 48px;
|
|
@@ -11162,7 +11179,7 @@ class IdentityModule {
|
|
|
11162
11179
|
throw new ValidationError('Invalid OAuth state');
|
|
11163
11180
|
}
|
|
11164
11181
|
if (!codeVerifier) {
|
|
11165
|
-
throw new ValidationError('Sign-in session was lost
|
|
11182
|
+
throw new ValidationError('Sign-in session was lost. Please sign in again.');
|
|
11166
11183
|
}
|
|
11167
11184
|
// WHICH account the code carries is settled where it is minted, never
|
|
11168
11185
|
// here: the code is PKCE- and origin-bound to this tab, and a recovery
|
|
@@ -27085,7 +27102,7 @@ class SparkVault {
|
|
|
27085
27102
|
}
|
|
27086
27103
|
/** Get the SDK version */
|
|
27087
27104
|
static get version() {
|
|
27088
|
-
return '15.15.
|
|
27105
|
+
return '15.15.1';
|
|
27089
27106
|
}
|
|
27090
27107
|
}
|
|
27091
27108
|
if (typeof window !== 'undefined') {
|