@gradio/image 0.11.10 → 0.12.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,32 @@
1
1
  # @gradio/image
2
2
 
3
+ ## 0.12.1
4
+
5
+ ### Dependency updates
6
+
7
+ - @gradio/upload@0.11.4
8
+ - @gradio/client@1.2.1
9
+
10
+ ## 0.12.0
11
+
12
+ ### Features
13
+
14
+ - [#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!
15
+
16
+ ### Fixes
17
+
18
+ - [#8594](https://github.com/gradio-app/gradio/pull/8594) [`530f8a0`](https://github.com/gradio-app/gradio/commit/530f8a0b056b35dabe9bdd148e1ab7c4577f017d) - chatbot component tweaks. Thanks @pngwn!
19
+
20
+ ### Dependency updates
21
+
22
+ - @gradio/atoms@0.7.5
23
+ - @gradio/utils@0.5.0
24
+ - @gradio/icons@0.5.0
25
+ - @gradio/wasm@0.11.0
26
+ - @gradio/client@1.2.0
27
+ - @gradio/statustracker@0.7.0
28
+ - @gradio/upload@0.11.3
29
+
3
30
  ## 0.11.10
4
31
 
5
32
  ### Dependency updates
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradio/image",
3
- "version": "0.11.10",
3
+ "version": "0.12.1",
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/atoms": "^0.7.4",
14
- "@gradio/client": "^1.1.1",
15
- "@gradio/statustracker": "^0.6.0",
16
- "@gradio/icons": "^0.4.1",
17
- "@gradio/upload": "^0.11.2",
18
- "@gradio/utils": "^0.4.2",
19
- "@gradio/wasm": "^0.10.1"
13
+ "@gradio/atoms": "^0.7.5",
14
+ "@gradio/client": "^1.2.1",
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.4"
20
20
  },
21
21
  "devDependencies": {
22
- "@gradio/preview": "^0.9.1"
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
  }
@@ -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
@@ -1 +1,2 @@
1
1
  export { default as Image } from "./Image.svelte";
2
+ export { default as StaticImage } from "./ImagePreview.svelte";