@gradio/upload 0.13.5 → 0.14.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/CHANGELOG.md +19 -0
- package/dist/src/Upload.svelte +19 -2
- package/dist/src/Upload.svelte.d.ts +1 -0
- package/package.json +5 -5
- package/src/Upload.svelte +19 -2
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# @gradio/upload
|
2
2
|
|
3
|
+
## 0.14.1
|
4
|
+
|
5
|
+
### Dependency updates
|
6
|
+
|
7
|
+
- @gradio/atoms@0.11.1
|
8
|
+
- @gradio/client@1.8.0
|
9
|
+
- @gradio/utils@0.8.0
|
10
|
+
|
11
|
+
## 0.14.0
|
12
|
+
|
13
|
+
### Features
|
14
|
+
|
15
|
+
- [#9891](https://github.com/gradio-app/gradio/pull/9891) [`fc12496`](https://github.com/gradio-app/gradio/commit/fc124964a1b4922e54a4ca4755f0a536dfae1a21) - Allow uploading more files in gr.File. Thanks @hannahblair!
|
16
|
+
|
17
|
+
### Dependency updates
|
18
|
+
|
19
|
+
- @gradio/atoms@0.11.0
|
20
|
+
- @gradio/wasm@0.15.0
|
21
|
+
|
3
22
|
## 0.13.5
|
4
23
|
|
5
24
|
### Dependency updates
|
package/dist/src/Upload.svelte
CHANGED
@@ -18,6 +18,7 @@ export let show_progress = true;
|
|
18
18
|
export let max_file_size = null;
|
19
19
|
export let upload;
|
20
20
|
export let stream_handler;
|
21
|
+
export let icon_upload = false;
|
21
22
|
let upload_id;
|
22
23
|
let file_data;
|
23
24
|
let accept_file_types;
|
@@ -216,7 +217,8 @@ async function loadFilesFromDrop(e) {
|
|
216
217
|
class:center
|
217
218
|
class:boundedheight
|
218
219
|
class:flex
|
219
|
-
|
220
|
+
class:icon-mode={icon_upload}
|
221
|
+
style:height={icon_upload ? "" : "100%"}
|
220
222
|
tabindex={hidden ? -1 : 0}
|
221
223
|
on:click={paste_clipboard}
|
222
224
|
>
|
@@ -233,7 +235,8 @@ async function loadFilesFromDrop(e) {
|
|
233
235
|
class:boundedheight
|
234
236
|
class:flex
|
235
237
|
class:disable_click
|
236
|
-
|
238
|
+
class:icon-mode={icon_upload}
|
239
|
+
style:height={icon_upload ? "" : "100%"}
|
237
240
|
tabindex={hidden ? -1 : 0}
|
238
241
|
on:drag|preventDefault|stopPropagation
|
239
242
|
on:dragstart|preventDefault|stopPropagation
|
@@ -295,4 +298,18 @@ async function loadFilesFromDrop(e) {
|
|
295
298
|
input {
|
296
299
|
display: none;
|
297
300
|
}
|
301
|
+
|
302
|
+
.icon-mode {
|
303
|
+
position: absolute !important;
|
304
|
+
width: var(--size-4);
|
305
|
+
height: var(--size-4);
|
306
|
+
padding: 0;
|
307
|
+
min-height: 0;
|
308
|
+
border-radius: var(--radius-circle);
|
309
|
+
}
|
310
|
+
|
311
|
+
.icon-mode :global(svg) {
|
312
|
+
width: var(--size-4);
|
313
|
+
height: var(--size-4);
|
314
|
+
}
|
298
315
|
</style>
|
@@ -19,6 +19,7 @@ declare const __propDef: {
|
|
19
19
|
max_file_size?: (number | null) | undefined;
|
20
20
|
upload: Client["upload"];
|
21
21
|
stream_handler: Client["stream"];
|
22
|
+
icon_upload?: boolean | undefined;
|
22
23
|
paste_clipboard?: (() => void) | undefined;
|
23
24
|
open_file_upload?: (() => void) | undefined;
|
24
25
|
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.
|
3
|
+
"version": "0.14.1",
|
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.11.1",
|
11
|
+
"@gradio/client": "^1.8.0",
|
12
|
+
"@gradio/utils": "^0.8.0",
|
10
13
|
"@gradio/icons": "^0.8.1",
|
11
|
-
"@gradio/
|
12
|
-
"@gradio/utils": "^0.7.0",
|
13
|
-
"@gradio/wasm": "^0.14.2",
|
14
|
-
"@gradio/client": "^1.7.1"
|
14
|
+
"@gradio/wasm": "^0.15.0"
|
15
15
|
},
|
16
16
|
"main_changeset": true,
|
17
17
|
"exports": {
|
package/src/Upload.svelte
CHANGED
@@ -21,6 +21,7 @@
|
|
21
21
|
export let max_file_size: number | null = null;
|
22
22
|
export let upload: Client["upload"];
|
23
23
|
export let stream_handler: Client["stream"];
|
24
|
+
export let icon_upload = false;
|
24
25
|
|
25
26
|
let upload_id: string;
|
26
27
|
let file_data: FileData[];
|
@@ -265,7 +266,8 @@
|
|
265
266
|
class:center
|
266
267
|
class:boundedheight
|
267
268
|
class:flex
|
268
|
-
|
269
|
+
class:icon-mode={icon_upload}
|
270
|
+
style:height={icon_upload ? "" : "100%"}
|
269
271
|
tabindex={hidden ? -1 : 0}
|
270
272
|
on:click={paste_clipboard}
|
271
273
|
>
|
@@ -282,7 +284,8 @@
|
|
282
284
|
class:boundedheight
|
283
285
|
class:flex
|
284
286
|
class:disable_click
|
285
|
-
|
287
|
+
class:icon-mode={icon_upload}
|
288
|
+
style:height={icon_upload ? "" : "100%"}
|
286
289
|
tabindex={hidden ? -1 : 0}
|
287
290
|
on:drag|preventDefault|stopPropagation
|
288
291
|
on:dragstart|preventDefault|stopPropagation
|
@@ -344,4 +347,18 @@
|
|
344
347
|
input {
|
345
348
|
display: none;
|
346
349
|
}
|
350
|
+
|
351
|
+
.icon-mode {
|
352
|
+
position: absolute !important;
|
353
|
+
width: var(--size-4);
|
354
|
+
height: var(--size-4);
|
355
|
+
padding: 0;
|
356
|
+
min-height: 0;
|
357
|
+
border-radius: var(--radius-circle);
|
358
|
+
}
|
359
|
+
|
360
|
+
.icon-mode :global(svg) {
|
361
|
+
width: var(--size-4);
|
362
|
+
height: var(--size-4);
|
363
|
+
}
|
347
364
|
</style>
|