@gradio/upload 0.11.4 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,30 @@
1
1
  # @gradio/upload
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Features
6
+
7
+ - [#8803](https://github.com/gradio-app/gradio/pull/8803) [`e1a4040`](https://github.com/gradio-app/gradio/commit/e1a404093cfaf9d8f2a92bc1d28fb6aa254848d1) - Ensure all upload components have consistent upload regions. Thanks @pngwn!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/wasm@0.12.0
12
+ - @gradio/client@1.4.0
13
+ - @gradio/atoms@0.7.7
14
+
15
+ ## 0.11.5
16
+
17
+ ### Fixes
18
+
19
+ - [#8714](https://github.com/gradio-app/gradio/pull/8714) [`1b5b5b0`](https://github.com/gradio-app/gradio/commit/1b5b5b0b43e69ee84f3baad2aae59ffc9c4d995a) - Bind `fetch` and `stream` in JS client. Thanks @hannahblair!
20
+
21
+ ### Dependency updates
22
+
23
+ - @gradio/atoms@0.7.6
24
+ - @gradio/utils@0.5.1
25
+ - @gradio/client@1.3.0
26
+ - @gradio/icons@0.6.0
27
+
3
28
  ## 0.11.4
4
29
 
5
30
  ### Fixes
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@gradio/upload",
3
- "version": "0.11.4",
3
+ "version": "0.12.0",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
7
7
  "author": "",
8
8
  "license": "ISC",
9
9
  "dependencies": {
10
- "@gradio/atoms": "^0.7.5",
11
- "@gradio/icons": "^0.5.0",
12
- "@gradio/utils": "^0.5.0",
13
- "@gradio/client": "^1.2.1",
14
- "@gradio/wasm": "^0.11.0"
10
+ "@gradio/icons": "^0.6.0",
11
+ "@gradio/utils": "^0.5.1",
12
+ "@gradio/atoms": "^0.7.7",
13
+ "@gradio/wasm": "^0.12.0",
14
+ "@gradio/client": "^1.4.0"
15
15
  },
16
16
  "main_changeset": true,
17
17
  "exports": {
package/src/Upload.svelte CHANGED
@@ -183,7 +183,16 @@
183
183
  dispatch("error", `Invalid file type only ${filetype} allowed.`);
184
184
  return false;
185
185
  });
186
- await load_files(files_to_load);
186
+
187
+ if (format != "blob") {
188
+ await load_files(files_to_load);
189
+ } else {
190
+ if (file_count === "single") {
191
+ dispatch("load", files_to_load[0]);
192
+ return;
193
+ }
194
+ dispatch("load", files_to_load);
195
+ }
187
196
  }
188
197
  </script>
189
198
 
@@ -50,6 +50,7 @@
50
50
  const _data = JSON.parse(event.data);
51
51
  if (!progress) progress = true;
52
52
  if (_data.msg === "done") {
53
+ // the stream will close itself but is here for clarity; remove .close() in 5.0
53
54
  stream?.close();
54
55
  dispatch("done");
55
56
  } else {
@@ -59,6 +60,7 @@
59
60
  };
60
61
  });
61
62
  onDestroy(() => {
63
+ // the stream will close itself but is here for clarity; remove .close() in 5.0
62
64
  if (stream != null || stream != undefined) stream.close();
63
65
  });
64
66