@sparkvault/sdk 1.9.0 → 1.9.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.
@@ -5752,18 +5752,32 @@ function getUploadStyles(options) {
5752
5752
  ======================================== */
5753
5753
 
5754
5754
  .svu-overlay {
5755
- position: fixed;
5756
- inset: 0;
5755
+ /* Force full-screen overlay regardless of page styles */
5756
+ position: fixed !important;
5757
+ top: 0 !important;
5758
+ left: 0 !important;
5759
+ right: 0 !important;
5760
+ bottom: 0 !important;
5761
+ width: 100vw !important;
5762
+ height: 100vh !important;
5763
+ max-width: none !important;
5764
+ max-height: none !important;
5765
+ margin: 0 !important;
5757
5766
  background: rgba(0, 0, 0, 0.5);
5758
- display: flex;
5767
+ display: flex !important;
5759
5768
  align-items: center;
5760
5769
  justify-content: center;
5761
- z-index: 999999;
5770
+ z-index: 999999 !important;
5762
5771
  padding: 16px;
5763
5772
  box-sizing: border-box;
5764
5773
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
5765
5774
  -webkit-font-smoothing: antialiased;
5766
5775
  -moz-osx-font-smoothing: grayscale;
5776
+ /* Break out of any containing block that could affect fixed positioning */
5777
+ transform: none !important;
5778
+ filter: none !important;
5779
+ contain: none !important;
5780
+ isolation: isolate;
5767
5781
  }
5768
5782
 
5769
5783
  .svu-overlay.svu-blur {
@@ -6972,6 +6986,9 @@ class UploadModalContainer {
6972
6986
  setDarkMode(enabled) {
6973
6987
  if (!this.elements)
6974
6988
  return;
6989
+ // Skip if already in the requested mode
6990
+ if (this.isDarkMode === enabled)
6991
+ return;
6975
6992
  this.isDarkMode = enabled;
6976
6993
  if (enabled) {
6977
6994
  this.elements.modal.classList.add('svu-dark');
@@ -6979,7 +6996,7 @@ class UploadModalContainer {
6979
6996
  else {
6980
6997
  this.elements.modal.classList.remove('svu-dark');
6981
6998
  }
6982
- // Re-create header with correct logo
6999
+ // Re-create header with correct logo (only when mode actually changes)
6983
7000
  const newHeader = this.createHeader(this.branding);
6984
7001
  if (this.headerElement?.parentNode) {
6985
7002
  this.headerElement.parentNode.replaceChild(newHeader, this.headerElement);
@@ -7246,6 +7263,9 @@ class UploadInlineContainer {
7246
7263
  setDarkMode(enabled) {
7247
7264
  if (!this.container)
7248
7265
  return;
7266
+ // Skip if already in the requested mode
7267
+ if (this.isDarkMode === enabled)
7268
+ return;
7249
7269
  this.isDarkMode = enabled;
7250
7270
  if (enabled) {
7251
7271
  this.container.classList.add('svu-dark');
@@ -7253,7 +7273,7 @@ class UploadInlineContainer {
7253
7273
  else {
7254
7274
  this.container.classList.remove('svu-dark');
7255
7275
  }
7256
- // Re-create header with correct logo
7276
+ // Re-create header with correct logo (only when mode actually changes)
7257
7277
  if (this.containerOptions.showHeader && this.header) {
7258
7278
  const newHeader = this.createHeader(this.branding);
7259
7279
  this.container.replaceChild(newHeader, this.header);
@@ -7508,6 +7528,7 @@ class UploadRenderer {
7508
7528
  // Hybrid mode: modal overlay for upload/ceremony in inline mode
7509
7529
  this.uploadModal = null;
7510
7530
  this.isInlineMode = false;
7531
+ this.hybridModalInitialized = false;
7511
7532
  this.pasteHandler = null;
7512
7533
  this.container = container;
7513
7534
  this.api = api;
@@ -7548,6 +7569,7 @@ class UploadRenderer {
7548
7569
  if (this.uploadModal) {
7549
7570
  this.uploadModal.destroy();
7550
7571
  this.uploadModal = null;
7572
+ this.hybridModalInitialized = false;
7551
7573
  }
7552
7574
  this.container.destroy();
7553
7575
  }
@@ -7567,10 +7589,16 @@ class UploadRenderer {
7567
7589
  this.renderInModal();
7568
7590
  return;
7569
7591
  }
7570
- // Close modal if we're leaving upload/ceremony states
7592
+ // Close modal if we're leaving upload/ceremony states (hybrid mode complete)
7571
7593
  if (this.uploadModal) {
7572
7594
  this.uploadModal.destroy();
7573
7595
  this.uploadModal = null;
7596
+ this.hybridModalInitialized = false;
7597
+ // Restore inline container visibility
7598
+ const inlineBody = this.container.getBody();
7599
+ if (inlineBody?.parentElement) {
7600
+ inlineBody.parentElement.style.display = '';
7601
+ }
7574
7602
  }
7575
7603
  const body = this.container.getBody();
7576
7604
  if (!body)
@@ -7609,7 +7637,7 @@ class UploadRenderer {
7609
7637
  * This provides the full polished experience during upload.
7610
7638
  */
7611
7639
  renderInModal() {
7612
- // Create modal if not exists
7640
+ // Create and initialize modal only once
7613
7641
  if (!this.uploadModal) {
7614
7642
  this.uploadModal = new UploadModalContainer();
7615
7643
  this.uploadModal.createLoading({ backdropBlur: this.options.backdropBlur ?? true }, () => { } // No close callback - user can't cancel during upload
@@ -7617,15 +7645,25 @@ class UploadRenderer {
7617
7645
  if (this.config) {
7618
7646
  this.uploadModal.updateBranding(this.config.branding);
7619
7647
  }
7648
+ this.hybridModalInitialized = false;
7620
7649
  }
7621
7650
  const body = this.uploadModal.getBody();
7622
7651
  if (!body)
7623
7652
  return;
7653
+ // Initialize modal state only once (not on every progress update)
7654
+ if (!this.hybridModalInitialized) {
7655
+ // Hide inline container during hybrid mode to avoid CSS conflicts
7656
+ const inlineBody = this.container.getBody();
7657
+ if (inlineBody?.parentElement) {
7658
+ inlineBody.parentElement.style.display = 'none';
7659
+ }
7660
+ // Set dark mode and show sidebar once
7661
+ this.uploadModal.setDarkMode(true);
7662
+ this.uploadModal.toggleSidebar(true);
7663
+ this.hybridModalInitialized = true;
7664
+ }
7624
7665
  // Clear and render current state
7625
7666
  body.innerHTML = '';
7626
- // Set dark mode and show sidebar
7627
- this.uploadModal.setDarkMode(true);
7628
- this.uploadModal.toggleSidebar(true);
7629
7667
  if (this.viewState.view === 'uploading') {
7630
7668
  body.appendChild(this.renderUploading(this.viewState));
7631
7669
  }