@gradio/imageeditor 0.16.6 → 0.17.1

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,37 @@
1
1
  # @gradio/imageeditor
2
2
 
3
+ ## 0.17.1
4
+
5
+ ### Fixes
6
+
7
+ - [#11960](https://github.com/gradio-app/gradio/pull/11960) [`a060c85`](https://github.com/gradio-app/gradio/commit/a060c852ecc01244687916092a3f3dc234eb84aa) - Set active tool to "draw" when background image changes in ImageEditor. Thanks @freddyaboulton!
8
+
9
+ ## 0.17.0
10
+
11
+ ### Dependency updates
12
+
13
+ - @gradio/image@0.23.1
14
+ - @gradio/upload@0.17.1
15
+ - @gradio/atoms@0.18.1
16
+
17
+ ## 0.17.0
18
+
19
+ ### Features
20
+
21
+ - [#11858](https://github.com/gradio-app/gradio/pull/11858) [`3f8ea13`](https://github.com/gradio-app/gradio/commit/3f8ea13a8ca92abf0ad34392e403a449fda3c6c2) - remove lite. Thanks @pngwn!
22
+
23
+ ### Fixes
24
+
25
+ - [#11784](https://github.com/gradio-app/gradio/pull/11784) [`d9dd3f5`](https://github.com/gradio-app/gradio/commit/d9dd3f54b7fb34cf7118e549d39fc63937ca3489) - Add "hidden" option to component's `visible` kwarg to render but visually hide the component. Thanks @pngwn!
26
+
27
+ ### Dependency updates
28
+
29
+ - @gradio/statustracker@0.11.1
30
+ - @gradio/atoms@0.18.0
31
+ - @gradio/client@1.19.0
32
+ - @gradio/upload@0.17.0
33
+ - @gradio/image@0.23.0
34
+
3
35
  ## 0.16.6
4
36
 
5
37
  ### Dependency updates
package/Index.svelte CHANGED
@@ -23,7 +23,7 @@
23
23
 
24
24
  export let elem_id = "";
25
25
  export let elem_classes: string[] = [];
26
- export let visible = true;
26
+ export let visible: boolean | "hidden" = true;
27
27
  export let value: EditorData | null = {
28
28
  background: null,
29
29
  layers: [],
@@ -9,7 +9,7 @@ declare const __propDef: {
9
9
  props: {
10
10
  elem_id?: string;
11
11
  elem_classes?: string[];
12
- visible?: boolean;
12
+ visible?: boolean | "hidden";
13
13
  value?: EditorData | null;
14
14
  label: string;
15
15
  show_label: boolean;
@@ -81,9 +81,9 @@ export default class Index extends SvelteComponent<IndexProps, IndexEvents, Inde
81
81
  get elem_classes(): string[] | undefined;
82
82
  /**accessor*/
83
83
  set elem_classes(_: string[] | undefined);
84
- get visible(): boolean | undefined;
84
+ get visible(): boolean | "hidden" | undefined;
85
85
  /**accessor*/
86
- set visible(_: boolean | undefined);
86
+ set visible(_: boolean | "hidden" | undefined);
87
87
  get value(): EditorData | null | undefined;
88
88
  /**accessor*/
89
89
  set value(_: EditorData | null | undefined);
@@ -459,6 +459,13 @@ function handle_undo() {
459
459
  function handle_redo() {
460
460
  editor.redo();
461
461
  }
462
+ let old_background = background;
463
+ $: if (old_background !== background) {
464
+ handle_tool_change({ tool: "draw" });
465
+ handle_subtool_change({ tool: "draw", subtool: null });
466
+ current_tool = "draw";
467
+ old_background = background;
468
+ }
462
469
  </script>
463
470
 
464
471
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/imageeditor",
3
- "version": "0.16.6",
3
+ "version": "0.17.1",
4
4
  "description": "Gradio UI packages",
5
5
  "type": "module",
6
6
  "author": "",
@@ -11,14 +11,13 @@
11
11
  "pixi-filters": "^6.1.0",
12
12
  "pixi.js": "^8.7.3",
13
13
  "tinycolor2": "^1.6.0",
14
- "@gradio/client": "^1.18.0",
15
- "@gradio/image": "^0.22.18",
16
- "@gradio/atoms": "^0.17.0",
17
14
  "@gradio/icons": "^0.14.0",
18
- "@gradio/upload": "^0.16.17",
19
- "@gradio/statustracker": "^0.11.0",
20
- "@gradio/utils": "^0.10.2",
21
- "@gradio/wasm": "^0.18.1"
15
+ "@gradio/client": "^1.19.0",
16
+ "@gradio/statustracker": "^0.11.1",
17
+ "@gradio/image": "^0.23.1",
18
+ "@gradio/upload": "^0.17.1",
19
+ "@gradio/atoms": "^0.18.1",
20
+ "@gradio/utils": "^0.10.2"
22
21
  },
23
22
  "devDependencies": {
24
23
  "@gradio/preview": "^0.14.0"
@@ -666,6 +666,15 @@
666
666
  function handle_redo(): void {
667
667
  editor.redo();
668
668
  }
669
+
670
+ let old_background = background;
671
+
672
+ $: if (old_background !== background) {
673
+ handle_tool_change({ tool: "draw" });
674
+ handle_subtool_change({ tool: "draw", subtool: null });
675
+ current_tool = "draw";
676
+ old_background = background;
677
+ }
669
678
  </script>
670
679
 
671
680
  <div