@gradio/imageeditor 0.17.0 → 0.18.0
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,31 @@
|
|
|
1
1
|
# @gradio/imageeditor
|
|
2
2
|
|
|
3
|
+
## 0.18.0
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
- [#12004](https://github.com/gradio-app/gradio/pull/12004) [`09b7111`](https://github.com/gradio-app/gradio/commit/09b71110717d65dd0f885c90f1e455a944d65a14) - Add ability to position watermark relative to watermarked content. Thanks @PRIME-SV!
|
|
8
|
+
|
|
9
|
+
## 0.17.1
|
|
10
|
+
|
|
11
|
+
### Dependency updates
|
|
12
|
+
|
|
13
|
+
- @gradio/client@1.19.1
|
|
14
|
+
|
|
15
|
+
## 0.17.1
|
|
16
|
+
|
|
17
|
+
### Fixes
|
|
18
|
+
|
|
19
|
+
- [#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!
|
|
20
|
+
|
|
21
|
+
## 0.17.0
|
|
22
|
+
|
|
23
|
+
### Dependency updates
|
|
24
|
+
|
|
25
|
+
- @gradio/image@0.23.1
|
|
26
|
+
- @gradio/upload@0.17.1
|
|
27
|
+
- @gradio/atoms@0.18.1
|
|
28
|
+
|
|
3
29
|
## 0.17.0
|
|
4
30
|
|
|
5
31
|
### Features
|
|
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: Record<string, never>;
|
|
4
4
|
events: {
|
|
5
|
-
position: CustomEvent<"center" | "left" | "right" | "top-left" | "top" | "
|
|
5
|
+
position: CustomEvent<"center" | "left" | "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top" | "bottom">;
|
|
6
6
|
} & {
|
|
7
7
|
[evt: string]: CustomEvent<any>;
|
|
8
8
|
};
|
|
@@ -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/dist/shared/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradio/imageeditor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0",
|
|
4
4
|
"description": "Gradio UI packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": "",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"pixi-filters": "^6.1.0",
|
|
12
12
|
"pixi.js": "^8.7.3",
|
|
13
13
|
"tinycolor2": "^1.6.0",
|
|
14
|
-
"@gradio/atoms": "^0.18.
|
|
14
|
+
"@gradio/atoms": "^0.18.1",
|
|
15
|
+
"@gradio/client": "^1.19.1",
|
|
15
16
|
"@gradio/icons": "^0.14.0",
|
|
16
|
-
"@gradio/
|
|
17
|
-
"@gradio/
|
|
18
|
-
"@gradio/upload": "^0.17.0",
|
|
17
|
+
"@gradio/image": "^0.23.1",
|
|
18
|
+
"@gradio/upload": "^0.17.1",
|
|
19
19
|
"@gradio/utils": "^0.10.2",
|
|
20
20
|
"@gradio/statustracker": "^0.11.1"
|
|
21
21
|
},
|
|
@@ -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
|
package/shared/types.ts
CHANGED
|
@@ -17,3 +17,13 @@ export interface WebcamOptions {
|
|
|
17
17
|
mirror: boolean;
|
|
18
18
|
constraints: Record<string, any>;
|
|
19
19
|
}
|
|
20
|
+
|
|
21
|
+
export interface WatermarkOptions {
|
|
22
|
+
text: string | Blob | null;
|
|
23
|
+
position:
|
|
24
|
+
| [number, number]
|
|
25
|
+
| "top-left"
|
|
26
|
+
| "top-right"
|
|
27
|
+
| "bottom-left"
|
|
28
|
+
| "bottom-right";
|
|
29
|
+
}
|