diff --git a/.changeset/hip-drinks-bow.md b/.changeset/hip-drinks-bow.md new file mode 100644 index 000000000000..2bf10b687857 --- /dev/null +++ b/.changeset/hip-drinks-bow.md @@ -0,0 +1,8 @@ +--- +"@gradio/app": minor +"@gradio/image": minor +"@gradio/theme": minor +"gradio": minor +--- + +feat:image fixes diff --git a/js/app/src/main.ts b/js/app/src/main.ts index 4f4caadd13f5..138d1b8e49eb 100644 --- a/js/app/src/main.ts +++ b/js/app/src/main.ts @@ -1,4 +1,7 @@ -import "@gradio/theme"; +import "@gradio/theme/src/reset.css"; +import "@gradio/theme/src/global.css"; +import "@gradio/theme/src/pollen.css"; +import "@gradio/theme/src/typography.css"; import { client, upload_files } from "@gradio/client"; import { mount_css } from "./css"; import Index from "./Index.svelte"; diff --git a/js/image/interactive/Image.svelte b/js/image/interactive/Image.svelte index 3613aefcbe3c..41e8ef86129b 100644 --- a/js/image/interactive/Image.svelte +++ b/js/image/interactive/Image.svelte @@ -51,11 +51,15 @@ function handle_upload({ detail }: CustomEvent): void { if (tool === "color-sketch") { - static_image = normalise_file(detail, root, null); + static_image = normalise_file(detail, root, null)?.data; } else { - value = { image: normalise_file(detail, root, null), mask: null }; + value = + (source === "upload" || source === "webcam") && tool === "sketch" + ? { image: normalise_file(detail, root, null), mask: null } + : normalise_file(detail, root, null); } - dispatch("upload", detail); + + dispatch("upload", normalise_file(detail, root, null)); } function handle_clear({ detail }: CustomEvent): void { @@ -191,8 +195,6 @@ dispatch("select", { index: coordinates, value: null }); } } - - $: console.log(value); {/key} {#if img_width > 0} @@ -297,7 +300,7 @@