@gradio/image 0.3.3 → 0.3.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 +11 -1
- package/Index.svelte +5 -6
- package/package.json +3 -3
- package/shared/ImagePreview.svelte +0 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,15 @@
|
|
1
1
|
# @gradio/image
|
2
2
|
|
3
|
+
## 0.3.4
|
4
|
+
|
5
|
+
### Features
|
6
|
+
|
7
|
+
- [#6363](https://github.com/gradio-app/gradio/pull/6363) [`4d3aad33a`](https://github.com/gradio-app/gradio/commit/4d3aad33a0b66639dbbb2928f305a79fb7789b2d) - Fix image upload. Thanks [@freddyaboulton](https://github.com/freddyaboulton)!
|
8
|
+
|
9
|
+
### Fixes
|
10
|
+
|
11
|
+
- [#6322](https://github.com/gradio-app/gradio/pull/6322) [`6204ccac5`](https://github.com/gradio-app/gradio/commit/6204ccac5967763e0ebde550d04d12584243a120) - Fixes `gr.load()` so it works properly with Images and Examples. Thanks [@abidlabs](https://github.com/abidlabs)!
|
12
|
+
|
3
13
|
## 0.3.3
|
4
14
|
|
5
15
|
### Patch Changes
|
@@ -177,4 +187,4 @@ Thanks [@pngwn](https://github.com/pngwn)!
|
|
177
187
|
|
178
188
|
### Features
|
179
189
|
|
180
|
-
- [#4979](https://github.com/gradio-app/gradio/pull/4979) [`44ac8ad0`](https://github.com/gradio-app/gradio/commit/44ac8ad08d82ea12c503dde5c78f999eb0452de2) - Allow setting sketch color default. Thanks [@aliabid94](https://github.com/aliabid94)!
|
190
|
+
- [#4979](https://github.com/gradio-app/gradio/pull/4979) [`44ac8ad0`](https://github.com/gradio-app/gradio/commit/44ac8ad08d82ea12c503dde5c78f999eb0452de2) - Allow setting sketch color default. Thanks [@aliabid94](https://github.com/aliabid94)!
|
package/Index.svelte
CHANGED
@@ -17,15 +17,18 @@
|
|
17
17
|
import { StatusTracker } from "@gradio/statustracker";
|
18
18
|
import type { FileData } from "@gradio/client";
|
19
19
|
import type { LoadingStatus } from "@gradio/statustracker";
|
20
|
+
import { normalise_file } from "@gradio/client";
|
20
21
|
|
21
22
|
export let elem_id = "";
|
22
23
|
export let elem_classes: string[] = [];
|
23
24
|
export let visible = true;
|
24
25
|
export let value: null | FileData = null;
|
26
|
+
$: _value = normalise_file(value, root, proxy_url);
|
25
27
|
export let label: string;
|
26
28
|
export let show_label: boolean;
|
27
29
|
export let show_download_button: boolean;
|
28
30
|
export let root: string;
|
31
|
+
export let proxy_url: null | string;
|
29
32
|
|
30
33
|
export let height: number | undefined;
|
31
34
|
export let width: number | undefined;
|
@@ -60,9 +63,6 @@
|
|
60
63
|
|
61
64
|
$: value?.url && gradio.dispatch("change");
|
62
65
|
let dragging: boolean;
|
63
|
-
|
64
|
-
$: value = !value ? null : value;
|
65
|
-
|
66
66
|
let active_tool: null | "webcam" = null;
|
67
67
|
</script>
|
68
68
|
|
@@ -90,8 +90,7 @@
|
|
90
90
|
on:select={({ detail }) => gradio.dispatch("select", detail)}
|
91
91
|
on:share={({ detail }) => gradio.dispatch("share", detail)}
|
92
92
|
on:error={({ detail }) => gradio.dispatch("error", detail)}
|
93
|
-
{
|
94
|
-
{value}
|
93
|
+
value={_value}
|
95
94
|
{label}
|
96
95
|
{show_label}
|
97
96
|
{show_download_button}
|
@@ -103,7 +102,7 @@
|
|
103
102
|
{:else}
|
104
103
|
<Block
|
105
104
|
{visible}
|
106
|
-
variant={
|
105
|
+
variant={_value === null ? "dashed" : "solid"}
|
107
106
|
border_mode={dragging ? "focus" : "base"}
|
108
107
|
padding={false}
|
109
108
|
{elem_id}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gradio/image",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.4",
|
4
4
|
"description": "Gradio UI packages",
|
5
5
|
"type": "module",
|
6
6
|
"author": "",
|
@@ -11,10 +11,10 @@
|
|
11
11
|
"lazy-brush": "^1.0.1",
|
12
12
|
"resize-observer-polyfill": "^1.5.1",
|
13
13
|
"@gradio/atoms": "^0.2.1",
|
14
|
-
"@gradio/client": "^0.
|
14
|
+
"@gradio/client": "^0.8.0",
|
15
15
|
"@gradio/icons": "^0.2.0",
|
16
16
|
"@gradio/statustracker": "^0.3.1",
|
17
|
-
"@gradio/upload": "^0.
|
17
|
+
"@gradio/upload": "^0.4.0",
|
18
18
|
"@gradio/utils": "^0.2.0",
|
19
19
|
"@gradio/wasm": "^0.2.0"
|
20
20
|
},
|
@@ -16,7 +16,6 @@
|
|
16
16
|
export let show_download_button = true;
|
17
17
|
export let selectable = false;
|
18
18
|
export let show_share_button = false;
|
19
|
-
export let root: string;
|
20
19
|
export let i18n: I18nFormatter;
|
21
20
|
|
22
21
|
const dispatch = createEventDispatcher<{
|
@@ -24,8 +23,6 @@
|
|
24
23
|
select: SelectData;
|
25
24
|
}>();
|
26
25
|
|
27
|
-
$: value = normalise_file(value, root, null);
|
28
|
-
|
29
26
|
const handle_click = (evt: MouseEvent): void => {
|
30
27
|
let coordinates = get_coordinates_of_clicked_image(evt);
|
31
28
|
if (coordinates) {
|