@sparkvault/sdk-js 1.25.0 → 1.26.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.
@@ -7149,6 +7149,8 @@ function getUploadStyles(options) {
7149
7149
  .svu-drop-icon {
7150
7150
  color: ${tokens.textMuted};
7151
7151
  margin-bottom: 12px;
7152
+ display: flex;
7153
+ justify-content: center;
7152
7154
  }
7153
7155
 
7154
7156
  .svu-drop-text {
@@ -8672,6 +8674,14 @@ class UploadRenderer {
8672
8674
  this.config = config;
8673
8675
  // Update branding
8674
8676
  this.container.updateBranding(config.branding);
8677
+ // Programmatic mode: a File was supplied, so skip the drop-zone form
8678
+ // and upload it straight away. Lets a host site own file selection
8679
+ // (its own button, picker, or drop target) and hand the File to the SDK.
8680
+ if (this.options.file) {
8681
+ this.selectedFile = this.options.file;
8682
+ await this.startUpload(config);
8683
+ return;
8684
+ }
8675
8685
  // Show form
8676
8686
  this.setState({ view: 'form', config });
8677
8687
  }
@@ -9231,6 +9241,13 @@ class UploadRenderer {
9231
9241
  percentage: 100,
9232
9242
  phase: 'complete',
9233
9243
  });
9244
+ // Silent mode: skip the success screen — fire onSuccess and close so
9245
+ // the host site can render its own post-upload UI.
9246
+ if (this.options.hideSuccessScreen) {
9247
+ this.callbacks.onSuccess(result);
9248
+ this.close();
9249
+ return;
9250
+ }
9234
9251
  this.setState({ view: 'complete', result, config });
9235
9252
  // Notify success
9236
9253
  this.callbacks.onSuccess(result);