@gradio/upload 0.14.2 → 0.14.4

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,25 @@
1
1
  # @gradio/upload
2
2
 
3
+ ## 0.14.4
4
+
5
+ ### Fixes
6
+
7
+ - [#10209](https://github.com/gradio-app/gradio/pull/10209) [`2700d18`](https://github.com/gradio-app/gradio/commit/2700d1898bc8eeb3fd9f65ce77be17c2614a388f) - Ensure the `height` param in `gr.File` works as expected. Thanks @hannahblair!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/atoms@0.13.0
12
+ - @gradio/utils@0.10.0
13
+ - @gradio/client@1.9.0
14
+ - @gradio/icons@0.9.0
15
+ - @gradio/wasm@0.16.0
16
+
17
+ ## 0.14.3
18
+
19
+ ### Dependency updates
20
+
21
+ - @gradio/atoms@0.12.0
22
+
3
23
  ## 0.14.2
4
24
 
5
25
  ### Dependency updates
@@ -19,6 +19,7 @@ export let max_file_size = null;
19
19
  export let upload;
20
20
  export let stream_handler;
21
21
  export let icon_upload = false;
22
+ export let height = void 0;
22
23
  let upload_id;
23
24
  let file_data;
24
25
  let accept_file_types;
@@ -218,7 +219,13 @@ async function loadFilesFromDrop(e) {
218
219
  class:boundedheight
219
220
  class:flex
220
221
  class:icon-mode={icon_upload}
221
- style:height={icon_upload ? "" : "100%"}
222
+ style:height={icon_upload
223
+ ? ""
224
+ : height
225
+ ? typeof height === "number"
226
+ ? height + "px"
227
+ : height
228
+ : "100%"}
222
229
  tabindex={hidden ? -1 : 0}
223
230
  on:click={paste_clipboard}
224
231
  >
@@ -236,7 +243,13 @@ async function loadFilesFromDrop(e) {
236
243
  class:flex
237
244
  class:disable_click
238
245
  class:icon-mode={icon_upload}
239
- style:height={icon_upload ? "" : "100%"}
246
+ style:height={icon_upload
247
+ ? ""
248
+ : height
249
+ ? typeof height === "number"
250
+ ? height + "px"
251
+ : height
252
+ : "100%"}
240
253
  tabindex={hidden ? -1 : 0}
241
254
  on:drag|preventDefault|stopPropagation
242
255
  on:dragstart|preventDefault|stopPropagation
@@ -20,6 +20,7 @@ declare const __propDef: {
20
20
  upload: Client["upload"];
21
21
  stream_handler: Client["stream"];
22
22
  icon_upload?: boolean | undefined;
23
+ height?: number | string | undefined;
23
24
  paste_clipboard?: (() => void) | undefined;
24
25
  open_file_upload?: (() => void) | undefined;
25
26
  load_files?: ((files: File[] | Blob[]) => Promise<(FileData | null)[] | void>) | undefined;
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@gradio/upload",
3
- "version": "0.14.2",
3
+ "version": "0.14.4",
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/icons": "^0.8.1",
11
- "@gradio/client": "^1.8.0",
12
- "@gradio/utils": "^0.9.0",
13
- "@gradio/atoms": "^0.11.2",
14
- "@gradio/wasm": "^0.15.0"
10
+ "@gradio/atoms": "^0.13.0",
11
+ "@gradio/client": "^1.9.0",
12
+ "@gradio/icons": "^0.9.0",
13
+ "@gradio/wasm": "^0.16.0",
14
+ "@gradio/utils": "^0.10.0"
15
15
  },
16
16
  "main_changeset": true,
17
17
  "exports": {
package/src/Upload.svelte CHANGED
@@ -22,6 +22,7 @@
22
22
  export let upload: Client["upload"];
23
23
  export let stream_handler: Client["stream"];
24
24
  export let icon_upload = false;
25
+ export let height: number | string | undefined = undefined;
25
26
 
26
27
  let upload_id: string;
27
28
  let file_data: FileData[];
@@ -267,7 +268,13 @@
267
268
  class:boundedheight
268
269
  class:flex
269
270
  class:icon-mode={icon_upload}
270
- style:height={icon_upload ? "" : "100%"}
271
+ style:height={icon_upload
272
+ ? ""
273
+ : height
274
+ ? typeof height === "number"
275
+ ? height + "px"
276
+ : height
277
+ : "100%"}
271
278
  tabindex={hidden ? -1 : 0}
272
279
  on:click={paste_clipboard}
273
280
  >
@@ -285,7 +292,13 @@
285
292
  class:flex
286
293
  class:disable_click
287
294
  class:icon-mode={icon_upload}
288
- style:height={icon_upload ? "" : "100%"}
295
+ style:height={icon_upload
296
+ ? ""
297
+ : height
298
+ ? typeof height === "number"
299
+ ? height + "px"
300
+ : height
301
+ : "100%"}
289
302
  tabindex={hidden ? -1 : 0}
290
303
  on:drag|preventDefault|stopPropagation
291
304
  on:dragstart|preventDefault|stopPropagation