@gradio/file 0.9.4 → 0.10.0-beta.3
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,24 +1,61 @@
|
|
1
1
|
# @gradio/file
|
2
2
|
|
3
|
-
## 0.
|
3
|
+
## 0.10.0-beta.3
|
4
|
+
|
5
|
+
### Dependency updates
|
6
|
+
|
7
|
+
- @gradio/upload@0.13.0-beta.3
|
8
|
+
- @gradio/client@1.6.0-beta.3
|
9
|
+
|
10
|
+
## 0.10.0-beta.2
|
11
|
+
|
12
|
+
### Features
|
13
|
+
|
14
|
+
- [#9339](https://github.com/gradio-app/gradio/pull/9339) [`4c8c6f2`](https://github.com/gradio-app/gradio/commit/4c8c6f2fe603081941c5fdc43f48a0632b9f31ad) - Ssr part 2. Thanks @pngwn!
|
15
|
+
- [#9250](https://github.com/gradio-app/gradio/pull/9250) [`350b0a5`](https://github.com/gradio-app/gradio/commit/350b0a5cafb9176f914f62e7c90de51d4352cc77) - Improve Icon Button consistency. Thanks @hannahblair!
|
16
|
+
- [#9253](https://github.com/gradio-app/gradio/pull/9253) [`99648ec`](https://github.com/gradio-app/gradio/commit/99648ec7c4443e74799941e47b0015ac9ca581e1) - Adds ability to block event trigger when file is uploading. Thanks @dawoodkhan82!
|
17
|
+
|
18
|
+
### Dependency updates
|
19
|
+
|
20
|
+
- @gradio/atoms@0.9.0-beta.2
|
21
|
+
- @gradio/upload@0.13.0-beta.2
|
22
|
+
- @gradio/wasm@0.14.0-beta.2
|
23
|
+
- @gradio/client@1.6.0-beta.2
|
24
|
+
- @gradio/icons@0.8.0-beta.2
|
25
|
+
- @gradio/statustracker@0.8.0-beta.2
|
26
|
+
- @gradio/utils@0.7.0-beta.2
|
27
|
+
|
28
|
+
## 0.9.4-beta.1
|
4
29
|
|
5
30
|
### Features
|
6
31
|
|
7
32
|
- [#9187](https://github.com/gradio-app/gradio/pull/9187) [`5bf00b7`](https://github.com/gradio-app/gradio/commit/5bf00b7524ebf399b48719120a49d15bb21bd65c) - make all component SSR compatible. Thanks @pngwn!
|
8
33
|
|
34
|
+
### Dependency updates
|
35
|
+
|
36
|
+
- @gradio/atoms@0.8.1-beta.1
|
37
|
+
- @gradio/icons@0.8.0-beta.1
|
38
|
+
- @gradio/statustracker@0.8.0-beta.1
|
39
|
+
- @gradio/utils@0.7.0-beta.1
|
40
|
+
- @gradio/client@1.6.0-beta.1
|
41
|
+
- @gradio/upload@0.12.4-beta.1
|
42
|
+
- @gradio/wasm@0.13.1-beta.1
|
43
|
+
|
44
|
+
## 0.9.4-beta.0
|
45
|
+
|
9
46
|
### Fixes
|
10
47
|
|
11
48
|
- [#9163](https://github.com/gradio-app/gradio/pull/9163) [`2b6cbf2`](https://github.com/gradio-app/gradio/commit/2b6cbf25908e42cf027324e54ef2cc0baad11a91) - fix exports and generate types. Thanks @pngwn!
|
12
49
|
|
13
50
|
### Dependency updates
|
14
51
|
|
15
|
-
- @gradio/utils@0.
|
16
|
-
- @gradio/statustracker@0.
|
17
|
-
- @gradio/atoms@0.8.1
|
18
|
-
- @gradio/
|
19
|
-
- @gradio/
|
20
|
-
- @gradio/
|
21
|
-
- @gradio/
|
52
|
+
- @gradio/utils@0.7.0-beta.0
|
53
|
+
- @gradio/statustracker@0.8.0-beta.0
|
54
|
+
- @gradio/atoms@0.8.1-beta.0
|
55
|
+
- @gradio/client@1.6.0-beta.0
|
56
|
+
- @gradio/icons@0.8.0-beta.0
|
57
|
+
- @gradio/upload@0.12.4-beta.0
|
58
|
+
- @gradio/wasm@0.13.1-beta.0
|
22
59
|
|
23
60
|
## 0.9.3
|
24
61
|
|
package/Index.svelte
CHANGED
@@ -44,6 +44,9 @@
|
|
44
44
|
}>;
|
45
45
|
export let file_count: "single" | "multiple" | "directory";
|
46
46
|
export let file_types: string[] = ["file"];
|
47
|
+
export let input_ready: boolean;
|
48
|
+
let uploading = false;
|
49
|
+
$: input_ready = !uploading;
|
47
50
|
|
48
51
|
let old_value = value;
|
49
52
|
$: if (JSON.stringify(old_value) !== JSON.stringify(value)) {
|
@@ -88,8 +91,8 @@
|
|
88
91
|
/>
|
89
92
|
{:else}
|
90
93
|
<FileUpload
|
91
|
-
upload={gradio.client.upload}
|
92
|
-
stream_handler={gradio.client.stream}
|
94
|
+
upload={(...args) => gradio.client.upload(...args)}
|
95
|
+
stream_handler={(...args) => gradio.client.stream(...args)}
|
93
96
|
{label}
|
94
97
|
{show_label}
|
95
98
|
{value}
|
@@ -98,6 +101,7 @@
|
|
98
101
|
selectable={_selectable}
|
99
102
|
{root}
|
100
103
|
{height}
|
104
|
+
bind:uploading
|
101
105
|
max_file_size={gradio.max_file_size}
|
102
106
|
on:change={({ detail }) => {
|
103
107
|
value = detail;
|
package/dist/Index.svelte
CHANGED
@@ -27,6 +27,10 @@ export let min_width = void 0;
|
|
27
27
|
export let gradio;
|
28
28
|
export let file_count;
|
29
29
|
export let file_types = ["file"];
|
30
|
+
export let input_ready;
|
31
|
+
let uploading = false;
|
32
|
+
$:
|
33
|
+
input_ready = !uploading;
|
30
34
|
let old_value = value;
|
31
35
|
$:
|
32
36
|
if (JSON.stringify(old_value) !== JSON.stringify(value)) {
|
@@ -70,8 +74,8 @@ let pending_upload = false;
|
|
70
74
|
/>
|
71
75
|
{:else}
|
72
76
|
<FileUpload
|
73
|
-
upload={gradio.client.upload}
|
74
|
-
stream_handler={gradio.client.stream}
|
77
|
+
upload={(...args) => gradio.client.upload(...args)}
|
78
|
+
stream_handler={(...args) => gradio.client.stream(...args)}
|
75
79
|
{label}
|
76
80
|
{show_label}
|
77
81
|
{value}
|
@@ -80,6 +84,7 @@ let pending_upload = false;
|
|
80
84
|
selectable={_selectable}
|
81
85
|
{root}
|
82
86
|
{height}
|
87
|
+
bind:uploading
|
83
88
|
max_file_size={gradio.max_file_size}
|
84
89
|
on:change={({ detail }) => {
|
85
90
|
value = detail;
|
package/dist/Index.svelte.d.ts
CHANGED
@@ -33,6 +33,7 @@ declare const __propDef: {
|
|
33
33
|
}>;
|
34
34
|
file_count: "single" | "multiple" | "directory";
|
35
35
|
file_types?: string[] | undefined;
|
36
|
+
input_ready: boolean;
|
36
37
|
};
|
37
38
|
events: {
|
38
39
|
[evt: string]: CustomEvent<any>;
|
@@ -110,4 +111,7 @@ export default class Index extends SvelteComponent<IndexProps, IndexEvents, Inde
|
|
110
111
|
get file_types(): string[] | undefined;
|
111
112
|
/**accessor*/
|
112
113
|
set file_types(_: string[] | undefined);
|
114
|
+
get input_ready(): boolean;
|
115
|
+
/**accessor*/
|
116
|
+
set input_ready(_: boolean);
|
113
117
|
}
|
@@ -15,6 +15,7 @@ export let i18n;
|
|
15
15
|
export let max_file_size = null;
|
16
16
|
export let upload;
|
17
17
|
export let stream_handler;
|
18
|
+
export let uploading = false;
|
18
19
|
async function handle_upload({
|
19
20
|
detail
|
20
21
|
}) {
|
@@ -37,7 +38,7 @@ $:
|
|
37
38
|
<BlockLabel {show_label} Icon={File} float={!value} label={label || "File"} />
|
38
39
|
|
39
40
|
{#if value && (Array.isArray(value) ? value.length > 0 : true)}
|
40
|
-
<ModifyUpload {i18n} on:clear={handle_clear}
|
41
|
+
<ModifyUpload {i18n} on:clear={handle_clear} />
|
41
42
|
<FilePreview
|
42
43
|
{i18n}
|
43
44
|
on:select
|
@@ -55,6 +56,7 @@ $:
|
|
55
56
|
{max_file_size}
|
56
57
|
{root}
|
57
58
|
bind:dragging
|
59
|
+
bind:uploading
|
58
60
|
on:error
|
59
61
|
{stream_handler}
|
60
62
|
{upload}
|
package/package.json
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gradio/file",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.10.0-beta.3",
|
4
4
|
"description": "Gradio UI packages",
|
5
5
|
"type": "module",
|
6
6
|
"author": "",
|
7
7
|
"license": "ISC",
|
8
8
|
"private": false,
|
9
9
|
"dependencies": {
|
10
|
-
"@gradio/atoms": "^0.
|
11
|
-
"@gradio/
|
12
|
-
"@gradio/
|
13
|
-
"@gradio/
|
14
|
-
"@gradio/
|
15
|
-
"@gradio/
|
16
|
-
"@gradio/
|
10
|
+
"@gradio/atoms": "^0.9.0-beta.2",
|
11
|
+
"@gradio/statustracker": "^0.8.0-beta.2",
|
12
|
+
"@gradio/upload": "^0.13.0-beta.3",
|
13
|
+
"@gradio/utils": "^0.7.0-beta.2",
|
14
|
+
"@gradio/client": "^1.6.0-beta.3",
|
15
|
+
"@gradio/icons": "^0.8.0-beta.2",
|
16
|
+
"@gradio/wasm": "^0.14.0-beta.2"
|
17
17
|
},
|
18
18
|
"devDependencies": {
|
19
19
|
"@gradio/preview": "^0.11.1"
|
package/shared/FileUpload.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 uploading = false;
|
24
25
|
|
25
26
|
async function handle_upload({
|
26
27
|
detail
|
@@ -53,7 +54,7 @@
|
|
53
54
|
<BlockLabel {show_label} Icon={File} float={!value} label={label || "File"} />
|
54
55
|
|
55
56
|
{#if value && (Array.isArray(value) ? value.length > 0 : true)}
|
56
|
-
<ModifyUpload {i18n} on:clear={handle_clear}
|
57
|
+
<ModifyUpload {i18n} on:clear={handle_clear} />
|
57
58
|
<FilePreview
|
58
59
|
{i18n}
|
59
60
|
on:select
|
@@ -71,6 +72,7 @@
|
|
71
72
|
{max_file_size}
|
72
73
|
{root}
|
73
74
|
bind:dragging
|
75
|
+
bind:uploading
|
74
76
|
on:error
|
75
77
|
{stream_handler}
|
76
78
|
{upload}
|