@gradio/image 0.3.3 → 0.3.5

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,5 +1,24 @@
1
1
  # @gradio/image
2
2
 
3
+ ## 0.3.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`324867f63`](https://github.com/gradio-app/gradio/commit/324867f63c920113d89a565892aa596cf8b1e486), [`d84209703`](https://github.com/gradio-app/gradio/commit/d84209703b7a0728cdb49221e543500ddb6a8d33)]:
8
+ - @gradio/client@0.8.1
9
+ - @gradio/wasm@0.3.0
10
+ - @gradio/upload@0.4.1
11
+
12
+ ## 0.3.4
13
+
14
+ ### Features
15
+
16
+ - [#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)!
17
+
18
+ ### Fixes
19
+
20
+ - [#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)!
21
+
3
22
  ## 0.3.3
4
23
 
5
24
  ### Patch Changes
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.3",
3
+ "version": "0.3.5",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -11,12 +11,12 @@
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.7.2",
15
- "@gradio/icons": "^0.2.0",
14
+ "@gradio/client": "^0.8.1",
16
15
  "@gradio/statustracker": "^0.3.1",
17
- "@gradio/upload": "^0.3.3",
16
+ "@gradio/icons": "^0.2.0",
18
17
  "@gradio/utils": "^0.2.0",
19
- "@gradio/wasm": "^0.2.0"
18
+ "@gradio/upload": "^0.4.1",
19
+ "@gradio/wasm": "^0.3.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) {