@gradio/uploadbutton 0.9.11 → 0.9.13-dev.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 +46 -0
- package/Index.svelte +1 -1
- package/dist/Index.svelte +1 -2
- package/dist/Index.svelte.d.ts +10 -8
- package/dist/shared/UploadButton.svelte +2 -4
- package/dist/shared/UploadButton.svelte.d.ts +12 -10
- package/package.json +5 -5
- package/shared/UploadButton.svelte +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,51 @@
|
|
|
1
1
|
# @gradio/uploadbutton
|
|
2
2
|
|
|
3
|
+
## 0.9.13-dev.0
|
|
4
|
+
|
|
5
|
+
### Dependency updates
|
|
6
|
+
|
|
7
|
+
- @gradio/upload@0.17.2-dev.0
|
|
8
|
+
- @gradio/client@2.0.0-dev.0
|
|
9
|
+
- @gradio/button@0.5.14-dev.0
|
|
10
|
+
|
|
11
|
+
## 0.9.12
|
|
12
|
+
|
|
13
|
+
### Dependency updates
|
|
14
|
+
|
|
15
|
+
- @gradio/client@1.19.1
|
|
16
|
+
|
|
17
|
+
## 0.9.12
|
|
18
|
+
|
|
19
|
+
### Dependency updates
|
|
20
|
+
|
|
21
|
+
- @gradio/upload@0.17.1
|
|
22
|
+
|
|
23
|
+
## 0.9.12
|
|
24
|
+
|
|
25
|
+
### Fixes
|
|
26
|
+
|
|
27
|
+
- [#11784](https://github.com/gradio-app/gradio/pull/11784) [`d9dd3f5`](https://github.com/gradio-app/gradio/commit/d9dd3f54b7fb34cf7118e549d39fc63937ca3489) - Add "hidden" option to component's `visible` kwarg to render but visually hide the component. Thanks @pngwn!
|
|
28
|
+
|
|
29
|
+
### Dependency updates
|
|
30
|
+
|
|
31
|
+
- @gradio/client@1.19.0
|
|
32
|
+
- @gradio/upload@0.17.0
|
|
33
|
+
- @gradio/button@0.5.13
|
|
34
|
+
|
|
35
|
+
## 0.9.11
|
|
36
|
+
|
|
37
|
+
### Dependency updates
|
|
38
|
+
|
|
39
|
+
- @gradio/client@1.18.0
|
|
40
|
+
- @gradio/upload@0.16.17
|
|
41
|
+
- @gradio/button@0.5.12
|
|
42
|
+
|
|
43
|
+
## 0.9.11
|
|
44
|
+
|
|
45
|
+
### Dependency updates
|
|
46
|
+
|
|
47
|
+
- @gradio/upload@0.16.16
|
|
48
|
+
|
|
3
49
|
## 0.9.11
|
|
4
50
|
|
|
5
51
|
### Dependency updates
|
package/Index.svelte
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
export let elem_id = "";
|
|
11
11
|
export let elem_classes: string[] = [];
|
|
12
|
-
export let visible = true;
|
|
12
|
+
export let visible: boolean | "hidden" = true;
|
|
13
13
|
export let label: string | null;
|
|
14
14
|
export let value: null | FileData | FileData[];
|
|
15
15
|
export let file_count: string;
|
package/dist/Index.svelte
CHANGED
|
@@ -17,8 +17,7 @@ export let min_width = void 0;
|
|
|
17
17
|
export let variant = "secondary";
|
|
18
18
|
export let gradio;
|
|
19
19
|
export let interactive;
|
|
20
|
-
$:
|
|
21
|
-
disabled = !interactive;
|
|
20
|
+
$: disabled = !interactive;
|
|
22
21
|
async function handle_event(detail, event) {
|
|
23
22
|
value = detail;
|
|
24
23
|
gradio.dispatch(event);
|
package/dist/Index.svelte.d.ts
CHANGED
|
@@ -4,19 +4,19 @@ import type { Gradio } from "@gradio/utils";
|
|
|
4
4
|
import type { FileData } from "@gradio/client";
|
|
5
5
|
declare const __propDef: {
|
|
6
6
|
props: {
|
|
7
|
-
elem_id?: string
|
|
8
|
-
elem_classes?: string[]
|
|
9
|
-
visible?: boolean |
|
|
7
|
+
elem_id?: string;
|
|
8
|
+
elem_classes?: string[];
|
|
9
|
+
visible?: boolean | "hidden";
|
|
10
10
|
label: string | null;
|
|
11
11
|
value: null | FileData | FileData[];
|
|
12
12
|
file_count: string;
|
|
13
|
-
file_types?: string[]
|
|
13
|
+
file_types?: string[];
|
|
14
14
|
root: string;
|
|
15
|
-
size?:
|
|
16
|
-
scale?:
|
|
17
|
-
icon?:
|
|
15
|
+
size?: "sm" | "lg";
|
|
16
|
+
scale?: number | null;
|
|
17
|
+
icon?: FileData | null;
|
|
18
18
|
min_width?: number | undefined;
|
|
19
|
-
variant?:
|
|
19
|
+
variant?: "primary" | "secondary" | "stop";
|
|
20
20
|
gradio: Gradio<{
|
|
21
21
|
change: never;
|
|
22
22
|
upload: never;
|
|
@@ -29,6 +29,8 @@ declare const __propDef: {
|
|
|
29
29
|
[evt: string]: CustomEvent<any>;
|
|
30
30
|
};
|
|
31
31
|
slots: {};
|
|
32
|
+
exports?: {} | undefined;
|
|
33
|
+
bindings?: string | undefined;
|
|
32
34
|
};
|
|
33
35
|
export type IndexProps = typeof __propDef.props;
|
|
34
36
|
export type IndexEvents = typeof __propDef.events;
|
|
@@ -57,14 +57,12 @@ async function load_files(files) {
|
|
|
57
57
|
}
|
|
58
58
|
async function load_files_from_upload(e) {
|
|
59
59
|
const target = e.target;
|
|
60
|
-
if (!target.files)
|
|
61
|
-
return;
|
|
60
|
+
if (!target.files) return;
|
|
62
61
|
await load_files(target.files);
|
|
63
62
|
}
|
|
64
63
|
function clear_input_value(e) {
|
|
65
64
|
const target = e.target;
|
|
66
|
-
if (target.value)
|
|
67
|
-
target.value = "";
|
|
65
|
+
if (target.value) target.value = "";
|
|
68
66
|
}
|
|
69
67
|
</script>
|
|
70
68
|
|
|
@@ -2,21 +2,21 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import { type FileData, type Client } from "@gradio/client";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
elem_id?: string
|
|
6
|
-
elem_classes?: string[]
|
|
7
|
-
visible?: boolean |
|
|
5
|
+
elem_id?: string;
|
|
6
|
+
elem_classes?: string[];
|
|
7
|
+
visible?: boolean | "hidden";
|
|
8
8
|
label: string | null;
|
|
9
9
|
value: null | FileData | FileData[];
|
|
10
10
|
file_count: string;
|
|
11
|
-
file_types?: string[]
|
|
11
|
+
file_types?: string[];
|
|
12
12
|
root: string;
|
|
13
|
-
size?:
|
|
14
|
-
icon?:
|
|
15
|
-
scale?:
|
|
13
|
+
size?: "sm" | "md" | "lg";
|
|
14
|
+
icon?: FileData | null;
|
|
15
|
+
scale?: number | null;
|
|
16
16
|
min_width?: number | undefined;
|
|
17
|
-
variant?:
|
|
18
|
-
disabled?: boolean
|
|
19
|
-
max_file_size?:
|
|
17
|
+
variant?: "primary" | "secondary" | "stop";
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
max_file_size?: number | null;
|
|
20
20
|
upload: Client["upload"];
|
|
21
21
|
};
|
|
22
22
|
events: {
|
|
@@ -30,6 +30,8 @@ declare const __propDef: {
|
|
|
30
30
|
slots: {
|
|
31
31
|
default: {};
|
|
32
32
|
};
|
|
33
|
+
exports?: {} | undefined;
|
|
34
|
+
bindings?: string | undefined;
|
|
33
35
|
};
|
|
34
36
|
export type UploadButtonProps = typeof __propDef.props;
|
|
35
37
|
export type UploadButtonEvents = typeof __propDef.events;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/uploadbutton",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.13-dev.0",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
},
|
|
18
18
|
"main": "./Index.svelte",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@gradio/
|
|
21
|
-
"@gradio/upload": "^0.
|
|
22
|
-
"@gradio/
|
|
23
|
-
"@gradio/
|
|
20
|
+
"@gradio/client": "^2.0.0-dev.0",
|
|
21
|
+
"@gradio/upload": "^0.17.2-dev.0",
|
|
22
|
+
"@gradio/utils": "^0.10.2",
|
|
23
|
+
"@gradio/button": "^0.5.14-dev.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@gradio/preview": "^0.14.0"
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
export let elem_id = "";
|
|
7
7
|
export let elem_classes: string[] = [];
|
|
8
|
-
export let visible = true;
|
|
8
|
+
export let visible: boolean | "hidden" = true;
|
|
9
9
|
export let label: string | null;
|
|
10
10
|
export let value: null | FileData | FileData[];
|
|
11
11
|
export let file_count: string;
|