@sparkvault/sdk 1.10.1 → 1.11.0
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.d.ts +2 -0
- package/dist/sparkvault.cjs.js +11 -1
- package/dist/sparkvault.cjs.js.map +1 -1
- package/dist/sparkvault.esm.js +11 -1
- package/dist/sparkvault.esm.js.map +1 -1
- package/dist/sparkvault.js +1 -1
- package/dist/sparkvault.js.map +1 -1
- package/dist/vaults/upload/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -398,6 +398,8 @@ interface UploadOptions {
|
|
|
398
398
|
target?: string | HTMLElement;
|
|
399
399
|
/** Override backdrop blur for this dialog (uses global config if omitted) */
|
|
400
400
|
backdropBlur?: boolean;
|
|
401
|
+
/** Hide "Upload Another File" button on success screen (for single-file flows) */
|
|
402
|
+
hideUploadAnother?: boolean;
|
|
401
403
|
/** Callback when upload completes successfully (if omitted, uses server-configured redirect) */
|
|
402
404
|
onSuccess?: (result: UploadResult) => void;
|
|
403
405
|
/** Callback when an error occurs (if omitted, uses server-configured redirect) */
|
package/dist/sparkvault.cjs.js
CHANGED
|
@@ -7053,12 +7053,20 @@ class UploadModalContainer {
|
|
|
7053
7053
|
this.elements.modal.classList.add('svu-with-sidebar');
|
|
7054
7054
|
this.elements.modal.appendChild(sidebar);
|
|
7055
7055
|
this.elements.sidebar = sidebar;
|
|
7056
|
+
// Hide header when sidebar is shown (sidebar has its own logo)
|
|
7057
|
+
if (this.headerElement) {
|
|
7058
|
+
this.headerElement.style.display = 'none';
|
|
7059
|
+
}
|
|
7056
7060
|
}
|
|
7057
7061
|
else if (!show && this.elements.sidebar) {
|
|
7058
7062
|
// Remove sidebar
|
|
7059
7063
|
this.elements.modal.classList.remove('svu-with-sidebar');
|
|
7060
7064
|
this.elements.sidebar.remove();
|
|
7061
7065
|
this.elements.sidebar = null;
|
|
7066
|
+
// Show header again when sidebar is hidden
|
|
7067
|
+
if (this.headerElement) {
|
|
7068
|
+
this.headerElement.style.display = '';
|
|
7069
|
+
}
|
|
7062
7070
|
}
|
|
7063
7071
|
}
|
|
7064
7072
|
createSecuritySidebar() {
|
|
@@ -7996,6 +8004,7 @@ class UploadRenderer {
|
|
|
7996
8004
|
from their SparkVault dashboard. Save the Ingot ID above for your records.
|
|
7997
8005
|
</p>
|
|
7998
8006
|
|
|
8007
|
+
${this.options.hideUploadAnother ? '' : `
|
|
7999
8008
|
<button class="svu-btn svu-btn-secondary">
|
|
8000
8009
|
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
8001
8010
|
<path d="M1 4v6h6M23 20v-6h-6"/>
|
|
@@ -8003,6 +8012,7 @@ class UploadRenderer {
|
|
|
8003
8012
|
</svg>
|
|
8004
8013
|
Upload Another File
|
|
8005
8014
|
</button>
|
|
8015
|
+
`}
|
|
8006
8016
|
`;
|
|
8007
8017
|
// Copy button handler
|
|
8008
8018
|
const copyBtn = div.querySelector('.svu-copy-btn');
|
|
@@ -8011,7 +8021,7 @@ class UploadRenderer {
|
|
|
8011
8021
|
navigator.clipboard.writeText(result.ingotId);
|
|
8012
8022
|
});
|
|
8013
8023
|
}
|
|
8014
|
-
// Upload another handler
|
|
8024
|
+
// Upload another handler (only if button exists)
|
|
8015
8025
|
const uploadAnotherBtn = div.querySelector('.svu-btn-secondary');
|
|
8016
8026
|
if (uploadAnotherBtn) {
|
|
8017
8027
|
uploadAnotherBtn.addEventListener('click', () => {
|