@sparkvault/sdk-js 15.14.0 → 15.14.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 +50 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +50 -36
- package/dist/index.mjs.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vaults/upload/modal.d.ts +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -23013,11 +23013,6 @@ function getUploadStyles() {
|
|
|
23013
23013
|
overflow: hidden;
|
|
23014
23014
|
}
|
|
23015
23015
|
|
|
23016
|
-
.svu-modal.svu-with-sidebar {
|
|
23017
|
-
max-width: 900px;
|
|
23018
|
-
flex-direction: row;
|
|
23019
|
-
}
|
|
23020
|
-
|
|
23021
23016
|
.svu-modal-main {
|
|
23022
23017
|
flex: 1;
|
|
23023
23018
|
display: flex;
|
|
@@ -23781,13 +23776,38 @@ function getUploadStyles() {
|
|
|
23781
23776
|
}
|
|
23782
23777
|
|
|
23783
23778
|
/* ========================================
|
|
23784
|
-
SECURITY
|
|
23779
|
+
ON-DEMAND SECURITY HELP
|
|
23785
23780
|
======================================== */
|
|
23786
23781
|
|
|
23782
|
+
.svu-security-help {
|
|
23783
|
+
flex-shrink: 0;
|
|
23784
|
+
border-top: 1px solid ${tokens.borderDark};
|
|
23785
|
+
}
|
|
23786
|
+
|
|
23787
|
+
.svu-security-help summary {
|
|
23788
|
+
display: flex;
|
|
23789
|
+
align-items: center;
|
|
23790
|
+
justify-content: center;
|
|
23791
|
+
width: 44px;
|
|
23792
|
+
min-height: 44px;
|
|
23793
|
+
margin-left: auto;
|
|
23794
|
+
cursor: pointer;
|
|
23795
|
+
color: ${tokens.textMutedOnDark};
|
|
23796
|
+
font-size: 16px;
|
|
23797
|
+
list-style: none;
|
|
23798
|
+
}
|
|
23799
|
+
|
|
23800
|
+
.svu-security-help summary::-webkit-details-marker { display: none; }
|
|
23801
|
+
.svu-security-help summary:focus-visible {
|
|
23802
|
+
outline: 2px solid ${tokens.textOnDark};
|
|
23803
|
+
outline-offset: -4px;
|
|
23804
|
+
}
|
|
23805
|
+
|
|
23787
23806
|
.svu-sidebar {
|
|
23788
|
-
|
|
23807
|
+
box-sizing: border-box;
|
|
23808
|
+
width: 100%;
|
|
23809
|
+
max-height: 240px;
|
|
23789
23810
|
background: ${tokens.bgDark};
|
|
23790
|
-
border-left: 1px solid ${tokens.borderDark};
|
|
23791
23811
|
color: ${tokens.textOnDark};
|
|
23792
23812
|
padding: 20px;
|
|
23793
23813
|
overflow-y: auto;
|
|
@@ -23957,20 +23977,6 @@ function getUploadStyles() {
|
|
|
23957
23977
|
RESPONSIVE
|
|
23958
23978
|
======================================== */
|
|
23959
23979
|
|
|
23960
|
-
@media (max-width: 768px) {
|
|
23961
|
-
.svu-modal.svu-with-sidebar {
|
|
23962
|
-
flex-direction: column;
|
|
23963
|
-
max-width: 480px;
|
|
23964
|
-
}
|
|
23965
|
-
|
|
23966
|
-
.svu-sidebar {
|
|
23967
|
-
width: 100%;
|
|
23968
|
-
border-left: none;
|
|
23969
|
-
border-top: 1px solid ${tokens.borderDark};
|
|
23970
|
-
max-height: 300px;
|
|
23971
|
-
}
|
|
23972
|
-
}
|
|
23973
|
-
|
|
23974
23980
|
@media (max-width: 480px) {
|
|
23975
23981
|
.svu-modal {
|
|
23976
23982
|
max-width: 100%;
|
|
@@ -24038,7 +24044,7 @@ function getUploadStyles() {
|
|
|
24038
24044
|
* Upload Modal Container
|
|
24039
24045
|
*
|
|
24040
24046
|
* Single responsibility: the upload dialog's chrome (branded header, body,
|
|
24041
|
-
* footer, and
|
|
24047
|
+
* footer, and optional security help) inside the SDK's shared
|
|
24042
24048
|
* modal shell, which owns the dialog behaviour (dismissal, scroll lock,
|
|
24043
24049
|
* focus). Does NOT handle content rendering - that's the Renderer's job.
|
|
24044
24050
|
*/
|
|
@@ -24127,25 +24133,33 @@ class UploadModalContainer {
|
|
|
24127
24133
|
this.refreshHeader();
|
|
24128
24134
|
}
|
|
24129
24135
|
/**
|
|
24130
|
-
*
|
|
24131
|
-
* the
|
|
24136
|
+
* Offer security education on demand during a transfer. Never expand it
|
|
24137
|
+
* automatically or widen the working view to accommodate explanatory copy.
|
|
24132
24138
|
*/
|
|
24133
24139
|
toggleSidebar(show) {
|
|
24134
24140
|
if (!this.shell)
|
|
24135
24141
|
return;
|
|
24136
24142
|
if (show && !this.sidebar) {
|
|
24137
|
-
this.sidebar =
|
|
24138
|
-
this.
|
|
24139
|
-
|
|
24140
|
-
|
|
24141
|
-
|
|
24143
|
+
this.sidebar = document.createElement('details');
|
|
24144
|
+
this.sidebar.className = 'svu-security-help';
|
|
24145
|
+
const summary = document.createElement('summary');
|
|
24146
|
+
summary.textContent = '?';
|
|
24147
|
+
summary.setAttribute('aria-label', 'About upload security');
|
|
24148
|
+
summary.title = 'About upload security';
|
|
24149
|
+
this.sidebar.append(summary, createSecuritySidebar(this.branding));
|
|
24150
|
+
this.sidebar.addEventListener('keydown', (event) => {
|
|
24151
|
+
if (event.key !== 'Escape' || !this.sidebar?.open)
|
|
24152
|
+
return;
|
|
24153
|
+
event.preventDefault();
|
|
24154
|
+
event.stopPropagation();
|
|
24155
|
+
this.sidebar.open = false;
|
|
24156
|
+
summary.focus();
|
|
24157
|
+
});
|
|
24158
|
+
this.body?.after(this.sidebar);
|
|
24142
24159
|
}
|
|
24143
24160
|
else if (!show && this.sidebar) {
|
|
24144
|
-
this.shell.modal.classList.remove('svu-with-sidebar');
|
|
24145
24161
|
this.sidebar.remove();
|
|
24146
24162
|
this.sidebar = null;
|
|
24147
|
-
if (this.header)
|
|
24148
|
-
this.header.style.display = '';
|
|
24149
24163
|
}
|
|
24150
24164
|
}
|
|
24151
24165
|
handleClose() {
|
|
@@ -24543,7 +24557,7 @@ class UploadRenderer {
|
|
|
24543
24557
|
return;
|
|
24544
24558
|
// Clear body
|
|
24545
24559
|
body.innerHTML = '';
|
|
24546
|
-
// The dialog darkens and
|
|
24560
|
+
// The dialog darkens and offers optional security help in the dark states;
|
|
24547
24561
|
// inline mode runs those states in its own dialog (renderInModal).
|
|
24548
24562
|
if (this.container instanceof UploadModalContainer) {
|
|
24549
24563
|
this.container.setDarkMode(isDarkState);
|
|
@@ -24629,7 +24643,7 @@ class UploadRenderer {
|
|
|
24629
24643
|
if (inlineBody?.parentElement) {
|
|
24630
24644
|
inlineBody.parentElement.style.display = 'none';
|
|
24631
24645
|
}
|
|
24632
|
-
// Set dark mode and
|
|
24646
|
+
// Set dark mode and offer security help once, closed until requested.
|
|
24633
24647
|
this.uploadModal.setDarkMode(true);
|
|
24634
24648
|
this.uploadModal.toggleSidebar(true);
|
|
24635
24649
|
this.hybridModalInitialized = true;
|
|
@@ -26644,7 +26658,7 @@ class SparkVault {
|
|
|
26644
26658
|
}
|
|
26645
26659
|
/** Get the SDK version */
|
|
26646
26660
|
static get version() {
|
|
26647
|
-
return '15.14.
|
|
26661
|
+
return '15.14.1';
|
|
26648
26662
|
}
|
|
26649
26663
|
}
|
|
26650
26664
|
if (typeof window !== 'undefined') {
|