@gradio/image 0.11.9 → 0.12.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 +27 -0
- package/package.json +10 -9
- package/shared/Image.svelte +4 -1
- package/shared/ImagePreview.svelte +2 -2
- package/shared/index.ts +1 -0
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,32 @@
|
|
1
1
|
# @gradio/image
|
2
2
|
|
3
|
+
## 0.12.0
|
4
|
+
|
5
|
+
### Features
|
6
|
+
|
7
|
+
- [#8131](https://github.com/gradio-app/gradio/pull/8131) [`bb504b4`](https://github.com/gradio-app/gradio/commit/bb504b494947a287d6386e0e7ead3860c0f15223) - Gradio components in `gr.Chatbot()`. Thanks @dawoodkhan82!
|
8
|
+
|
9
|
+
### Fixes
|
10
|
+
|
11
|
+
- [#8594](https://github.com/gradio-app/gradio/pull/8594) [`530f8a0`](https://github.com/gradio-app/gradio/commit/530f8a0b056b35dabe9bdd148e1ab7c4577f017d) - chatbot component tweaks. Thanks @pngwn!
|
12
|
+
|
13
|
+
### Dependency updates
|
14
|
+
|
15
|
+
- @gradio/atoms@0.7.5
|
16
|
+
- @gradio/utils@0.5.0
|
17
|
+
- @gradio/icons@0.5.0
|
18
|
+
- @gradio/wasm@0.11.0
|
19
|
+
- @gradio/client@1.2.0
|
20
|
+
- @gradio/statustracker@0.7.0
|
21
|
+
- @gradio/upload@0.11.3
|
22
|
+
|
23
|
+
## 0.11.10
|
24
|
+
|
25
|
+
### Dependency updates
|
26
|
+
|
27
|
+
- @gradio/client@1.1.1
|
28
|
+
- @gradio/upload@0.11.2
|
29
|
+
|
3
30
|
## 0.11.9
|
4
31
|
|
5
32
|
### Dependency updates
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gradio/image",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.12.0",
|
4
4
|
"description": "Gradio UI packages",
|
5
5
|
"type": "module",
|
6
6
|
"author": "",
|
@@ -10,16 +10,16 @@
|
|
10
10
|
"cropperjs": "^1.5.12",
|
11
11
|
"lazy-brush": "^1.0.1",
|
12
12
|
"resize-observer-polyfill": "^1.5.1",
|
13
|
-
"@gradio/
|
14
|
-
"@gradio/
|
15
|
-
"@gradio/
|
16
|
-
"@gradio/statustracker": "^0.
|
17
|
-
"@gradio/
|
18
|
-
"@gradio/
|
19
|
-
"@gradio/
|
13
|
+
"@gradio/atoms": "^0.7.5",
|
14
|
+
"@gradio/client": "^1.2.0",
|
15
|
+
"@gradio/icons": "^0.5.0",
|
16
|
+
"@gradio/statustracker": "^0.7.0",
|
17
|
+
"@gradio/utils": "^0.5.0",
|
18
|
+
"@gradio/wasm": "^0.11.0",
|
19
|
+
"@gradio/upload": "^0.11.3"
|
20
20
|
},
|
21
21
|
"devDependencies": {
|
22
|
-
"@gradio/preview": "^0.
|
22
|
+
"@gradio/preview": "^0.10.0"
|
23
23
|
},
|
24
24
|
"main_changeset": true,
|
25
25
|
"main": "./Index.svelte",
|
@@ -27,6 +27,7 @@
|
|
27
27
|
".": "./Index.svelte",
|
28
28
|
"./shared": "./shared/index.ts",
|
29
29
|
"./example": "./Example.svelte",
|
30
|
+
"./base": "./shared/ImagePreview.svelte",
|
30
31
|
"./package.json": "./package.json"
|
31
32
|
}
|
32
33
|
}
|
package/shared/Image.svelte
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
<script lang="ts">
|
2
2
|
import type { HTMLImgAttributes } from "svelte/elements";
|
3
|
+
import { createEventDispatcher } from "svelte";
|
4
|
+
|
5
|
+
const dispatch = createEventDispatcher<{ load?: void }>();
|
3
6
|
interface Props extends HTMLImgAttributes {
|
4
7
|
"data-testid"?: string;
|
5
8
|
}
|
@@ -34,7 +37,7 @@
|
|
34
37
|
</script>
|
35
38
|
|
36
39
|
<!-- svelte-ignore a11y-missing-attribute -->
|
37
|
-
<img src={resolved_src} {...$$restProps} />
|
40
|
+
<img src={resolved_src} {...$$restProps} on:load={() => dispatch("load")} />
|
38
41
|
|
39
42
|
<style>
|
40
43
|
img {
|
@@ -36,7 +36,7 @@
|
|
36
36
|
<BlockLabel
|
37
37
|
{show_label}
|
38
38
|
Icon={ImageIcon}
|
39
|
-
label={label || i18n("image.image")}
|
39
|
+
label={!show_label ? "" : label || i18n("image.image")}
|
40
40
|
/>
|
41
41
|
{#if value === null || !value.url}
|
42
42
|
<Empty unpadded_box={true} size="large"><ImageIcon /></Empty>
|
@@ -63,7 +63,7 @@
|
|
63
63
|
</div>
|
64
64
|
<button on:click={handle_click}>
|
65
65
|
<div class:selectable class="image-container">
|
66
|
-
<Image src={value.url} alt="" loading="lazy" />
|
66
|
+
<Image src={value.url} alt="" loading="lazy" on:load />
|
67
67
|
</div>
|
68
68
|
</button>
|
69
69
|
{/if}
|
package/shared/index.ts
CHANGED