@gradio/image 0.3.2 → 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 CHANGED
@@ -1,10 +1,30 @@
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
+
13
+ ## 0.3.3
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [[`bca6c2c80`](https://github.com/gradio-app/gradio/commit/bca6c2c80f7e5062427019de45c282238388af95), [`3cdeabc68`](https://github.com/gradio-app/gradio/commit/3cdeabc6843000310e1a9e1d17190ecbf3bbc780), [`fad92c29d`](https://github.com/gradio-app/gradio/commit/fad92c29dc1f5cd84341aae417c495b33e01245f)]:
18
+ - @gradio/client@0.7.2
19
+ - @gradio/atoms@0.2.1
20
+ - @gradio/upload@0.3.3
21
+ - @gradio/statustracker@0.3.1
22
+
3
23
  ## 0.3.2
4
24
 
5
25
  ### Fixes
6
26
 
7
- - [#6213](https://github.com/gradio-app/gradio/pull/6213) [`27194a987`](https://github.com/gradio-app/gradio/commit/27194a987fa7ba1234b5fc0ce8bf7fabef7033a9) - Ensure the statustracker for `gr.Image` displays in static mode. Thanks [@pngwn](https://github.com/pngwn)!
27
+ - [#6213](https://github.com/gradio-app/gradio/pull/6213) [`27194a987`](https://github.com/gradio-app/gradio/commit/27194a987fa7ba1234b5fc0ce8bf7fabef7033a9) - Ensure the statustracker for `gr.Image` displays in static mode. Thanks [@pngwn](https://github.com/pngwn)!
8
28
 
9
29
  ## 0.3.1
10
30
 
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
- {root}
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={value === null ? "dashed" : "solid"}
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.2",
3
+ "version": "0.3.4",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -10,13 +10,13 @@
10
10
  "cropperjs": "^1.5.12",
11
11
  "lazy-brush": "^1.0.1",
12
12
  "resize-observer-polyfill": "^1.5.1",
13
- "@gradio/atoms": "^0.2.0",
14
- "@gradio/client": "^0.7.1",
13
+ "@gradio/atoms": "^0.2.1",
14
+ "@gradio/client": "^0.8.0",
15
15
  "@gradio/icons": "^0.2.0",
16
- "@gradio/upload": "^0.3.2",
16
+ "@gradio/statustracker": "^0.3.1",
17
+ "@gradio/upload": "^0.4.0",
17
18
  "@gradio/utils": "^0.2.0",
18
- "@gradio/wasm": "^0.2.0",
19
- "@gradio/statustracker": "^0.3.0"
19
+ "@gradio/wasm": "^0.2.0"
20
20
  },
21
21
  "main_changeset": true,
22
22
  "main": "./Index.svelte",
@@ -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) {