@gradio/image 0.22.16 → 0.22.17

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,19 @@
1
1
  # @gradio/image
2
2
 
3
+ ## 0.22.17
4
+
5
+ ### Fixes
6
+
7
+ - [#11720](https://github.com/gradio-app/gradio/pull/11720) [`4d3d983`](https://github.com/gradio-app/gradio/commit/4d3d983083c1317925aba1f67c8d5d3c944525ca) - Exit fullscreen mode when `gr.Image` value is cleared. Thanks @hannahblair!
8
+
9
+ ### Dependency updates
10
+
11
+ - @gradio/statustracker@0.10.17
12
+ - @gradio/atoms@0.16.5
13
+ - @gradio/client@1.17.1
14
+ - @gradio/icons@0.13.0
15
+ - @gradio/upload@0.16.15
16
+
3
17
  ## 0.22.16
4
18
 
5
19
  ### Dependency updates
package/Index.svelte CHANGED
@@ -205,6 +205,7 @@
205
205
  {fullscreen}
206
206
  on:edit={() => gradio.dispatch("edit")}
207
207
  on:clear={() => {
208
+ fullscreen = false;
208
209
  gradio.dispatch("clear");
209
210
  }}
210
211
  on:stream={({ detail }) => gradio.dispatch("stream", detail)}
package/dist/Index.svelte CHANGED
@@ -175,6 +175,7 @@ const handle_drop = (event) => {
175
175
  {fullscreen}
176
176
  on:edit={() => gradio.dispatch("edit")}
177
177
  on:clear={() => {
178
+ fullscreen = false;
178
179
  gradio.dispatch("clear");
179
180
  }}
180
181
  on:stream={({ detail }) => gradio.dispatch("stream", detail)}
@@ -54,6 +54,10 @@ function handle_clear() {
54
54
  dispatch("clear");
55
55
  dispatch("change", null);
56
56
  }
57
+ function handle_remove_image_click(event) {
58
+ handle_clear();
59
+ event.stopPropagation();
60
+ }
57
61
  async function handle_save(img_blob, event) {
58
62
  if (event === "stream") {
59
63
  dispatch("stream", {
@@ -135,11 +139,7 @@ async function on_drop(evt) {
135
139
  <IconButton
136
140
  Icon={Clear}
137
141
  label="Remove Image"
138
- on:click={(event) => {
139
- value = null;
140
- dispatch("clear");
141
- event.stopPropagation();
142
- }}
142
+ on:click={handle_remove_image_click}
143
143
  />
144
144
  {/if}
145
145
  </IconButtonWrapper>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/image",
3
- "version": "0.22.16",
3
+ "version": "0.22.17",
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.16.4",
14
- "@gradio/statustracker": "^0.10.16",
15
- "@gradio/client": "^1.17.0",
16
- "@gradio/icons": "^0.12.0",
17
- "@gradio/upload": "^0.16.14",
13
+ "@gradio/client": "^1.17.1",
14
+ "@gradio/atoms": "^0.16.5",
15
+ "@gradio/icons": "^0.13.0",
16
+ "@gradio/statustracker": "^0.10.17",
18
17
  "@gradio/utils": "^0.10.2",
19
- "@gradio/wasm": "^0.18.1"
18
+ "@gradio/wasm": "^0.18.1",
19
+ "@gradio/upload": "^0.16.15"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@gradio/preview": "^0.14.0"
@@ -70,6 +70,11 @@
70
70
  dispatch("change", null);
71
71
  }
72
72
 
73
+ function handle_remove_image_click(event: MouseEvent): void {
74
+ handle_clear();
75
+ event.stopPropagation();
76
+ }
77
+
73
78
  async function handle_save(
74
79
  img_blob: Blob | any,
75
80
  event: "change" | "stream" | "upload"
@@ -173,11 +178,7 @@
173
178
  <IconButton
174
179
  Icon={Clear}
175
180
  label="Remove Image"
176
- on:click={(event) => {
177
- value = null;
178
- dispatch("clear");
179
- event.stopPropagation();
180
- }}
181
+ on:click={handle_remove_image_click}
181
182
  />
182
183
  {/if}
183
184
  </IconButtonWrapper>