@gradio/imageeditor 0.14.1 → 0.14.3

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,21 @@
1
1
  # @gradio/imageeditor
2
2
 
3
+ ## 0.14.3
4
+
5
+ ### Dependency updates
6
+
7
+ - @gradio/statustracker@0.10.10
8
+ - @gradio/image@0.22.3
9
+ - @gradio/upload@0.16.3
10
+ - @gradio/atoms@0.16.0
11
+
12
+ ## 0.14.2
13
+
14
+ ### Fixes
15
+
16
+ - [#11070](https://github.com/gradio-app/gradio/pull/11070) [`0355ef6`](https://github.com/gradio-app/gradio/commit/0355ef644577791749499c64840bad5947764dc8) - Ensure it is possible to draw after uploading an image to the ImageEditor. Thanks @pngwn!
17
+ - [#11057](https://github.com/gradio-app/gradio/pull/11057) [`bb1b74c`](https://github.com/gradio-app/gradio/commit/bb1b74cb62208f1cc05b91902cd541f36a1f9b01) - Image Editor Clear Event. Thanks @freddyaboulton!
18
+
3
19
  ## 0.14.1
4
20
 
5
21
  ### Dependency updates
@@ -433,6 +433,7 @@ async function handle_download() {
433
433
  {min_zoom}
434
434
  current_zoom={zoom_level}
435
435
  on:remove_image={() => {
436
+ dispatch("clear");
436
437
  editor.reset_canvas();
437
438
  handle_tool_change({ tool: "image" });
438
439
  background_image = false;
@@ -636,6 +636,12 @@ export class LayerManager {
636
636
  this.active_layer = this.layers[0].container;
637
637
  this.active_layer_id = this.layers[0].id;
638
638
  }
639
+ else {
640
+ // the id is the same but the layer is new, we need to find the new layer
641
+ this.active_layer =
642
+ this.layers.find((l) => l.id === this.active_layer_id)?.container ||
643
+ this.layers[0].container;
644
+ }
639
645
  this.layer_store.update((state) => ({
640
646
  active_layer: this.active_layer_id || this.layers[0].id,
641
647
  layers: this.layers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/imageeditor",
3
- "version": "0.14.1",
3
+ "version": "0.14.3",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -11,12 +11,12 @@
11
11
  "pixi-filters": "^6.1.0",
12
12
  "pixi.js": "^8.7.3",
13
13
  "tinycolor2": "^1.6.0",
14
- "@gradio/atoms": "^0.15.2",
14
+ "@gradio/atoms": "^0.16.0",
15
15
  "@gradio/client": "^1.14.2",
16
- "@gradio/image": "^0.22.2",
17
- "@gradio/upload": "^0.16.2",
16
+ "@gradio/image": "^0.22.3",
18
17
  "@gradio/icons": "^0.12.0",
19
- "@gradio/statustracker": "^0.10.9",
18
+ "@gradio/statustracker": "^0.10.10",
19
+ "@gradio/upload": "^0.16.3",
20
20
  "@gradio/utils": "^0.10.2",
21
21
  "@gradio/wasm": "^0.18.1"
22
22
  },
@@ -608,6 +608,7 @@
608
608
  {min_zoom}
609
609
  current_zoom={zoom_level}
610
610
  on:remove_image={() => {
611
+ dispatch("clear");
611
612
  editor.reset_canvas();
612
613
  handle_tool_change({ tool: "image" });
613
614
  background_image = false;
@@ -900,6 +900,11 @@ export class LayerManager {
900
900
  if (!persist) {
901
901
  this.active_layer = this.layers[0].container;
902
902
  this.active_layer_id = this.layers[0].id;
903
+ } else {
904
+ // the id is the same but the layer is new, we need to find the new layer
905
+ this.active_layer =
906
+ this.layers.find((l) => l.id === this.active_layer_id)?.container ||
907
+ this.layers[0].container;
903
908
  }
904
909
 
905
910
  this.layer_store.update((state) => ({