@sparkvault/sdk 1.10.2 → 1.11.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.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) */
@@ -2080,9 +2080,7 @@ function getStyles(options) {
2080
2080
 
2081
2081
  .sv-footer {
2082
2082
  padding: 10px 20px;
2083
- border-top: 1px solid ${tokens.border};
2084
2083
  text-align: center;
2085
- background: ${tokens.bgSubtle};
2086
2084
  flex-shrink: 0;
2087
2085
  }
2088
2086
 
@@ -8004,6 +8002,7 @@ class UploadRenderer {
8004
8002
  from their SparkVault dashboard. Save the Ingot ID above for your records.
8005
8003
  </p>
8006
8004
 
8005
+ ${this.options.hideUploadAnother ? '' : `
8007
8006
  <button class="svu-btn svu-btn-secondary">
8008
8007
  <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
8009
8008
  <path d="M1 4v6h6M23 20v-6h-6"/>
@@ -8011,6 +8010,7 @@ class UploadRenderer {
8011
8010
  </svg>
8012
8011
  Upload Another File
8013
8012
  </button>
8013
+ `}
8014
8014
  `;
8015
8015
  // Copy button handler
8016
8016
  const copyBtn = div.querySelector('.svu-copy-btn');
@@ -8019,7 +8019,7 @@ class UploadRenderer {
8019
8019
  navigator.clipboard.writeText(result.ingotId);
8020
8020
  });
8021
8021
  }
8022
- // Upload another handler
8022
+ // Upload another handler (only if button exists)
8023
8023
  const uploadAnotherBtn = div.querySelector('.svu-btn-secondary');
8024
8024
  if (uploadAnotherBtn) {
8025
8025
  uploadAnotherBtn.addEventListener('click', () => {